diff options
author | Alex Ning <chineseperson5@gmail.com> | 2019-07-12 16:05:38 +0000 |
---|---|---|
committer | Alex Ning <chineseperson5@gmail.com> | 2019-07-12 16:05:38 +0000 |
commit | de4b53ddf0f6128a82f62515c811c97fc49c48a6 (patch) | |
tree | 13a995eab0073940d19fce2b04e47d68f11ab5c3 /app/src/main/res | |
parent | 8c55fbbde9927cf01d7f7d2236bb6fb89eb2c67c (diff) | |
download | infinity-for-reddit-de4b53ddf0f6128a82f62515c811c97fc49c48a6.tar infinity-for-reddit-de4b53ddf0f6128a82f62515c811c97fc49c48a6.tar.gz infinity-for-reddit-de4b53ddf0f6128a82f62515c811c97fc49c48a6.tar.bz2 infinity-for-reddit-de4b53ddf0f6128a82f62515c811c97fc49c48a6.tar.lz infinity-for-reddit-de4b53ddf0f6128a82f62515c811c97fc49c48a6.tar.xz infinity-for-reddit-de4b53ddf0f6128a82f62515c811c97fc49c48a6.tar.zst infinity-for-reddit-de4b53ddf0f6128a82f62515c811c97fc49c48a6.zip |
Preparing to submit image posts.
Diffstat (limited to 'app/src/main/res')
-rw-r--r-- | app/src/main/res/drawable/ic_outline_add_a_photo_24px.xml | 9 | ||||
-rw-r--r-- | app/src/main/res/drawable/ic_outline_select_photo_24px.xml | 9 | ||||
-rw-r--r-- | app/src/main/res/layout/activity_post_image.xml | 130 | ||||
-rw-r--r-- | app/src/main/res/menu/post_image_activity.xml | 10 | ||||
-rw-r--r-- | app/src/main/res/values/strings.xml | 5 |
5 files changed, 163 insertions, 0 deletions
diff --git a/app/src/main/res/drawable/ic_outline_add_a_photo_24px.xml b/app/src/main/res/drawable/ic_outline_add_a_photo_24px.xml new file mode 100644 index 00000000..98c1ac80 --- /dev/null +++ b/app/src/main/res/drawable/ic_outline_add_a_photo_24px.xml @@ -0,0 +1,9 @@ +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + <path + android:fillColor="#FF000000" + android:pathData="M21,6h-3.17L16,4h-6v2h5.12l1.83,2L21,8v12L5,20v-9L3,11v9c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2L23,8c0,-1.1 -0.9,-2 -2,-2zM8,14c0,2.76 2.24,5 5,5s5,-2.24 5,-5 -2.24,-5 -5,-5 -5,2.24 -5,5zM13,11c1.65,0 3,1.35 3,3s-1.35,3 -3,3 -3,-1.35 -3,-3 1.35,-3 3,-3zM5,6h3L8,4L5,4L5,1L3,1v3L0,4v2h3v3h2z"/> +</vector> diff --git a/app/src/main/res/drawable/ic_outline_select_photo_24px.xml b/app/src/main/res/drawable/ic_outline_select_photo_24px.xml new file mode 100644 index 00000000..9551f621 --- /dev/null +++ b/app/src/main/res/drawable/ic_outline_select_photo_24px.xml @@ -0,0 +1,9 @@ +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + <path + android:fillColor="#FF000000" + android:pathData="M18,20L4,20L4,6h9L13,4L4,4c-1.1,0 -2,0.9 -2,2v14c0,1.1 0.9,2 2,2h14c1.1,0 2,-0.9 2,-2v-9h-2v9zM10.21,16.83l-1.96,-2.36L5.5,18h11l-3.54,-4.71zM20,4L20,1h-2v3h-3c0.01,0.01 0,2 0,2h3v2.99c0.01,0.01 2,0 2,0L20,6h3L23,4h-3z"/> +</vector> diff --git a/app/src/main/res/layout/activity_post_image.xml b/app/src/main/res/layout/activity_post_image.xml new file mode 100644 index 00000000..60a6029e --- /dev/null +++ b/app/src/main/res/layout/activity_post_image.xml @@ -0,0 +1,130 @@ +<?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_post_image_activity" + tools:context=".PostImageActivity"> + + <androidx.core.widget.NestedScrollView + android:layout_width="match_parent" + android:layout_height="match_parent" + android:fillViewport="true"> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="match_parent" + android:orientation="vertical"> + + <RelativeLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:paddingTop="8dp" + android:paddingBottom="8dp" + android:paddingStart="16dp" + android:paddingEnd="16dp"> + + <pl.droidsonroids.gif.GifImageView + android:id="@+id/subreddit_icon_gif_image_view_post_image_activity" + android:layout_width="24dp" + android:layout_height="24dp" + android:layout_alignParentStart="true" + android:layout_centerVertical="true" /> + + <TextView + android:id="@+id/subreddit_name_text_view_post_image_activity" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_toStartOf="@id/rules_button_post_image_activity" + android:layout_toEndOf="@id/subreddit_icon_gif_image_view_post_image_activity" + android:layout_centerVertical="true" + android:layout_marginStart="32dp" + android:layout_marginEnd="16dp" + android:text="@string/choose_a_subreddit" /> + + <Button + android:id="@+id/rules_button_post_image_activity" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignParentEnd="true" + android:layout_centerVertical="true" + android:text="@string/rules" + android:textColor="@color/colorAccent" /> + + </RelativeLayout> + + <View + android:layout_width="match_parent" + android:layout_height="1dp" + android:background="@color/dividerColor" /> + + <EditText + android:id="@+id/post_title_edit_text_post_image_activity" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:gravity="top" + android:padding="16dp" + android:hint="@string/post_title_hint" + android:inputType="textCapSentences|textMultiLine" + android:textSize="18sp" + android:background="#00000000" + android:textColor="@color/primaryTextColor" /> + + <View + android:layout_width="match_parent" + android:layout_height="1dp" + android:background="@color/dividerColor" /> + + <androidx.constraintlayout.widget.ConstraintLayout + android:id="@+id/select_image_constraint_layout_post_image_activity" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:padding="32dp"> + + <com.google.android.material.floatingactionbutton.FloatingActionButton + android:id="@+id/capture_fab_post_image_activity" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:src="@drawable/ic_outline_add_a_photo_24px" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintEnd_toStartOf="@+id/select_from_library_fab_post_image_activity" + app:layout_constraintHorizontal_chainStyle="spread" /> + + <com.google.android.material.floatingactionbutton.FloatingActionButton + android:id="@+id/select_from_library_fab_post_image_activity" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:src="@drawable/ic_outline_select_photo_24px" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintStart_toEndOf="@+id/capture_fab_post_image_activity" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintHorizontal_chainStyle="spread" /> + + </androidx.constraintlayout.widget.ConstraintLayout> + + <TextView + android:id="@+id/select_again_text_view_post_image_activity" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:padding="16dp" + android:text="@string/select_again" + android:textColor="@color/colorAccent" + android:visibility="gone" /> + + <ImageView + android:id="@+id/image_view_post_image_activity" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:scaleType="fitStart" + android:adjustViewBounds="true" + android:visibility="gone" /> + + </LinearLayout> + + </androidx.core.widget.NestedScrollView> + +</androidx.coordinatorlayout.widget.CoordinatorLayout>
\ No newline at end of file diff --git a/app/src/main/res/menu/post_image_activity.xml b/app/src/main/res/menu/post_image_activity.xml new file mode 100644 index 00000000..1525a802 --- /dev/null +++ b/app/src/main/res/menu/post_image_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_post_image_activity" + android:orderInCategory="1" + android:title="@string/action_send" + android:icon="@drawable/ic_send_white_24dp" + app:showAsAction="ifRoom" /> +</menu>
\ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 4faecc7a..31b5897a 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -7,6 +7,7 @@ <string name="post_text_activity_label">Text Post</string> <string name="subreddit_selection_activity_label">Select a Subreddit</string> <string name="post_link_activity_label">Link Post</string> + <string name="post_image_activity_label">Image Post</string> <string name="navigation_drawer_open">Open navigation drawer</string> <string name="navigation_drawer_close">Close navigation drawer</string> @@ -108,4 +109,8 @@ <string name="dialog_post_link">Link</string> <string name="dialog_post_image">Image</string> <string name="dialog_post_video">Video</string> + + <string name="select_from_gallery">Select a picture</string> + <string name="select_again">Select again</string> + <string name="error_getting_image">Error getting the image</string> </resources> |