aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/res
diff options
context:
space:
mode:
authorDocile-Alligator <chineseperson5@gmail.com>2020-03-31 14:31:55 +0000
committerGitHub <noreply@github.com>2020-03-31 14:31:55 +0000
commit093fccc790437ec72bea2e1667f1ea06ada3bf10 (patch)
tree0ca568205d14ef88b453be06c5e811d1df43ad38 /app/src/main/res
parent2e59daa9cd607670e19f245d6c2c363df6f35d27 (diff)
parentd0faebbab94fff13a657311b286419619200663e (diff)
downloadinfinity-for-reddit-093fccc790437ec72bea2e1667f1ea06ada3bf10.tar
infinity-for-reddit-093fccc790437ec72bea2e1667f1ea06ada3bf10.tar.gz
infinity-for-reddit-093fccc790437ec72bea2e1667f1ea06ada3bf10.tar.bz2
infinity-for-reddit-093fccc790437ec72bea2e1667f1ea06ada3bf10.tar.lz
infinity-for-reddit-093fccc790437ec72bea2e1667f1ea06ada3bf10.tar.xz
infinity-for-reddit-093fccc790437ec72bea2e1667f1ea06ada3bf10.tar.zst
infinity-for-reddit-093fccc790437ec72bea2e1667f1ea06ada3bf10.zip
Merge pull request #73 from OHermesJunior/master
Add hidden comment toolbar feature.
Diffstat (limited to 'app/src/main/res')
-rw-r--r--app/src/main/res/layout/item_comment.xml16
-rw-r--r--app/src/main/res/values/strings.xml2
-rw-r--r--app/src/main/res/xml/interface_preference.xml10
3 files changed, 26 insertions, 2 deletions
diff --git a/app/src/main/res/layout/item_comment.xml b/app/src/main/res/layout/item_comment.xml
index dfefe3d1..535e6fd6 100644
--- a/app/src/main/res/layout/item_comment.xml
+++ b/app/src/main/res/layout/item_comment.xml
@@ -21,7 +21,8 @@
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:layout_marginBottom="12dp"
- android:orientation="vertical">
+ android:orientation="vertical"
+ android:animateLayoutChanges="true">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
@@ -70,6 +71,17 @@
app:layout_constraintTop_toBottomOf="@id/author_text_view_item_post_comment" />
<TextView
+ android:id="@+id/top_score_text_view_item_post_comment"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_marginEnd="8dp"
+ android:gravity="end"
+ android:textSize="?attr/font_default"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintEnd_toStartOf="@id/comment_time_text_view_item_post_comment"
+ app:layout_constraintTop_toTopOf="parent" />
+
+ <TextView
android:id="@+id/comment_time_text_view_item_post_comment"
android:layout_width="0dp"
android:layout_height="wrap_content"
@@ -84,7 +96,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:barrierDirection="start"
- app:constraint_referenced_ids="comment_time_text_view_item_post_comment" />
+ app:constraint_referenced_ids="top_score_text_view_item_post_comment" />
</androidx.constraintlayout.widget.ConstraintLayout>
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index c976932b..7e024f40 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -314,6 +314,8 @@
<string name="settings_confirm_to_exit">Confirm to Exit</string>
<string name="settings_show_top_level_comments_first_title">Show Top-level Comments First</string>
<string name="settings_show_comment_divider_title">Show Comment Divider</string>
+ <string name="settings_comment_toolbar_hide_on_click">Click to Show/Hide Comment Toolbar</string>
+ <string name="settings_comment_toolbar_hidden">Comment Toolbar Hidden by Default</string>
<string name="settings_show_absolute_number_of_votes_title">Show Absolute Number of Votes</string>
<string name="settings_show_elapsed_time">Show Elapsed Time in Posts and Comments</string>
<string name="settings_default_post_layout">Default Post Layout</string>
diff --git a/app/src/main/res/xml/interface_preference.xml b/app/src/main/res/xml/interface_preference.xml
index 7b21020e..0ddedb98 100644
--- a/app/src/main/res/xml/interface_preference.xml
+++ b/app/src/main/res/xml/interface_preference.xml
@@ -52,6 +52,16 @@
app:title="@string/settings_show_comment_divider_title" />
<SwitchPreference
+ app:defaultValue="false"
+ app:key="comment_toolbar_hidden"
+ app:title="@string/settings_comment_toolbar_hidden" />
+
+ <SwitchPreference
+ app:defaultValue="true"
+ app:key="comment_toolbar_hide_on_click"
+ app:title="@string/settings_comment_toolbar_hide_on_click" />
+
+ <SwitchPreference
app:defaultValue="true"
app:key="show_absolute_number_of_votes"
app:title="@string/settings_show_absolute_number_of_votes_title" />