aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/res
diff options
context:
space:
mode:
authorAlex Ning <chineseperson5@gmail.com>2020-09-24 09:28:13 +0000
committerAlex Ning <chineseperson5@gmail.com>2020-09-24 09:28:13 +0000
commitd6051ca932a234da18dcd9eb351be741d085c9d4 (patch)
treedab7d3260895122e7937e5aa3abae1e857f27a4c /app/src/main/res
parentcf1d14264d305f079f6d1aaa93dd0d499eb48ade (diff)
downloadinfinity-for-reddit-d6051ca932a234da18dcd9eb351be741d085c9d4.tar
infinity-for-reddit-d6051ca932a234da18dcd9eb351be741d085c9d4.tar.gz
infinity-for-reddit-d6051ca932a234da18dcd9eb351be741d085c9d4.tar.bz2
infinity-for-reddit-d6051ca932a234da18dcd9eb351be741d085c9d4.tar.lz
infinity-for-reddit-d6051ca932a234da18dcd9eb351be741d085c9d4.tar.xz
infinity-for-reddit-d6051ca932a234da18dcd9eb351be741d085c9d4.tar.zst
infinity-for-reddit-d6051ca932a234da18dcd9eb351be741d085c9d4.zip
Support hiding tab titles. Support changing tab count.
Diffstat (limited to '')
-rw-r--r--app/src/main/res/layout/fragment_customize_main_page_tabs.xml69
-rw-r--r--app/src/main/res/values/arrays.xml6
-rw-r--r--app/src/main/res/values/strings.xml2
3 files changed, 77 insertions, 0 deletions
diff --git a/app/src/main/res/layout/fragment_customize_main_page_tabs.xml b/app/src/main/res/layout/fragment_customize_main_page_tabs.xml
index bd91d961..9a91549a 100644
--- a/app/src/main/res/layout/fragment_customize_main_page_tabs.xml
+++ b/app/src/main/res/layout/fragment_customize_main_page_tabs.xml
@@ -24,6 +24,75 @@
android:fontFamily="?attr/font_family"
app:drawableStartCompat="@drawable/ic_info_preference_24dp" />
+ <LinearLayout
+ android:id="@+id/tab_count_linear_layout_customize_main_page_tabs_fragment"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical"
+ android:paddingTop="16dp"
+ android:paddingBottom="16dp"
+ android:paddingStart="72dp"
+ android:paddingEnd="16dp"
+ android:clickable="true"
+ android:focusable="true"
+ android:background="?attr/selectableItemBackground">
+
+ <TextView
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:layout_marginEnd="16dp"
+ android:layout_gravity="center_vertical"
+ android:text="@string/settings_tab_count"
+ android:textColor="?attr/primaryTextColor"
+ android:textSize="?attr/font_16"
+ android:fontFamily="?attr/font_family" />
+
+ <TextView
+ android:id="@+id/tab_count_text_view_customize_main_page_tabs_fragment"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:layout_marginEnd="16dp"
+ android:layout_gravity="center_vertical"
+ android:text="@string/settings_more_tabs_show_subscribed_subreddits_title"
+ android:textColor="?attr/secondaryTextColor"
+ android:textSize="?attr/font_default"
+ android:fontFamily="?attr/font_family" />
+
+ </LinearLayout>
+
+ <LinearLayout
+ android:id="@+id/show_tab_names_linear_layout_customize_main_page_tabs_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_show_tab_names"
+ android:textColor="?attr/primaryTextColor"
+ android:textSize="?attr/font_16"
+ android:fontFamily="?attr/font_family" />
+
+ <com.google.android.material.switchmaterial.SwitchMaterial
+ android:id="@+id/show_tab_names_switch_material_customize_main_page_tabs_fragment"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_vertical" />
+
+ </LinearLayout>
+
<View
android:id="@+id/divider_1_customize_main_page_tabs_fragment"
android:layout_width="match_parent"
diff --git a/app/src/main/res/values/arrays.xml b/app/src/main/res/values/arrays.xml
index 9d6e4448..fd1a386c 100644
--- a/app/src/main/res/values/arrays.xml
+++ b/app/src/main/res/values/arrays.xml
@@ -224,4 +224,10 @@
<item>1</item>
<item>2</item>
</string-array>
+
+ <string-array name="settings_main_page_tab_count">
+ <item>1</item>
+ <item>2</item>
+ <item>3</item>
+ </string-array>
</resources> \ 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 5cfee780..45212b52 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -447,6 +447,8 @@
<string name="settings_reset_all_settings_title">Reset All Settings</string>
<string name="settings_advanced_settings_summary">Clean the database and shared preferences</string>
<string name="settings_tab_info">Restart the app to see the changes</string>
+ <string name="settings_tab_count">Tab Count</string>
+ <string name="settings_show_tab_names">Show Tab Names</string>
<string name="settings_tab_1_summary">Tab 1</string>
<string name="settings_tab_2_summary">Tab 2</string>
<string name="settings_tab_3_summary">Tab 3</string>