The Dhivehi button sat a few pixels lower than English because the toggle group aligns children by text baseline and Thaana has different font metrics. Turn off baseline alignment for the language toggle. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FQUrmJjrypeoPsubpzuezC
310 lines
13 KiB
XML
310 lines
13 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<ScrollView
|
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:background="?attr/colorSurface">
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="vertical"
|
|
android:padding="16dp">
|
|
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="@string/settings_navigation"
|
|
android:textAppearance="?attr/textAppearanceTitleMedium"
|
|
android:layout_marginBottom="12dp" />
|
|
|
|
<com.google.android.material.button.MaterialButtonToggleGroup
|
|
android:id="@+id/navModeToggle"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginBottom="24dp"
|
|
app:singleSelection="true"
|
|
app:selectionRequired="true">
|
|
|
|
<com.google.android.material.button.MaterialButton
|
|
android:id="@+id/btnNavDrawer"
|
|
style="@style/Widget.Material3.Button.OutlinedButton"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:text="@string/settings_nav_drawer" />
|
|
|
|
<com.google.android.material.button.MaterialButton
|
|
android:id="@+id/btnNavCircular"
|
|
style="@style/Widget.Material3.Button.OutlinedButton"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:text="@string/settings_nav_circular" />
|
|
|
|
<com.google.android.material.button.MaterialButton
|
|
android:id="@+id/btnNavBottom"
|
|
style="@style/Widget.Material3.Button.OutlinedButton"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:text="@string/settings_nav_bottom" />
|
|
|
|
</com.google.android.material.button.MaterialButtonToggleGroup>
|
|
|
|
<!-- Quick actions — shown only when drawer nav is active -->
|
|
<LinearLayout
|
|
android:id="@+id/sectionQuickActions"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="vertical"
|
|
android:layout_marginBottom="16dp">
|
|
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="@string/dashboard_quick_actions"
|
|
android:textAppearance="?attr/textAppearanceTitleMedium"
|
|
android:layout_marginTop="8dp"
|
|
android:layout_marginBottom="12dp" />
|
|
|
|
<androidx.recyclerview.widget.RecyclerView
|
|
android:id="@+id/rvQuickActions"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:nestedScrollingEnabled="false"
|
|
android:overScrollMode="never" />
|
|
|
|
</LinearLayout>
|
|
|
|
<!-- Circular nav shortcuts — shown only when circular nav is active -->
|
|
<LinearLayout
|
|
android:id="@+id/sectionCircularSlots"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="vertical"
|
|
android:layout_marginBottom="16dp">
|
|
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="@string/settings_circular_shortcuts"
|
|
android:textAppearance="?attr/textAppearanceTitleMedium"
|
|
android:layout_marginTop="8dp"
|
|
android:layout_marginBottom="12dp" />
|
|
|
|
<androidx.recyclerview.widget.RecyclerView
|
|
android:id="@+id/rvCircularSlots"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:nestedScrollingEnabled="false"
|
|
android:overScrollMode="never" />
|
|
|
|
</LinearLayout>
|
|
|
|
<!-- Bottom bar shortcuts — shown only when bottom nav is active -->
|
|
<LinearLayout
|
|
android:id="@+id/sectionBottomBarShortcuts"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="vertical"
|
|
android:layout_marginBottom="8dp">
|
|
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="@string/settings_bottom_bar_shortcuts"
|
|
android:textAppearance="?attr/textAppearanceTitleMedium"
|
|
android:layout_marginTop="8dp"
|
|
android:layout_marginBottom="12dp" />
|
|
|
|
<androidx.recyclerview.widget.RecyclerView
|
|
android:id="@+id/rvNavSlots"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:nestedScrollingEnabled="false"
|
|
android:overScrollMode="never" />
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="12dp"
|
|
android:gravity="center_vertical"
|
|
android:orientation="horizontal">
|
|
|
|
<TextView
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:text="@string/settings_bottom_bar_show_labels"
|
|
android:textAppearance="?attr/textAppearanceTitleMedium" />
|
|
|
|
<com.google.android.material.materialswitch.MaterialSwitch
|
|
android:id="@+id/switchShowLabels"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content" />
|
|
|
|
</LinearLayout>
|
|
|
|
</LinearLayout>
|
|
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="@string/theme"
|
|
android:textAppearance="?attr/textAppearanceTitleMedium"
|
|
android:layout_marginBottom="12dp" />
|
|
|
|
<com.google.android.material.button.MaterialButtonToggleGroup
|
|
android:id="@+id/themeToggle"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
app:singleSelection="true"
|
|
app:selectionRequired="true">
|
|
|
|
<com.google.android.material.button.MaterialButton
|
|
android:id="@+id/btnThemeSystem"
|
|
style="@style/Widget.Material3.Button.OutlinedButton"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:text="@string/theme_system" />
|
|
|
|
<com.google.android.material.button.MaterialButton
|
|
android:id="@+id/btnThemeLight"
|
|
style="@style/Widget.Material3.Button.OutlinedButton"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:text="@string/theme_light" />
|
|
|
|
<com.google.android.material.button.MaterialButton
|
|
android:id="@+id/btnThemeDark"
|
|
style="@style/Widget.Material3.Button.OutlinedButton"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:text="@string/theme_dark" />
|
|
|
|
</com.google.android.material.button.MaterialButtonToggleGroup>
|
|
|
|
<!-- Pitch black — enabled only in explicit dark mode -->
|
|
<LinearLayout
|
|
android:id="@+id/rowPitchBlack"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="16dp"
|
|
android:gravity="center_vertical"
|
|
android:orientation="horizontal">
|
|
|
|
<TextView
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:text="@string/settings_pitch_black"
|
|
android:textAppearance="?attr/textAppearanceBodyLarge" />
|
|
|
|
<com.google.android.material.materialswitch.MaterialSwitch
|
|
android:id="@+id/switchPitchBlack"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content" />
|
|
|
|
</LinearLayout>
|
|
|
|
<!-- Accent color — always shown, disabled/grayed in system theme mode -->
|
|
<LinearLayout
|
|
android:id="@+id/sectionAccentColor"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="vertical"
|
|
android:layout_marginTop="24dp">
|
|
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="@string/settings_accent_color"
|
|
android:textAppearance="?attr/textAppearanceTitleMedium"
|
|
android:layout_marginBottom="12dp" />
|
|
|
|
<com.google.android.material.button.MaterialButtonToggleGroup
|
|
android:id="@+id/accentToggle"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
app:singleSelection="true"
|
|
app:selectionRequired="true">
|
|
|
|
<com.google.android.material.button.MaterialButton
|
|
android:id="@+id/btnAccentBlue"
|
|
style="@style/Widget.Material3.Button.OutlinedButton"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:text="@string/accent_blue" />
|
|
|
|
<com.google.android.material.button.MaterialButton
|
|
android:id="@+id/btnAccentOrange"
|
|
style="@style/Widget.Material3.Button.OutlinedButton"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:text="@string/accent_orange" />
|
|
|
|
<com.google.android.material.button.MaterialButton
|
|
android:id="@+id/btnAccentGreen"
|
|
style="@style/Widget.Material3.Button.OutlinedButton"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:text="@string/accent_green" />
|
|
|
|
<com.google.android.material.button.MaterialButton
|
|
android:id="@+id/btnAccentCustom"
|
|
style="@style/Widget.Material3.Button.OutlinedButton"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:text="@string/accent_custom" />
|
|
|
|
</com.google.android.material.button.MaterialButtonToggleGroup>
|
|
|
|
</LinearLayout>
|
|
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="@string/language"
|
|
android:textAppearance="?attr/textAppearanceTitleMedium"
|
|
android:layout_marginTop="24dp"
|
|
android:layout_marginBottom="12dp" />
|
|
|
|
<com.google.android.material.button.MaterialButtonToggleGroup
|
|
android:id="@+id/languageToggle"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:baselineAligned="false"
|
|
app:singleSelection="true"
|
|
app:selectionRequired="true">
|
|
|
|
<com.google.android.material.button.MaterialButton
|
|
android:id="@+id/btnLangEnglish"
|
|
style="@style/Widget.Material3.Button.OutlinedButton"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:text="@string/lang_english" />
|
|
|
|
<com.google.android.material.button.MaterialButton
|
|
android:id="@+id/btnLangDhivehi"
|
|
style="@style/Widget.Material3.Button.OutlinedButton"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:text="@string/lang_dhivehi" />
|
|
|
|
</com.google.android.material.button.MaterialButtonToggleGroup>
|
|
|
|
</LinearLayout>
|
|
|
|
</ScrollView>
|