Support hiding tab titles. Support changing tab count.

This commit is contained in:
Alex Ning
2020-09-24 17:28:13 +08:00
parent cf1d14264d
commit d6051ca932
6 changed files with 155 additions and 40 deletions

View File

@@ -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"