diff options
author | Alex Ning <chineseperson5@gmail.com> | 2020-01-11 02:39:49 +0000 |
---|---|---|
committer | Alex Ning <chineseperson5@gmail.com> | 2020-01-11 02:39:49 +0000 |
commit | cb9154369070fe3773c16da0d4e7b3c33b716a1f (patch) | |
tree | c6619bb95f66f605c4d7d84da0cc0fb9329de723 /app/src/main/res | |
parent | b04ad8956dac3d5d07a389b56e1e22e70bf9ff51 (diff) | |
download | infinity-for-reddit-cb9154369070fe3773c16da0d4e7b3c33b716a1f.tar infinity-for-reddit-cb9154369070fe3773c16da0d4e7b3c33b716a1f.tar.gz infinity-for-reddit-cb9154369070fe3773c16da0d4e7b3c33b716a1f.tar.bz2 infinity-for-reddit-cb9154369070fe3773c16da0d4e7b3c33b716a1f.tar.lz infinity-for-reddit-cb9154369070fe3773c16da0d4e7b3c33b716a1f.tar.xz infinity-for-reddit-cb9154369070fe3773c16da0d4e7b3c33b716a1f.tar.zst infinity-for-reddit-cb9154369070fe3773c16da0d4e7b3c33b716a1f.zip |
Setting default post layout is now available. Add an option to hide the divider in post compact layout.
Diffstat (limited to 'app/src/main/res')
-rw-r--r-- | app/src/main/res/layout/app_bar_main.xml | 4 | ||||
-rw-r--r-- | app/src/main/res/layout/item_post_compact.xml | 1 | ||||
-rw-r--r-- | app/src/main/res/values/arrays.xml | 10 | ||||
-rw-r--r-- | app/src/main/res/values/strings.xml | 2 | ||||
-rw-r--r-- | app/src/main/res/xml/main_preferences.xml | 18 |
5 files changed, 33 insertions, 2 deletions
diff --git a/app/src/main/res/layout/app_bar_main.xml b/app/src/main/res/layout/app_bar_main.xml index ffa18ea1..a9008a36 100644 --- a/app/src/main/res/layout/app_bar_main.xml +++ b/app/src/main/res/layout/app_bar_main.xml @@ -109,9 +109,9 @@ android:layout_height="wrap_content" android:layout_margin="@dimen/fab_margin" android:visibility="gone" - app:backgroundTint="?attr/backgroundColor" + app:backgroundTint="@color/backgroundColorPrimary" app:srcCompat="@drawable/ic_add_bottom_app_bar_24dp" - app:tint="@null" + app:tint="@android:color/white" app:layout_anchor="@id/bottom_navigation_main_activity" /> </androidx.coordinatorlayout.widget.CoordinatorLayout> diff --git a/app/src/main/res/layout/item_post_compact.xml b/app/src/main/res/layout/item_post_compact.xml index c3de103f..7bcb8072 100644 --- a/app/src/main/res/layout/item_post_compact.xml +++ b/app/src/main/res/layout/item_post_compact.xml @@ -382,6 +382,7 @@ </androidx.constraintlayout.widget.ConstraintLayout> <View + android:id="@+id/divider_item_post_compact" android:layout_width="match_parent" android:layout_height="1dp" android:background="@color/dividerColor" /> diff --git a/app/src/main/res/values/arrays.xml b/app/src/main/res/values/arrays.xml index 602a3f00..4adfdff9 100644 --- a/app/src/main/res/values/arrays.xml +++ b/app/src/main/res/values/arrays.xml @@ -37,6 +37,16 @@ <item>2</item> </string-array> + <string-array name="settings_default_post_layout"> + <item>Card Layout</item> + <item>Compact Layout</item> + </string-array> + + <string-array name="settings_default_post_layout_values"> + <item>0</item> + <item>1</item> + </string-array> + <string-array name="settings_lazy_mode_interval"> <item>1s</item> <item>2s</item> diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index f5a97676..0e2a5b66 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -300,6 +300,8 @@ <string name="settings_volume_keys_navigate_posts_title">Use Volume Keys to Navigate Posts</string> <string name="settings_mute_video_title">Mute Video</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> + <string name="settings_show_divider_in_compact_layout">Show Divider in Compact Layout</string> <string name="swipe_to_go_back_from_post_detail">Swipe Right to Go Back From Comments</string> <string name="settings_lazy_mode_interval_title">Lazy Mode Interval</string> <string name="settings_font_size_title">Font Size</string> diff --git a/app/src/main/res/xml/main_preferences.xml b/app/src/main/res/xml/main_preferences.xml index 561222cd..395d10e1 100644 --- a/app/src/main/res/xml/main_preferences.xml +++ b/app/src/main/res/xml/main_preferences.xml @@ -41,6 +41,24 @@ app:key="show_elapsed_time" app:title="@string/settings_show_elapsed_time" /> + <ListPreference + app:defaultValue="0" + android:entries="@array/settings_default_post_layout" + app:entryValues="@array/settings_default_post_layout_values" + app:key="default_post_layout" + app:title="@string/settings_default_post_layout" + app:useSimpleSummaryProvider="true" /> + + <SwitchPreference + app:defaultValue="true" + app:key="show_divider_in_compact_layout" + app:title="@string/settings_show_divider_in_compact_layout" /> + + <SwitchPreference + app:defaultValue="true" + app:key="swipe_to_go_back_from_post_detail" + app:title="@string/swipe_to_go_back_from_post_detail" /> + <SwitchPreference app:defaultValue="true" app:key="swipe_to_go_back_from_post_detail" |