diff options
Diffstat (limited to 'app/src/main/res')
-rw-r--r-- | app/src/main/res/drawable-night/ic_history_24dp.xml | 9 | ||||
-rw-r--r-- | app/src/main/res/layout/fragment_post_history.xml | 93 | ||||
-rw-r--r-- | app/src/main/res/values/strings.xml | 5 | ||||
-rw-r--r-- | app/src/main/res/xml/main_preferences.xml | 5 | ||||
-rw-r--r-- | app/src/main/res/xml/miscellaneous_preferences.xml | 2 | ||||
-rw-r--r-- | app/src/main/res/xml/post_history.xml | 4 |
6 files changed, 116 insertions, 2 deletions
diff --git a/app/src/main/res/drawable-night/ic_history_24dp.xml b/app/src/main/res/drawable-night/ic_history_24dp.xml new file mode 100644 index 00000000..af91e161 --- /dev/null +++ b/app/src/main/res/drawable-night/ic_history_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="M13,3c-4.97,0 -9,4.03 -9,9L1,12l3.89,3.89 0.07,0.14L9,12L6,12c0,-3.87 3.13,-7 7,-7s7,3.13 7,7 -3.13,7 -7,7c-1.93,0 -3.68,-0.79 -4.94,-2.06l-1.42,1.42C8.27,19.99 10.51,21 13,21c4.97,0 9,-4.03 9,-9s-4.03,-9 -9,-9zM12,8v5l4.28,2.54 0.72,-1.21 -3.5,-2.08L13.5,8L12,8z" + android:fillColor="#FFFFFF"/> +</vector> diff --git a/app/src/main/res/layout/fragment_post_history.xml b/app/src/main/res/layout/fragment_post_history.xml new file mode 100644 index 00000000..7eb07801 --- /dev/null +++ b/app/src/main/res/layout/fragment_post_history.xml @@ -0,0 +1,93 @@ +<?xml version="1.0" encoding="utf-8"?> +<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="match_parent" + xmlns:app="http://schemas.android.com/apk/res-auto" + android:orientation="vertical" + tools:context=".settings.NsfwAndBlurringFragment"> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical"> + + <TextView + android:id="@+id/info_text_view_post_history_fragment" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:padding="16dp" + android:drawablePadding="32dp" + android:text="@string/restart_app_see_changes" + android:textColor="@color/settingsSubtitleColor" + android:gravity="center_vertical" + android:textSize="?attr/font_default" + android:fontFamily="?attr/font_family" + app:drawableStartCompat="@drawable/ic_info_preference_24dp" /> + + <LinearLayout + android:id="@+id/mark_posts_as_read_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:drawablePadding="32dp" + android:text="@string/settings_mark_posts_as_read_title" + android:textColor="?attr/primaryTextColor" + android:textSize="?attr/font_16" + android:fontFamily="?attr/font_family" /> + + <com.google.android.material.switchmaterial.SwitchMaterial + android:id="@+id/mark_posts_as_read_switch_post_history_fragment" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center_vertical" /> + + </LinearLayout> + + <LinearLayout + android:id="@+id/mark_posts_as_read_after_voting_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_mark_posts_as_read_after_voting_title" + android:textColor="?attr/primaryTextColor" + android:textSize="?attr/font_16" + android:fontFamily="?attr/font_family" /> + + <com.google.android.material.switchmaterial.SwitchMaterial + android:id="@+id/mark_posts_as_read_after_voting_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 0843d94e..ea62ed9c 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -513,7 +513,10 @@ <string name="settings_swipe_action_swipe_right_title">Swipe Right</string> <string name="settings_swipe_action_info_summary">Not applicable to post feed with more than 1 column or post detail.</string> <string name="settings_language_title">Language</string> - <string name="settings_enable_search_history">Enable Search History</string> + <string name="settings_enable_search_history_title">Enable Search History</string> + <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="no_link_available">Cannot get the link</string> diff --git a/app/src/main/res/xml/main_preferences.xml b/app/src/main/res/xml/main_preferences.xml index 666bc186..334ebd1a 100644 --- a/app/src/main/res/xml/main_preferences.xml +++ b/app/src/main/res/xml/main_preferences.xml @@ -58,6 +58,11 @@ app:fragment="ml.docilealligator.infinityforreddit.settings.NsfwAndBlurringFragment"/> <Preference + app:icon="@drawable/ic_history_24dp" + android:title="@string/settings_post_history_title" + app:fragment="ml.docilealligator.infinityforreddit.settings.PostHistoryFragment" /> + + <Preference app:icon="@drawable/ic_filter_24dp" app:title="@string/settings_filter_title" app:fragment="ml.docilealligator.infinityforreddit.settings.FilterPreferenceFragment"/> diff --git a/app/src/main/res/xml/miscellaneous_preferences.xml b/app/src/main/res/xml/miscellaneous_preferences.xml index 81a811fc..6fb763f6 100644 --- a/app/src/main/res/xml/miscellaneous_preferences.xml +++ b/app/src/main/res/xml/miscellaneous_preferences.xml @@ -28,7 +28,7 @@ <SwitchPreference app:defaultValue="true" app:key="enable_search_history" - app:title="@string/settings_enable_search_history" + app:title="@string/settings_enable_search_history_title" app:summary="@string/only_for_logged_in_user" /> <ListPreference diff --git a/app/src/main/res/xml/post_history.xml b/app/src/main/res/xml/post_history.xml new file mode 100644 index 00000000..624ed13a --- /dev/null +++ b/app/src/main/res/xml/post_history.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"> + +</PreferenceScreen>
\ No newline at end of file |