diff options
author | Alex Ning <chineseperson5@gmail.com> | 2020-12-24 05:00:06 +0000 |
---|---|---|
committer | Alex Ning <chineseperson5@gmail.com> | 2020-12-24 05:00:06 +0000 |
commit | 68bdee39524339eb986c6710e63730be2ef856f2 (patch) | |
tree | 725421b910794ea371514be9036d32ba09143ebf /app/src/main/res | |
parent | c293e9f22ff34f07f62ca3afba6e508aec2226ff (diff) | |
download | infinity-for-reddit-68bdee39524339eb986c6710e63730be2ef856f2.tar infinity-for-reddit-68bdee39524339eb986c6710e63730be2ef856f2.tar.gz infinity-for-reddit-68bdee39524339eb986c6710e63730be2ef856f2.tar.bz2 infinity-for-reddit-68bdee39524339eb986c6710e63730be2ef856f2.tar.lz infinity-for-reddit-68bdee39524339eb986c6710e63730be2ef856f2.tar.xz infinity-for-reddit-68bdee39524339eb986c6710e63730be2ef856f2.tar.zst infinity-for-reddit-68bdee39524339eb986c6710e63730be2ef856f2.zip |
New feature: Hide read posts automatically.
Diffstat (limited to 'app/src/main/res')
-rw-r--r-- | app/src/main/res/layout/fragment_post_history.xml | 36 | ||||
-rw-r--r-- | app/src/main/res/values/strings.xml | 1 | ||||
-rw-r--r-- | app/src/main/res/xml/post_history.xml | 4 |
3 files changed, 37 insertions, 4 deletions
diff --git a/app/src/main/res/layout/fragment_post_history.xml b/app/src/main/res/layout/fragment_post_history.xml index 7eb07801..9ed65c7f 100644 --- a/app/src/main/res/layout/fragment_post_history.xml +++ b/app/src/main/res/layout/fragment_post_history.xml @@ -25,6 +25,11 @@ android:fontFamily="?attr/font_family" app:drawableStartCompat="@drawable/ic_info_preference_24dp" /> + <View + android:layout_width="match_parent" + android:layout_height="1dp" + android:background="@color/dividerColor" /> + <LinearLayout android:id="@+id/mark_posts_as_read_linear_layout_post_history_fragment" android:layout_width="match_parent" @@ -88,6 +93,37 @@ </LinearLayout> + <LinearLayout + android:id="@+id/hide_read_posts_automatically_linear_layout_post_history_fragment" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:paddingTop="4dp" + android:paddingBottom="4dp" + android:paddingStart="72dp" + android:paddingEnd="16dp" + android:clickable="true" + android:focusable="true" + android:background="?attr/selectableItemBackground"> + + <TextView + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:layout_marginEnd="16dp" + android:layout_gravity="center_vertical" + android:text="@string/settings_hide_read_posts_automatically_title" + android:textColor="?attr/primaryTextColor" + android:textSize="?attr/font_16" + android:fontFamily="?attr/font_family" /> + + <com.google.android.material.switchmaterial.SwitchMaterial + android:id="@+id/hide_read_posts_automatically_switch_post_history_fragment" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center_vertical" /> + + </LinearLayout> + </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 ea62ed9c..c683d45e 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -517,6 +517,7 @@ <string name="settings_post_history_title">Post History</string> <string name="settings_mark_posts_as_read_title">Mark Posts As Read</string> <string name="settings_mark_posts_as_read_after_voting_title">Mark Posts As Read After Voting</string> + <string name="settings_hide_read_posts_automatically_title">Hide Read Posts Automatically</string> <string name="no_link_available">Cannot get the link</string> diff --git a/app/src/main/res/xml/post_history.xml b/app/src/main/res/xml/post_history.xml deleted file mode 100644 index 624ed13a..00000000 --- a/app/src/main/res/xml/post_history.xml +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"> - -</PreferenceScreen>
\ No newline at end of file |