diff options
| author | 2023-05-22 15:13:18 -0400 | |
|---|---|---|
| committer | 2023-06-03 00:06:03 -0700 | |
| commit | e42c966110ef0409ffd289b10058066af26ed7e0 (patch) | |
| tree | b9783a6390bc99674de1ade5359126cb1fa9a1d0 /src/android | |
| parent | android: Simplify setup in search and games fragments (diff) | |
| download | yuzu-e42c966110ef0409ffd289b10058066af26ed7e0.tar.gz yuzu-e42c966110ef0409ffd289b10058066af26ed7e0.tar.xz yuzu-e42c966110ef0409ffd289b10058066af26ed7e0.zip | |
android: Settings UI tweaks
New spacing and fonts for list items
Diffstat (limited to 'src/android')
6 files changed, 24 insertions, 23 deletions
diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsFragmentPresenter.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsFragmentPresenter.kt index bd5bfca5e..5b4272a74 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsFragmentPresenter.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsFragmentPresenter.kt | |||
| @@ -77,7 +77,7 @@ class SettingsFragmentPresenter(private val fragmentView: SettingsFragmentView) | |||
| 77 | } | 77 | } |
| 78 | 78 | ||
| 79 | private fun addConfigSettings(sl: ArrayList<SettingsItem>) { | 79 | private fun addConfigSettings(sl: ArrayList<SettingsItem>) { |
| 80 | settingsActivity.setToolbarTitle(settingsActivity.getString(R.string.preferences_settings)) | 80 | settingsActivity.setToolbarTitle(settingsActivity.getString(R.string.preferences_advanced_settings)) |
| 81 | sl.apply { | 81 | sl.apply { |
| 82 | add( | 82 | add( |
| 83 | SubmenuSetting( | 83 | SubmenuSetting( |
diff --git a/src/android/app/src/main/res/layout/activity_settings.xml b/src/android/app/src/main/res/layout/activity_settings.xml index 6bb9ee9d2..14ae83b04 100644 --- a/src/android/app/src/main/res/layout/activity_settings.xml +++ b/src/android/app/src/main/res/layout/activity_settings.xml | |||
| @@ -35,6 +35,7 @@ | |||
| 35 | android:id="@+id/frame_content" | 35 | android:id="@+id/frame_content" |
| 36 | android:layout_width="match_parent" | 36 | android:layout_width="match_parent" |
| 37 | android:layout_height="match_parent" | 37 | android:layout_height="match_parent" |
| 38 | android:layout_marginHorizontal="12dp" | ||
| 38 | app:layout_behavior="@string/appbar_scrolling_view_behavior" /> | 39 | app:layout_behavior="@string/appbar_scrolling_view_behavior" /> |
| 39 | 40 | ||
| 40 | <View | 41 | <View |
diff --git a/src/android/app/src/main/res/layout/list_item_setting.xml b/src/android/app/src/main/res/layout/list_item_setting.xml index 4ff794338..ec896342b 100644 --- a/src/android/app/src/main/res/layout/list_item_setting.xml +++ b/src/android/app/src/main/res/layout/list_item_setting.xml | |||
| @@ -3,29 +3,29 @@ | |||
| 3 | xmlns:tools="http://schemas.android.com/tools" | 3 | xmlns:tools="http://schemas.android.com/tools" |
| 4 | android:layout_width="match_parent" | 4 | android:layout_width="match_parent" |
| 5 | android:layout_height="wrap_content" | 5 | android:layout_height="wrap_content" |
| 6 | xmlns:app="http://schemas.android.com/apk/res-auto" | ||
| 6 | android:background="?android:attr/selectableItemBackground" | 7 | android:background="?android:attr/selectableItemBackground" |
| 7 | android:clickable="true" | 8 | android:clickable="true" |
| 8 | android:focusable="true" | 9 | android:focusable="true" |
| 9 | android:gravity="center_vertical" | 10 | android:gravity="center_vertical" |
| 10 | android:minHeight="72dp" | 11 | android:minHeight="72dp" |
| 11 | android:paddingBottom="@dimen/spacing_large" | 12 | android:padding="@dimen/spacing_large"> |
| 12 | android:paddingTop="@dimen/spacing_large"> | ||
| 13 | 13 | ||
| 14 | <TextView | 14 | <com.google.android.material.textview.MaterialTextView |
| 15 | android:id="@+id/text_setting_name" | ||
| 16 | style="@style/TextAppearance.Material3.HeadlineMedium" | 15 | style="@style/TextAppearance.Material3.HeadlineMedium" |
| 16 | android:id="@+id/text_setting_name" | ||
| 17 | android:layout_width="0dp" | 17 | android:layout_width="0dp" |
| 18 | android:layout_height="wrap_content" | 18 | android:layout_height="wrap_content" |
| 19 | android:layout_alignParentEnd="true" | 19 | android:layout_alignParentEnd="true" |
| 20 | android:layout_alignParentStart="true" | 20 | android:layout_alignParentStart="true" |
| 21 | android:layout_alignParentTop="true" | 21 | android:layout_alignParentTop="true" |
| 22 | android:layout_marginEnd="@dimen/spacing_large" | ||
| 23 | android:layout_marginStart="@dimen/spacing_large" | ||
| 24 | android:textSize="16sp" | 22 | android:textSize="16sp" |
| 25 | android:textAlignment="viewStart" | 23 | android:textAlignment="viewStart" |
| 24 | app:lineHeight="28dp" | ||
| 26 | tools:text="Setting Name" /> | 25 | tools:text="Setting Name" /> |
| 27 | 26 | ||
| 28 | <TextView | 27 | <TextView |
| 28 | style="@style/TextAppearance.Material3.BodySmall" | ||
| 29 | android:id="@+id/text_setting_description" | 29 | android:id="@+id/text_setting_description" |
| 30 | android:layout_width="wrap_content" | 30 | android:layout_width="wrap_content" |
| 31 | android:layout_height="wrap_content" | 31 | android:layout_height="wrap_content" |
| @@ -33,8 +33,6 @@ | |||
| 33 | android:layout_alignParentStart="true" | 33 | android:layout_alignParentStart="true" |
| 34 | android:layout_alignStart="@+id/text_setting_name" | 34 | android:layout_alignStart="@+id/text_setting_name" |
| 35 | android:layout_below="@+id/text_setting_name" | 35 | android:layout_below="@+id/text_setting_name" |
| 36 | android:layout_marginEnd="@dimen/spacing_large" | ||
| 37 | android:layout_marginStart="@dimen/spacing_large" | ||
| 38 | android:layout_marginTop="@dimen/spacing_small" | 36 | android:layout_marginTop="@dimen/spacing_small" |
| 39 | android:visibility="visible" | 37 | android:visibility="visible" |
| 40 | android:textAlignment="viewStart" | 38 | android:textAlignment="viewStart" |
diff --git a/src/android/app/src/main/res/layout/list_item_setting_switch.xml b/src/android/app/src/main/res/layout/list_item_setting_switch.xml index dbed0948c..599d845ad 100644 --- a/src/android/app/src/main/res/layout/list_item_setting_switch.xml +++ b/src/android/app/src/main/res/layout/list_item_setting_switch.xml | |||
| @@ -3,35 +3,37 @@ | |||
| 3 | xmlns:tools="http://schemas.android.com/tools" | 3 | xmlns:tools="http://schemas.android.com/tools" |
| 4 | android:layout_width="match_parent" | 4 | android:layout_width="match_parent" |
| 5 | android:layout_height="wrap_content" | 5 | android:layout_height="wrap_content" |
| 6 | xmlns:app="http://schemas.android.com/apk/res-auto" | ||
| 6 | android:background="?android:attr/selectableItemBackground" | 7 | android:background="?android:attr/selectableItemBackground" |
| 7 | android:clickable="true" | 8 | android:clickable="true" |
| 8 | android:focusable="true" | 9 | android:focusable="true" |
| 9 | android:minHeight="72dp"> | 10 | android:minHeight="72dp" |
| 11 | android:paddingStart="@dimen/spacing_large" | ||
| 12 | android:paddingEnd="24dp" | ||
| 13 | android:paddingVertical="@dimen/spacing_large"> | ||
| 10 | 14 | ||
| 11 | <com.google.android.material.materialswitch.MaterialSwitch | 15 | <com.google.android.material.materialswitch.MaterialSwitch |
| 12 | android:id="@+id/switch_widget" | 16 | android:id="@+id/switch_widget" |
| 13 | android:layout_width="wrap_content" | 17 | android:layout_width="wrap_content" |
| 14 | android:layout_height="wrap_content" | 18 | android:layout_height="wrap_content" |
| 15 | android:layout_alignParentEnd="true" | 19 | android:layout_alignParentEnd="true" |
| 16 | android:layout_centerVertical="true" | 20 | android:layout_centerVertical="true" /> |
| 17 | android:layout_marginEnd="24dp" /> | ||
| 18 | 21 | ||
| 19 | <TextView | 22 | <com.google.android.material.textview.MaterialTextView |
| 23 | style="@style/TextAppearance.Material3.BodySmall" | ||
| 20 | android:id="@+id/text_setting_description" | 24 | android:id="@+id/text_setting_description" |
| 21 | android:layout_width="wrap_content" | 25 | android:layout_width="wrap_content" |
| 22 | android:layout_height="wrap_content" | 26 | android:layout_height="wrap_content" |
| 23 | android:layout_alignParentStart="true" | 27 | android:layout_alignParentStart="true" |
| 24 | android:layout_alignStart="@+id/text_setting_name" | 28 | android:layout_alignStart="@+id/text_setting_name" |
| 25 | android:layout_below="@+id/text_setting_name" | 29 | android:layout_below="@+id/text_setting_name" |
| 26 | android:layout_marginBottom="@dimen/spacing_large" | ||
| 27 | android:layout_marginEnd="@dimen/spacing_large" | 30 | android:layout_marginEnd="@dimen/spacing_large" |
| 28 | android:layout_marginStart="@dimen/spacing_large" | ||
| 29 | android:layout_marginTop="@dimen/spacing_small" | 31 | android:layout_marginTop="@dimen/spacing_small" |
| 30 | android:layout_toStartOf="@+id/switch_widget" | 32 | android:layout_toStartOf="@+id/switch_widget" |
| 31 | android:textAlignment="viewStart" | 33 | android:textAlignment="viewStart" |
| 32 | tools:text="@string/frame_limit_enable_description" /> | 34 | tools:text="@string/frame_limit_enable_description" /> |
| 33 | 35 | ||
| 34 | <TextView | 36 | <com.google.android.material.textview.MaterialTextView |
| 35 | style="@style/TextAppearance.Material3.HeadlineMedium" | 37 | style="@style/TextAppearance.Material3.HeadlineMedium" |
| 36 | android:id="@+id/text_setting_name" | 38 | android:id="@+id/text_setting_name" |
| 37 | android:layout_width="0dp" | 39 | android:layout_width="0dp" |
| @@ -39,11 +41,10 @@ | |||
| 39 | android:layout_alignParentStart="true" | 41 | android:layout_alignParentStart="true" |
| 40 | android:layout_alignParentTop="true" | 42 | android:layout_alignParentTop="true" |
| 41 | android:layout_marginEnd="@dimen/spacing_large" | 43 | android:layout_marginEnd="@dimen/spacing_large" |
| 42 | android:layout_marginStart="@dimen/spacing_large" | ||
| 43 | android:layout_marginTop="@dimen/spacing_large" | ||
| 44 | android:layout_toStartOf="@+id/switch_widget" | 44 | android:layout_toStartOf="@+id/switch_widget" |
| 45 | android:textSize="16sp" | 45 | android:textSize="16sp" |
| 46 | android:textAlignment="viewStart" | 46 | android:textAlignment="viewStart" |
| 47 | app:lineHeight="28dp" | ||
| 47 | tools:text="@string/frame_limit_enable" /> | 48 | tools:text="@string/frame_limit_enable" /> |
| 48 | 49 | ||
| 49 | </RelativeLayout> | 50 | </RelativeLayout> |
diff --git a/src/android/app/src/main/res/layout/list_item_settings_header.xml b/src/android/app/src/main/res/layout/list_item_settings_header.xml index 9debb7ba5..abd24df6f 100644 --- a/src/android/app/src/main/res/layout/list_item_settings_header.xml +++ b/src/android/app/src/main/res/layout/list_item_settings_header.xml | |||
| @@ -2,16 +2,16 @@ | |||
| 2 | <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" | 2 | <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| 3 | xmlns:tools="http://schemas.android.com/tools" | 3 | xmlns:tools="http://schemas.android.com/tools" |
| 4 | android:layout_width="match_parent" | 4 | android:layout_width="match_parent" |
| 5 | android:layout_height="48dp"> | 5 | android:layout_height="48dp" |
| 6 | android:paddingVertical="4dp" | ||
| 7 | android:paddingHorizontal="@dimen/spacing_large"> | ||
| 6 | 8 | ||
| 7 | <TextView | 9 | <com.google.android.material.textview.MaterialTextView |
| 10 | style="@style/TextAppearance.Material3.TitleSmall" | ||
| 8 | android:id="@+id/text_header_name" | 11 | android:id="@+id/text_header_name" |
| 9 | android:layout_width="match_parent" | 12 | android:layout_width="match_parent" |
| 10 | android:layout_height="wrap_content" | 13 | android:layout_height="wrap_content" |
| 11 | android:layout_gravity="start|center_vertical" | 14 | android:layout_gravity="start|center_vertical" |
| 12 | android:layout_marginHorizontal="@dimen/spacing_large" | ||
| 13 | android:layout_marginBottom="@dimen/spacing_small" | ||
| 14 | android:layout_marginTop="@dimen/spacing_small" | ||
| 15 | android:textColor="?attr/colorPrimary" | 15 | android:textColor="?attr/colorPrimary" |
| 16 | android:textAlignment="viewStart" | 16 | android:textAlignment="viewStart" |
| 17 | android:textStyle="bold" | 17 | android:textStyle="bold" |
diff --git a/src/android/app/src/main/res/values/strings.xml b/src/android/app/src/main/res/values/strings.xml index ed72e571b..e171cf799 100644 --- a/src/android/app/src/main/res/values/strings.xml +++ b/src/android/app/src/main/res/values/strings.xml | |||
| @@ -162,6 +162,7 @@ | |||
| 162 | <string name="installing_driver">Installing driver…</string> | 162 | <string name="installing_driver">Installing driver…</string> |
| 163 | 163 | ||
| 164 | <!-- Preferences Screen --> | 164 | <!-- Preferences Screen --> |
| 165 | <string name="preferences_advanced_settings">Advanced Settings</string> | ||
| 165 | <string name="preferences_settings">Settings</string> | 166 | <string name="preferences_settings">Settings</string> |
| 166 | <string name="preferences_general">General</string> | 167 | <string name="preferences_general">General</string> |
| 167 | <string name="preferences_system">System</string> | 168 | <string name="preferences_system">System</string> |