diff options
Diffstat (limited to 'app/src/main/res')
4 files changed, 119 insertions, 0 deletions
diff --git a/app/src/main/res/layout/activity_send_private_message.xml b/app/src/main/res/layout/activity_send_private_message.xml new file mode 100644 index 00000000..3938e90d --- /dev/null +++ b/app/src/main/res/layout/activity_send_private_message.xml @@ -0,0 +1,98 @@ +<?xml version="1.0" encoding="utf-8"?> +<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:id="@+id/coordinator_layout_send_private_message_activity" + tools:context=".Activity.SendPrivateMessageActivity"> + + <com.google.android.material.appbar.AppBarLayout + android:id="@+id/appbar_layout_send_private_message_activity" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:theme="@style/AppTheme.AppBarOverlay"> + + <androidx.appcompat.widget.Toolbar + android:id="@+id/toolbar_send_private_message_activity" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:minHeight="?attr/actionBarSize" + app:navigationIcon="?attr/homeAsUpIndicator" + app:popupTheme="@style/AppTheme.PopupOverlay" /> + + </com.google.android.material.appbar.AppBarLayout> + + <androidx.core.widget.NestedScrollView + android:layout_width="match_parent" + android:layout_height="match_parent" + app:layout_behavior="@string/appbar_scrolling_view_behavior"> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="match_parent" + android:orientation="vertical"> + + <EditText + android:id="@+id/username_edit_text_send_private_message_activity" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:background="#00000000" + android:gravity="top" + android:hint="@string/send_message_username_hint" + android:inputType="textCapSentences|textMultiLine" + android:paddingTop="16dp" + android:paddingStart="16dp" + android:paddingEnd="16dp" + android:paddingBottom="16dp" + android:textColor="?attr/primaryTextColor" + android:textSize="?attr/content_font_18" + android:fontFamily="?attr/content_font_family" /> + + <View + android:id="@+id/divider_1_send_private_message_activity" + android:layout_width="match_parent" + android:layout_height="1dp" + android:layout_marginBottom="16dp" /> + + <EditText + android:id="@+id/subjet_edit_text_send_private_message_activity" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:background="#00000000" + android:gravity="top" + android:hint="@string/send_message_subject_hint" + android:inputType="textCapSentences|textMultiLine" + android:paddingStart="16dp" + android:paddingEnd="16dp" + android:paddingBottom="16dp" + android:textColor="?attr/primaryTextColor" + android:textSize="?attr/content_font_18" + android:fontFamily="?attr/content_font_family" /> + + <View + android:id="@+id/divider_2_send_private_message_activity" + android:layout_width="match_parent" + android:layout_height="1dp" + android:layout_marginBottom="16dp" /> + + <EditText + android:id="@+id/content_edit_text_send_private_message_activity" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:background="#00000000" + android:gravity="top" + android:hint="@string/send_message_content_hint" + android:inputType="textCapSentences|textMultiLine" + android:paddingStart="16dp" + android:paddingEnd="16dp" + android:paddingBottom="16dp" + android:textColor="?attr/primaryTextColor" + android:textSize="?attr/content_font_18" + android:fontFamily="?attr/content_font_family" /> + + </LinearLayout> + + </androidx.core.widget.NestedScrollView> + +</androidx.coordinatorlayout.widget.CoordinatorLayout>
\ No newline at end of file diff --git a/app/src/main/res/menu/send_private_message_activity.xml b/app/src/main/res/menu/send_private_message_activity.xml new file mode 100644 index 00000000..ba7f4a4f --- /dev/null +++ b/app/src/main/res/menu/send_private_message_activity.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="utf-8"?> +<menu xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto"> + <item + android:id="@+id/action_send_send_private_message_activity" + android:orderInCategory="1" + android:title="@string/action_send" + android:icon="@drawable/ic_send_toolbar_24dp" + app:showAsAction="ifRoom" /> +</menu>
\ No newline at end of file diff --git a/app/src/main/res/menu/view_user_detail_activity.xml b/app/src/main/res/menu/view_user_detail_activity.xml index 18c3ef16..50170f31 100644 --- a/app/src/main/res/menu/view_user_detail_activity.xml +++ b/app/src/main/res/menu/view_user_detail_activity.xml @@ -37,4 +37,10 @@ android:orderInCategory="6" android:title="@string/action_share" app:showAsAction="never" /> + + <item + android:id="@+id/action_send_private_message_view_user_detail_activity" + android:orderInCategory="6" + android:title="@string/action_send_private_message" + app:showAsAction="never" /> </menu> diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 72f64124..9a7ed547 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -28,6 +28,7 @@ <string name="report_activity_label">Report</string> <string name="view_imgur_media_activity_image_label">Image %1$d/%2$d</string> <string name="view_imgur_media_activity_video_label">Video %1$d/%2$d</string> + <string name="send_private_message_activity_label">Send PM</string> <string name="navigation_drawer_open">Open navigation drawer</string> <string name="navigation_drawer_close">Close navigation drawer</string> @@ -63,6 +64,7 @@ <string name="action_report">Report</string> <string name="action_see_removed">See Removed</string> <string name="action_set_wallpaper">Set as Wallpaper</string> + <string name="action_send_private_message">Send Private Message</string> <string name="parse_json_response_error">Error occurred when parsing the JSON response</string> <string name="retrieve_token_error">Error Retrieving the token</string> @@ -152,6 +154,9 @@ <string name="send_comment_failed">Could not send this comment</string> <string name="parse_sent_comment_failed">The comment is sent but unable to get the sent comment</string> + <string name="send_message_username_hint">User</string> + <string name="send_message_subject_hint">Subject</string> + <string name="send_message_content_hint">Message</string> <string name="reply_message_failed">Could not reply to this message</string> <string name="error_getting_message">Error getting this message</string> |