diff options
author | Alex Ning <chineseperson5@gmail.com> | 2020-10-04 03:24:50 +0000 |
---|---|---|
committer | Alex Ning <chineseperson5@gmail.com> | 2020-10-04 03:24:50 +0000 |
commit | 4f19bd83aa8d2500d825ce63ae8770325b4a44e9 (patch) | |
tree | 47d2c32a87b1c5c074ea84c5077c11db62ac3926 /app/src/main/res | |
parent | 60fdb813c02f266c8c5ecaf20bfaee711372a982 (diff) | |
download | infinity-for-reddit-4f19bd83aa8d2500d825ce63ae8770325b4a44e9.tar infinity-for-reddit-4f19bd83aa8d2500d825ce63ae8770325b4a44e9.tar.gz infinity-for-reddit-4f19bd83aa8d2500d825ce63ae8770325b4a44e9.tar.bz2 infinity-for-reddit-4f19bd83aa8d2500d825ce63ae8770325b4a44e9.tar.lz infinity-for-reddit-4f19bd83aa8d2500d825ce63ae8770325b4a44e9.tar.xz infinity-for-reddit-4f19bd83aa8d2500d825ce63ae8770325b4a44e9.tar.zst infinity-for-reddit-4f19bd83aa8d2500d825ce63ae8770325b4a44e9.zip |
Add two options: go to user and go to subreddit in FABMoreOptionsBottomSheetFragment.
Diffstat (limited to '')
-rw-r--r-- | app/src/main/res/drawable-night/ic_random_24dp.xml | 24 | ||||
-rw-r--r-- | app/src/main/res/drawable-night/ic_subreddit_24dp.xml | 9 | ||||
-rw-r--r-- | app/src/main/res/drawable-night/ic_user_24dp.xml | 9 | ||||
-rw-r--r-- | app/src/main/res/drawable/ic_random_24dp.xml | 24 | ||||
-rw-r--r-- | app/src/main/res/drawable/ic_subreddit_24dp.xml | 9 | ||||
-rw-r--r-- | app/src/main/res/drawable/ic_user_24dp.xml | 9 | ||||
-rw-r--r-- | app/src/main/res/layout/dialog_go_to_thing_edit_text.xml | 10 | ||||
-rw-r--r-- | app/src/main/res/layout/fragment_fab_more_options_bottom_sheet.xml | 57 | ||||
-rw-r--r-- | app/src/main/res/values/strings.xml | 9 |
9 files changed, 160 insertions, 0 deletions
diff --git a/app/src/main/res/drawable-night/ic_random_24dp.xml b/app/src/main/res/drawable-night/ic_random_24dp.xml new file mode 100644 index 00000000..bd0bc639 --- /dev/null +++ b/app/src/main/res/drawable-night/ic_random_24dp.xml @@ -0,0 +1,24 @@ +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + <path + android:pathData="M19,3L5,3c-1.1,0 -2,0.9 -2,2v14c0,1.1 0.9,2 2,2h14c1.1,0 2,-0.9 2,-2L21,5c0,-1.1 -0.9,-2 -2,-2zM19,19L5,19L5,5h14v14z" + android:fillColor="#000000"/> + <path + android:pathData="M7.5,16.5m-1.5,0a1.5,1.5 0,1 1,3 0a1.5,1.5 0,1 1,-3 0" + android:fillColor="#000000"/> + <path + android:pathData="M7.5,7.5m-1.5,0a1.5,1.5 0,1 1,3 0a1.5,1.5 0,1 1,-3 0" + android:fillColor="#000000"/> + <path + android:pathData="M12,12m-1.5,0a1.5,1.5 0,1 1,3 0a1.5,1.5 0,1 1,-3 0" + android:fillColor="#000000"/> + <path + android:pathData="M16.5,16.5m-1.5,0a1.5,1.5 0,1 1,3 0a1.5,1.5 0,1 1,-3 0" + android:fillColor="#000000"/> + <path + android:pathData="M16.5,7.5m-1.5,0a1.5,1.5 0,1 1,3 0a1.5,1.5 0,1 1,-3 0" + android:fillColor="#000000"/> +</vector> diff --git a/app/src/main/res/drawable-night/ic_subreddit_24dp.xml b/app/src/main/res/drawable-night/ic_subreddit_24dp.xml new file mode 100644 index 00000000..505f8067 --- /dev/null +++ b/app/src/main/res/drawable-night/ic_subreddit_24dp.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:pathData="M15,4v7L5.17,11L4,12.17L4,4h11m1,-2L3,2c-0.55,0 -1,0.45 -1,1v14l4,-4h10c0.55,0 1,-0.45 1,-1L17,3c0,-0.55 -0.45,-1 -1,-1zM21,6h-2v9L6,15v2c0,0.55 0.45,1 1,1h11l4,4L22,7c0,-0.55 -0.45,-1 -1,-1z" + android:fillColor="#FFFFFF"/> +</vector> diff --git a/app/src/main/res/drawable-night/ic_user_24dp.xml b/app/src/main/res/drawable-night/ic_user_24dp.xml new file mode 100644 index 00000000..4b963261 --- /dev/null +++ b/app/src/main/res/drawable-night/ic_user_24dp.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:pathData="M10.25,13c0,0.69 -0.56,1.25 -1.25,1.25S7.75,13.69 7.75,13s0.56,-1.25 1.25,-1.25 1.25,0.56 1.25,1.25zM15,11.75c-0.69,0 -1.25,0.56 -1.25,1.25s0.56,1.25 1.25,1.25 1.25,-0.56 1.25,-1.25 -0.56,-1.25 -1.25,-1.25zM22,12c0,5.52 -4.48,10 -10,10S2,17.52 2,12 6.48,2 12,2s10,4.48 10,10zM10.66,4.12C12.06,6.44 14.6,8 17.5,8c0.46,0 0.91,-0.05 1.34,-0.12C17.44,5.56 14.9,4 12,4c-0.46,0 -0.91,0.05 -1.34,0.12zM4.42,9.47c1.71,-0.97 3.03,-2.55 3.66,-4.44C6.37,6 5.05,7.58 4.42,9.47zM20,12c0,-0.78 -0.12,-1.53 -0.33,-2.24 -0.7,0.15 -1.42,0.24 -2.17,0.24 -3.13,0 -5.92,-1.44 -7.76,-3.69C8.69,8.87 6.6,10.88 4,11.86c0.01,0.04 0,0.09 0,0.14 0,4.41 3.59,8 8,8s8,-3.59 8,-8z" + android:fillColor="#FFFFFF"/> +</vector> diff --git a/app/src/main/res/drawable/ic_random_24dp.xml b/app/src/main/res/drawable/ic_random_24dp.xml new file mode 100644 index 00000000..bd0bc639 --- /dev/null +++ b/app/src/main/res/drawable/ic_random_24dp.xml @@ -0,0 +1,24 @@ +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + <path + android:pathData="M19,3L5,3c-1.1,0 -2,0.9 -2,2v14c0,1.1 0.9,2 2,2h14c1.1,0 2,-0.9 2,-2L21,5c0,-1.1 -0.9,-2 -2,-2zM19,19L5,19L5,5h14v14z" + android:fillColor="#000000"/> + <path + android:pathData="M7.5,16.5m-1.5,0a1.5,1.5 0,1 1,3 0a1.5,1.5 0,1 1,-3 0" + android:fillColor="#000000"/> + <path + android:pathData="M7.5,7.5m-1.5,0a1.5,1.5 0,1 1,3 0a1.5,1.5 0,1 1,-3 0" + android:fillColor="#000000"/> + <path + android:pathData="M12,12m-1.5,0a1.5,1.5 0,1 1,3 0a1.5,1.5 0,1 1,-3 0" + android:fillColor="#000000"/> + <path + android:pathData="M16.5,16.5m-1.5,0a1.5,1.5 0,1 1,3 0a1.5,1.5 0,1 1,-3 0" + android:fillColor="#000000"/> + <path + android:pathData="M16.5,7.5m-1.5,0a1.5,1.5 0,1 1,3 0a1.5,1.5 0,1 1,-3 0" + android:fillColor="#000000"/> +</vector> diff --git a/app/src/main/res/drawable/ic_subreddit_24dp.xml b/app/src/main/res/drawable/ic_subreddit_24dp.xml new file mode 100644 index 00000000..37af6d27 --- /dev/null +++ b/app/src/main/res/drawable/ic_subreddit_24dp.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:pathData="M15,4v7L5.17,11L4,12.17L4,4h11m1,-2L3,2c-0.55,0 -1,0.45 -1,1v14l4,-4h10c0.55,0 1,-0.45 1,-1L17,3c0,-0.55 -0.45,-1 -1,-1zM21,6h-2v9L6,15v2c0,0.55 0.45,1 1,1h11l4,4L22,7c0,-0.55 -0.45,-1 -1,-1z" + android:fillColor="#000000"/> +</vector> diff --git a/app/src/main/res/drawable/ic_user_24dp.xml b/app/src/main/res/drawable/ic_user_24dp.xml new file mode 100644 index 00000000..4d161f62 --- /dev/null +++ b/app/src/main/res/drawable/ic_user_24dp.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:pathData="M10.25,13c0,0.69 -0.56,1.25 -1.25,1.25S7.75,13.69 7.75,13s0.56,-1.25 1.25,-1.25 1.25,0.56 1.25,1.25zM15,11.75c-0.69,0 -1.25,0.56 -1.25,1.25s0.56,1.25 1.25,1.25 1.25,-0.56 1.25,-1.25 -0.56,-1.25 -1.25,-1.25zM22,12c0,5.52 -4.48,10 -10,10S2,17.52 2,12 6.48,2 12,2s10,4.48 10,10zM10.66,4.12C12.06,6.44 14.6,8 17.5,8c0.46,0 0.91,-0.05 1.34,-0.12C17.44,5.56 14.9,4 12,4c-0.46,0 -0.91,0.05 -1.34,0.12zM4.42,9.47c1.71,-0.97 3.03,-2.55 3.66,-4.44C6.37,6 5.05,7.58 4.42,9.47zM20,12c0,-0.78 -0.12,-1.53 -0.33,-2.24 -0.7,0.15 -1.42,0.24 -2.17,0.24 -3.13,0 -5.92,-1.44 -7.76,-3.69C8.69,8.87 6.6,10.88 4,11.86c0.01,0.04 0,0.09 0,0.14 0,4.41 3.59,8 8,8s8,-3.59 8,-8z" + android:fillColor="#000000"/> +</vector> diff --git a/app/src/main/res/layout/dialog_go_to_thing_edit_text.xml b/app/src/main/res/layout/dialog_go_to_thing_edit_text.xml new file mode 100644 index 00000000..748376bf --- /dev/null +++ b/app/src/main/res/layout/dialog_go_to_thing_edit_text.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="utf-8"?> +<EditText xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:padding="24dp" + android:background="#00000000" + android:hint="@string/go_to_thing_hint" + android:textColor="?attr/primaryTextColor" + android:textSize="?attr/font_default" + android:fontFamily="?attr/font_family" />
\ No newline at end of file diff --git a/app/src/main/res/layout/fragment_fab_more_options_bottom_sheet.xml b/app/src/main/res/layout/fragment_fab_more_options_bottom_sheet.xml index fa7f9833..a209b863 100644 --- a/app/src/main/res/layout/fragment_fab_more_options_bottom_sheet.xml +++ b/app/src/main/res/layout/fragment_fab_more_options_bottom_sheet.xml @@ -106,6 +106,63 @@ android:focusable="true" android:background="?attr/selectableItemBackground" /> + <TextView + android:id="@+id/go_to_subreddit_text_view_fab_more_options_bottom_sheet_fragment" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:gravity="center_vertical" + android:paddingTop="16dp" + android:paddingBottom="16dp" + android:paddingStart="32dp" + android:paddingEnd="32dp" + android:text="@string/go_to_subreddit" + android:textColor="?attr/primaryTextColor" + android:textSize="?attr/font_default" + android:fontFamily="?attr/font_family" + app:drawableStartCompat="@drawable/ic_subreddit_24dp" + android:drawablePadding="48dp" + android:clickable="true" + android:focusable="true" + android:background="?attr/selectableItemBackground" /> + + <TextView + android:id="@+id/go_to_user_text_view_fab_more_options_bottom_sheet_fragment" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:gravity="center_vertical" + android:paddingTop="16dp" + android:paddingBottom="16dp" + android:paddingStart="32dp" + android:paddingEnd="32dp" + android:text="@string/go_to_user" + android:textColor="?attr/primaryTextColor" + android:textSize="?attr/font_default" + android:fontFamily="?attr/font_family" + app:drawableStartCompat="@drawable/ic_user_24dp" + android:drawablePadding="48dp" + android:clickable="true" + android:focusable="true" + android:background="?attr/selectableItemBackground" /> + + <TextView + android:id="@+id/random_text_view_fab_more_options_bottom_sheet_fragment" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:gravity="center_vertical" + android:paddingTop="16dp" + android:paddingBottom="16dp" + android:paddingStart="32dp" + android:paddingEnd="32dp" + android:text="@string/random" + android:textColor="?attr/primaryTextColor" + android:textSize="?attr/font_default" + android:fontFamily="?attr/font_family" + app:drawableStartCompat="@drawable/ic_random_24dp" + android:drawablePadding="48dp" + android:clickable="true" + android:focusable="true" + android:background="?attr/selectableItemBackground" /> + </LinearLayout> </androidx.core.widget.NestedScrollView>
\ 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 ad5871fe..386be5df 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -920,4 +920,13 @@ <string name="dismiss">Dismiss</string> <string name="leave">Leave</string> + <string name="go_to_subreddit">Go to subreddit</string> + <string name="go_to_user">Go to user</string> + <string name="go_to_thing_hint">Name</string> + <string name="random">Random</string> + <string name="random_subreddit">Random Subreddit</string> + <string name="random_nsfw_subreddit">Random NSFW Subreddit</string> + <string name="random_post">Random Post</string> + <string name="random_nsfw_post">Random NSFW post</string> + </resources> |