aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/res
diff options
context:
space:
mode:
authorAlex Ning <chineseperson5@gmail.com>2021-04-20 09:34:14 +0000
committerAlex Ning <chineseperson5@gmail.com>2021-04-20 09:34:14 +0000
commitf634686eb8059ef5fa634ba1322c6340199f44bc (patch)
tree7437f3584039427f0e082046a04bf0ca5d87bac6 /app/src/main/res
parentf4266bb35055687dbe46a7da54a9caeaad3fd9d4 (diff)
downloadinfinity-for-reddit-f634686eb8059ef5fa634ba1322c6340199f44bc.tar
infinity-for-reddit-f634686eb8059ef5fa634ba1322c6340199f44bc.tar.gz
infinity-for-reddit-f634686eb8059ef5fa634ba1322c6340199f44bc.tar.bz2
infinity-for-reddit-f634686eb8059ef5fa634ba1322c6340199f44bc.tar.lz
infinity-for-reddit-f634686eb8059ef5fa634ba1322c6340199f44bc.tar.xz
infinity-for-reddit-f634686eb8059ef5fa634ba1322c6340199f44bc.tar.zst
infinity-for-reddit-f634686eb8059ef5fa634ba1322c6340199f44bc.zip
Hide reply and save buttons in comments if the depth is larger than 5. Add reply and save options in CommentMoreBottomSheetFragment.
Diffstat (limited to 'app/src/main/res')
-rw-r--r--app/src/main/res/drawable-night/ic_bookmark_24dp.xml9
-rw-r--r--app/src/main/res/drawable-night/ic_bookmark_border_24dp.xml9
-rw-r--r--app/src/main/res/drawable-night/ic_reply_24dp.xml4
-rw-r--r--app/src/main/res/drawable/ic_bookmark_24dp.xml9
-rw-r--r--app/src/main/res/drawable/ic_bookmark_border_24dp.xml9
-rw-r--r--app/src/main/res/drawable/ic_reply_24dp.xml4
-rw-r--r--app/src/main/res/layout/fragment_comment_more_bottom_sheet.xml38
-rw-r--r--app/src/main/res/layout/item_comment.xml202
-rw-r--r--app/src/main/res/values/strings.xml4
9 files changed, 187 insertions, 101 deletions
diff --git a/app/src/main/res/drawable-night/ic_bookmark_24dp.xml b/app/src/main/res/drawable-night/ic_bookmark_24dp.xml
new file mode 100644
index 00000000..edee7cf9
--- /dev/null
+++ b/app/src/main/res/drawable-night/ic_bookmark_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:fillColor="#FFFFFF"
+ android:pathData="M17,3H7c-1.1,0 -1.99,0.9 -1.99,2L5,21l7,-3 7,3V5c0,-1.1 -0.9,-2 -2,-2z"/>
+</vector>
diff --git a/app/src/main/res/drawable-night/ic_bookmark_border_24dp.xml b/app/src/main/res/drawable-night/ic_bookmark_border_24dp.xml
new file mode 100644
index 00000000..f41f953b
--- /dev/null
+++ b/app/src/main/res/drawable-night/ic_bookmark_border_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:fillColor="#FFFFFF"
+ android:pathData="M17,3L7,3c-1.1,0 -1.99,0.9 -1.99,2L5,21l7,-3 7,3L19,5c0,-1.1 -0.9,-2 -2,-2zM17,18l-5,-2.18L7,18L7,5h10v13z"/>
+</vector>
diff --git a/app/src/main/res/drawable-night/ic_reply_24dp.xml b/app/src/main/res/drawable-night/ic_reply_24dp.xml
new file mode 100644
index 00000000..f8ebec5e
--- /dev/null
+++ b/app/src/main/res/drawable-night/ic_reply_24dp.xml
@@ -0,0 +1,4 @@
+<vector android:height="24dp" android:viewportHeight="24.0"
+ android:viewportWidth="24.0" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+ <path android:fillColor="#FFFFFF" android:pathData="M10,9V5l-7,7 7,7v-4.1c5,0 8.5,1.6 11,5.1 -1,-5 -4,-10 -11,-11z"/>
+</vector>
diff --git a/app/src/main/res/drawable/ic_bookmark_24dp.xml b/app/src/main/res/drawable/ic_bookmark_24dp.xml
new file mode 100644
index 00000000..05588d52
--- /dev/null
+++ b/app/src/main/res/drawable/ic_bookmark_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:fillColor="#000000"
+ android:pathData="M17,3H7c-1.1,0 -1.99,0.9 -1.99,2L5,21l7,-3 7,3V5c0,-1.1 -0.9,-2 -2,-2z"/>
+</vector>
diff --git a/app/src/main/res/drawable/ic_bookmark_border_24dp.xml b/app/src/main/res/drawable/ic_bookmark_border_24dp.xml
new file mode 100644
index 00000000..22c3d5fa
--- /dev/null
+++ b/app/src/main/res/drawable/ic_bookmark_border_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:fillColor="#000000"
+ android:pathData="M17,3L7,3c-1.1,0 -1.99,0.9 -1.99,2L5,21l7,-3 7,3L19,5c0,-1.1 -0.9,-2 -2,-2zM17,18l-5,-2.18L7,18L7,5h10v13z"/>
+</vector>
diff --git a/app/src/main/res/drawable/ic_reply_24dp.xml b/app/src/main/res/drawable/ic_reply_24dp.xml
new file mode 100644
index 00000000..43e4df73
--- /dev/null
+++ b/app/src/main/res/drawable/ic_reply_24dp.xml
@@ -0,0 +1,4 @@
+<vector android:height="24dp" android:viewportHeight="24.0"
+ android:viewportWidth="24.0" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+ <path android:fillColor="#000000" android:pathData="M10,9V5l-7,7 7,7v-4.1c5,0 8.5,1.6 11,5.1 -1,-5 -4,-10 -11,-11z"/>
+</vector>
diff --git a/app/src/main/res/layout/fragment_comment_more_bottom_sheet.xml b/app/src/main/res/layout/fragment_comment_more_bottom_sheet.xml
index 719935d5..4c03230f 100644
--- a/app/src/main/res/layout/fragment_comment_more_bottom_sheet.xml
+++ b/app/src/main/res/layout/fragment_comment_more_bottom_sheet.xml
@@ -49,6 +49,26 @@
app:drawableStartCompat="@drawable/ic_delete_24dp" />
<TextView
+ android:id="@+id/reply_text_view_comment_more_bottom_sheet_fragment"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:background="?attr/selectableItemBackground"
+ android:clickable="true"
+ android:drawablePadding="48dp"
+ android:focusable="true"
+ android:gravity="center_vertical"
+ android:paddingStart="32dp"
+ android:paddingTop="16dp"
+ android:paddingEnd="32dp"
+ android:paddingBottom="16dp"
+ android:text="@string/reply"
+ android:textColor="?attr/primaryTextColor"
+ android:textSize="?attr/font_default"
+ android:fontFamily="?attr/font_family"
+ android:visibility="gone"
+ app:drawableStartCompat="@drawable/ic_reply_24dp" />
+
+ <TextView
android:id="@+id/save_text_view_comment_more_bottom_sheet_fragment"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -61,6 +81,24 @@
android:paddingTop="16dp"
android:paddingEnd="32dp"
android:paddingBottom="16dp"
+ android:textColor="?attr/primaryTextColor"
+ android:textSize="?attr/font_default"
+ android:visibility="gone"
+ android:fontFamily="?attr/font_family" />
+
+ <TextView
+ android:id="@+id/share_text_view_comment_more_bottom_sheet_fragment"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:background="?attr/selectableItemBackground"
+ android:clickable="true"
+ android:drawablePadding="48dp"
+ android:focusable="true"
+ android:gravity="center_vertical"
+ android:paddingStart="32dp"
+ android:paddingTop="16dp"
+ android:paddingEnd="32dp"
+ android:paddingBottom="16dp"
android:text="@string/share"
android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default"
diff --git a/app/src/main/res/layout/item_comment.xml b/app/src/main/res/layout/item_comment.xml
index a33b8a36..d4874801 100644
--- a/app/src/main/res/layout/item_comment.xml
+++ b/app/src/main/res/layout/item_comment.xml
@@ -116,110 +116,110 @@
android:textSize="?attr/content_font_default"
android:fontFamily="?attr/content_font_family" />
- </LinearLayout>
+ <androidx.constraintlayout.widget.ConstraintLayout
+ android:id="@+id/bottom_constraint_layout_item_post_comment"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:paddingStart="4dp"
+ android:paddingEnd="4dp">
- </LinearLayout>
+ <ImageView
+ android:id="@+id/up_vote_button_item_post_comment"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:padding="8dp"
+ android:background="?actionBarItemBackground"
+ android:clickable="true"
+ android:focusable="true"
+ android:src="@drawable/ic_arrow_upward_grey_24dp"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constraintBottom_toBottomOf="parent" />
- <androidx.constraintlayout.widget.ConstraintLayout
- android:id="@+id/bottom_constraint_layout_item_post_comment"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:paddingStart="4dp"
- android:paddingEnd="4dp">
+ <TextView
+ android:id="@+id/score_text_view_item_post_comment"
+ android:layout_width="64dp"
+ android:layout_height="wrap_content"
+ android:gravity="center"
+ android:textSize="?attr/font_12"
+ android:textStyle="bold"
+ android:fontFamily="?attr/font_family"
+ app:layout_constraintStart_toEndOf="@+id/up_vote_button_item_post_comment"
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constraintBottom_toBottomOf="parent"/>
- <ImageView
- android:id="@+id/up_vote_button_item_post_comment"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:padding="8dp"
- android:background="?actionBarItemBackground"
- android:clickable="true"
- android:focusable="true"
- android:src="@drawable/ic_arrow_upward_grey_24dp"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toBottomOf="parent" />
-
- <TextView
- android:id="@+id/score_text_view_item_post_comment"
- android:layout_width="64dp"
- android:layout_height="wrap_content"
- android:gravity="center"
- android:textSize="?attr/font_12"
- android:textStyle="bold"
- android:fontFamily="?attr/font_family"
- app:layout_constraintStart_toEndOf="@+id/up_vote_button_item_post_comment"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toBottomOf="parent"/>
-
- <ImageView
- android:id="@+id/down_vote_button_item_post_comment"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:padding="8dp"
- android:background="?actionBarItemBackground"
- android:clickable="true"
- android:focusable="true"
- android:src="@drawable/ic_arrow_downward_grey_24dp"
- app:layout_constraintStart_toEndOf="@+id/score_text_view_item_post_comment"
- app:layout_constraintEnd_toStartOf="@id/more_button_item_post_comment"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintHorizontal_bias="0" />
-
- <ImageView
- android:id="@+id/more_button_item_post_comment"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:padding="8dp"
- android:background="?actionBarItemBackground"
- android:clickable="true"
- android:focusable="true"
- android:src="@drawable/ic_more_vert_grey_24dp"
- app:layout_constraintEnd_toStartOf="@+id/expand_button_item_post_comment"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toBottomOf="parent"/>
-
- <ImageView
- android:id="@+id/expand_button_item_post_comment"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:padding="8dp"
- android:background="?actionBarItemBackground"
- android:clickable="true"
- android:focusable="true"
- android:src="@drawable/ic_expand_less_grey_24dp"
- android:visibility="gone"
- app:layout_constraintEnd_toStartOf="@+id/save_button_item_post_comment"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toBottomOf="parent"/>
-
- <ImageView
- android:id="@+id/save_button_item_post_comment"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:padding="8dp"
- android:background="?actionBarItemBackground"
- android:clickable="true"
- android:focusable="true"
- app:layout_constraintEnd_toStartOf="@+id/reply_button_item_post_comment"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toBottomOf="parent"/>
-
- <ImageView
- android:id="@+id/reply_button_item_post_comment"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:padding="8dp"
- android:background="?actionBarItemBackground"
- android:clickable="true"
- android:focusable="true"
- android:src="@drawable/ic_reply_grey_24dp"
- app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toBottomOf="parent"/>
-
- </androidx.constraintlayout.widget.ConstraintLayout>
+ <ImageView
+ android:id="@+id/down_vote_button_item_post_comment"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:padding="8dp"
+ android:background="?actionBarItemBackground"
+ android:clickable="true"
+ android:focusable="true"
+ android:src="@drawable/ic_arrow_downward_grey_24dp"
+ app:layout_constraintStart_toEndOf="@+id/score_text_view_item_post_comment"
+ app:layout_constraintEnd_toStartOf="@id/more_button_item_post_comment"
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintHorizontal_bias="0" />
+
+ <ImageView
+ android:id="@+id/more_button_item_post_comment"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:padding="8dp"
+ android:background="?actionBarItemBackground"
+ android:clickable="true"
+ android:focusable="true"
+ android:src="@drawable/ic_more_vert_grey_24dp"
+ app:layout_constraintEnd_toStartOf="@+id/expand_button_item_post_comment"
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constraintBottom_toBottomOf="parent"/>
+
+ <ImageView
+ android:id="@+id/expand_button_item_post_comment"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:padding="8dp"
+ android:background="?actionBarItemBackground"
+ android:clickable="true"
+ android:focusable="true"
+ android:src="@drawable/ic_expand_less_grey_24dp"
+ android:visibility="gone"
+ app:layout_constraintEnd_toStartOf="@+id/save_button_item_post_comment"
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constraintBottom_toBottomOf="parent"/>
+
+ <ImageView
+ android:id="@+id/save_button_item_post_comment"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:padding="8dp"
+ android:background="?actionBarItemBackground"
+ android:clickable="true"
+ android:focusable="true"
+ app:layout_constraintEnd_toStartOf="@+id/reply_button_item_post_comment"
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constraintBottom_toBottomOf="parent"/>
+
+ <ImageView
+ android:id="@+id/reply_button_item_post_comment"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:padding="8dp"
+ android:background="?actionBarItemBackground"
+ android:clickable="true"
+ android:focusable="true"
+ android:src="@drawable/ic_reply_grey_24dp"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constraintBottom_toBottomOf="parent"/>
+
+ </androidx.constraintlayout.widget.ConstraintLayout>
+
+ </LinearLayout>
+
+ </LinearLayout>
<View
android:id="@+id/divider_item_comment"
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index e41edd82..f671784b 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -583,6 +583,8 @@
<string name="no_email_client">No Email client found</string>
<string name="no_app">No app available</string>
+ <string name="save_comment">Save</string>
+ <string name="unsave_comment">Unsave</string>
<string name="comment_saved_success">Comment saved</string>
<string name="comment_saved_failed">Unable to save comment</string>
<string name="comment_unsaved_success">Comment unsaved</string>
@@ -1104,4 +1106,6 @@
<string name="disable_nsfw_forever_message">Once enabled, NSFW will be permanently disabled, regardless of whether the NSFW setting is enabled or not. And this option is irreversible, the only way to re-enable NSFW is to clear the app data.\n\nStill want to enable it?</string>
+ <string name="reply">Reply</string>
+
</resources>