diff options
Diffstat (limited to 'src')
13 files changed, 165 insertions, 47 deletions
diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/view/RunnableSetting.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/view/RunnableSetting.kt index 522cc49df..425160024 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/view/RunnableSetting.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/view/RunnableSetting.kt | |||
| @@ -3,10 +3,13 @@ | |||
| 3 | 3 | ||
| 4 | package org.yuzu.yuzu_emu.features.settings.model.view | 4 | package org.yuzu.yuzu_emu.features.settings.model.view |
| 5 | 5 | ||
| 6 | import androidx.annotation.DrawableRes | ||
| 7 | |||
| 6 | class RunnableSetting( | 8 | class RunnableSetting( |
| 7 | titleId: Int, | 9 | titleId: Int, |
| 8 | descriptionId: Int, | 10 | descriptionId: Int, |
| 9 | val isRuntimeRunnable: Boolean, | 11 | val isRuntimeRunnable: Boolean, |
| 12 | @DrawableRes val iconId: Int = 0, | ||
| 10 | val runnable: () -> Unit | 13 | val runnable: () -> Unit |
| 11 | ) : SettingsItem(emptySetting, titleId, descriptionId) { | 14 | ) : SettingsItem(emptySetting, titleId, descriptionId) { |
| 12 | override val type = TYPE_RUNNABLE | 15 | override val type = TYPE_RUNNABLE |
diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/view/SubmenuSetting.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/view/SubmenuSetting.kt index b343e527e..94953b18a 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/view/SubmenuSetting.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/view/SubmenuSetting.kt | |||
| @@ -3,11 +3,14 @@ | |||
| 3 | 3 | ||
| 4 | package org.yuzu.yuzu_emu.features.settings.model.view | 4 | package org.yuzu.yuzu_emu.features.settings.model.view |
| 5 | 5 | ||
| 6 | import androidx.annotation.DrawableRes | ||
| 7 | import androidx.annotation.StringRes | ||
| 6 | import org.yuzu.yuzu_emu.features.settings.model.Settings | 8 | import org.yuzu.yuzu_emu.features.settings.model.Settings |
| 7 | 9 | ||
| 8 | class SubmenuSetting( | 10 | class SubmenuSetting( |
| 9 | titleId: Int, | 11 | @StringRes titleId: Int, |
| 10 | descriptionId: Int, | 12 | @StringRes descriptionId: Int, |
| 13 | @DrawableRes val iconId: Int, | ||
| 11 | val menuKey: Settings.MenuTag | 14 | val menuKey: Settings.MenuTag |
| 12 | ) : SettingsItem(emptySetting, titleId, descriptionId) { | 15 | ) : SettingsItem(emptySetting, titleId, descriptionId) { |
| 13 | override val type = TYPE_SUBMENU | 16 | override val type = TYPE_SUBMENU |
diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsFragment.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsFragment.kt index 70d8ec14b..2b85167a8 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsFragment.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsFragment.kt | |||
| @@ -144,10 +144,9 @@ class SettingsFragment : Fragment() { | |||
| 144 | val leftInsets = barInsets.left + cutoutInsets.left | 144 | val leftInsets = barInsets.left + cutoutInsets.left |
| 145 | val rightInsets = barInsets.right + cutoutInsets.right | 145 | val rightInsets = barInsets.right + cutoutInsets.right |
| 146 | 146 | ||
| 147 | val sideMargin = resources.getDimensionPixelSize(R.dimen.spacing_medlarge) | ||
| 148 | val mlpSettingsList = binding.listSettings.layoutParams as MarginLayoutParams | 147 | val mlpSettingsList = binding.listSettings.layoutParams as MarginLayoutParams |
| 149 | mlpSettingsList.leftMargin = sideMargin + leftInsets | 148 | mlpSettingsList.leftMargin = leftInsets |
| 150 | mlpSettingsList.rightMargin = sideMargin + rightInsets | 149 | mlpSettingsList.rightMargin = rightInsets |
| 151 | binding.listSettings.layoutParams = mlpSettingsList | 150 | binding.listSettings.layoutParams = mlpSettingsList |
| 152 | binding.listSettings.updatePadding( | 151 | binding.listSettings.updatePadding( |
| 153 | bottom = barInsets.bottom | 152 | bottom = barInsets.bottom |
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 4b8adc7a3..8b71e32f3 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 | |||
| @@ -3,7 +3,6 @@ | |||
| 3 | 3 | ||
| 4 | package org.yuzu.yuzu_emu.features.settings.ui | 4 | package org.yuzu.yuzu_emu.features.settings.ui |
| 5 | 5 | ||
| 6 | import android.content.Context | ||
| 7 | import android.content.SharedPreferences | 6 | import android.content.SharedPreferences |
| 8 | import android.os.Build | 7 | import android.os.Build |
| 9 | import android.widget.Toast | 8 | import android.widget.Toast |
| @@ -32,8 +31,6 @@ class SettingsFragmentPresenter( | |||
| 32 | private val preferences: SharedPreferences | 31 | private val preferences: SharedPreferences |
| 33 | get() = PreferenceManager.getDefaultSharedPreferences(YuzuApplication.appContext) | 32 | get() = PreferenceManager.getDefaultSharedPreferences(YuzuApplication.appContext) |
| 34 | 33 | ||
| 35 | private val context: Context get() = YuzuApplication.appContext | ||
| 36 | |||
| 37 | // Extension for populating settings list based on paired settings | 34 | // Extension for populating settings list based on paired settings |
| 38 | fun ArrayList<SettingsItem>.add(key: String) { | 35 | fun ArrayList<SettingsItem>.add(key: String) { |
| 39 | val item = SettingsItem.settingsItems[key]!! | 36 | val item = SettingsItem.settingsItems[key]!! |
| @@ -74,14 +71,45 @@ class SettingsFragmentPresenter( | |||
| 74 | 71 | ||
| 75 | private fun addConfigSettings(sl: ArrayList<SettingsItem>) { | 72 | private fun addConfigSettings(sl: ArrayList<SettingsItem>) { |
| 76 | sl.apply { | 73 | sl.apply { |
| 77 | add(SubmenuSetting(R.string.preferences_system, 0, Settings.MenuTag.SECTION_SYSTEM)) | ||
| 78 | add(SubmenuSetting(R.string.preferences_graphics, 0, Settings.MenuTag.SECTION_RENDERER)) | ||
| 79 | add(SubmenuSetting(R.string.preferences_audio, 0, Settings.MenuTag.SECTION_AUDIO)) | ||
| 80 | add(SubmenuSetting(R.string.preferences_debug, 0, Settings.MenuTag.SECTION_DEBUG)) | ||
| 81 | add( | 74 | add( |
| 82 | RunnableSetting(R.string.reset_to_default, 0, false) { | 75 | SubmenuSetting( |
| 83 | settingsViewModel.setShouldShowResetSettingsDialog(true) | 76 | R.string.preferences_system, |
| 84 | } | 77 | R.string.preferences_system_description, |
| 78 | R.drawable.ic_system_settings, | ||
| 79 | Settings.MenuTag.SECTION_SYSTEM | ||
| 80 | ) | ||
| 81 | ) | ||
| 82 | add( | ||
| 83 | SubmenuSetting( | ||
| 84 | R.string.preferences_graphics, | ||
| 85 | R.string.preferences_graphics_description, | ||
| 86 | R.drawable.ic_graphics, | ||
| 87 | Settings.MenuTag.SECTION_RENDERER | ||
| 88 | ) | ||
| 89 | ) | ||
| 90 | add( | ||
| 91 | SubmenuSetting( | ||
| 92 | R.string.preferences_audio, | ||
| 93 | R.string.preferences_audio_description, | ||
| 94 | R.drawable.ic_audio, | ||
| 95 | Settings.MenuTag.SECTION_AUDIO | ||
| 96 | ) | ||
| 97 | ) | ||
| 98 | add( | ||
| 99 | SubmenuSetting( | ||
| 100 | R.string.preferences_debug, | ||
| 101 | R.string.preferences_debug_description, | ||
| 102 | R.drawable.ic_code, | ||
| 103 | Settings.MenuTag.SECTION_DEBUG | ||
| 104 | ) | ||
| 105 | ) | ||
| 106 | add( | ||
| 107 | RunnableSetting( | ||
| 108 | R.string.reset_to_default, | ||
| 109 | R.string.reset_to_default_description, | ||
| 110 | false, | ||
| 111 | R.drawable.ic_restore | ||
| 112 | ) { settingsViewModel.setShouldShowResetSettingsDialog(true) } | ||
| 85 | ) | 113 | ) |
| 86 | } | 114 | } |
| 87 | } | 115 | } |
diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/viewholder/RunnableViewHolder.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/viewholder/RunnableViewHolder.kt index 83a2e94f1..036195624 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/viewholder/RunnableViewHolder.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/viewholder/RunnableViewHolder.kt | |||
| @@ -4,6 +4,7 @@ | |||
| 4 | package org.yuzu.yuzu_emu.features.settings.ui.viewholder | 4 | package org.yuzu.yuzu_emu.features.settings.ui.viewholder |
| 5 | 5 | ||
| 6 | import android.view.View | 6 | import android.view.View |
| 7 | import androidx.core.content.res.ResourcesCompat | ||
| 7 | import org.yuzu.yuzu_emu.NativeLibrary | 8 | import org.yuzu.yuzu_emu.NativeLibrary |
| 8 | import org.yuzu.yuzu_emu.databinding.ListItemSettingBinding | 9 | import org.yuzu.yuzu_emu.databinding.ListItemSettingBinding |
| 9 | import org.yuzu.yuzu_emu.features.settings.model.view.RunnableSetting | 10 | import org.yuzu.yuzu_emu.features.settings.model.view.RunnableSetting |
| @@ -16,6 +17,19 @@ class RunnableViewHolder(val binding: ListItemSettingBinding, adapter: SettingsA | |||
| 16 | 17 | ||
| 17 | override fun bind(item: SettingsItem) { | 18 | override fun bind(item: SettingsItem) { |
| 18 | setting = item as RunnableSetting | 19 | setting = item as RunnableSetting |
| 20 | if (item.iconId != 0) { | ||
| 21 | binding.icon.visibility = View.VISIBLE | ||
| 22 | binding.icon.setImageDrawable( | ||
| 23 | ResourcesCompat.getDrawable( | ||
| 24 | binding.icon.resources, | ||
| 25 | item.iconId, | ||
| 26 | binding.icon.context.theme | ||
| 27 | ) | ||
| 28 | ) | ||
| 29 | } else { | ||
| 30 | binding.icon.visibility = View.GONE | ||
| 31 | } | ||
| 32 | |||
| 19 | binding.textSettingName.setText(item.nameId) | 33 | binding.textSettingName.setText(item.nameId) |
| 20 | if (item.descriptionId != 0) { | 34 | if (item.descriptionId != 0) { |
| 21 | binding.textSettingDescription.setText(item.descriptionId) | 35 | binding.textSettingDescription.setText(item.descriptionId) |
diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/viewholder/SubmenuViewHolder.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/viewholder/SubmenuViewHolder.kt index 1cf581a9d..8100c65dd 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/viewholder/SubmenuViewHolder.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/viewholder/SubmenuViewHolder.kt | |||
| @@ -4,6 +4,7 @@ | |||
| 4 | package org.yuzu.yuzu_emu.features.settings.ui.viewholder | 4 | package org.yuzu.yuzu_emu.features.settings.ui.viewholder |
| 5 | 5 | ||
| 6 | import android.view.View | 6 | import android.view.View |
| 7 | import androidx.core.content.res.ResourcesCompat | ||
| 7 | import org.yuzu.yuzu_emu.databinding.ListItemSettingBinding | 8 | import org.yuzu.yuzu_emu.databinding.ListItemSettingBinding |
| 8 | import org.yuzu.yuzu_emu.features.settings.model.view.SettingsItem | 9 | import org.yuzu.yuzu_emu.features.settings.model.view.SettingsItem |
| 9 | import org.yuzu.yuzu_emu.features.settings.model.view.SubmenuSetting | 10 | import org.yuzu.yuzu_emu.features.settings.model.view.SubmenuSetting |
| @@ -15,6 +16,19 @@ class SubmenuViewHolder(val binding: ListItemSettingBinding, adapter: SettingsAd | |||
| 15 | 16 | ||
| 16 | override fun bind(item: SettingsItem) { | 17 | override fun bind(item: SettingsItem) { |
| 17 | this.item = item as SubmenuSetting | 18 | this.item = item as SubmenuSetting |
| 19 | if (item.iconId != 0) { | ||
| 20 | binding.icon.visibility = View.VISIBLE | ||
| 21 | binding.icon.setImageDrawable( | ||
| 22 | ResourcesCompat.getDrawable( | ||
| 23 | binding.icon.resources, | ||
| 24 | item.iconId, | ||
| 25 | binding.icon.context.theme | ||
| 26 | ) | ||
| 27 | ) | ||
| 28 | } else { | ||
| 29 | binding.icon.visibility = View.GONE | ||
| 30 | } | ||
| 31 | |||
| 18 | binding.textSettingName.setText(item.nameId) | 32 | binding.textSettingName.setText(item.nameId) |
| 19 | if (item.descriptionId != 0) { | 33 | if (item.descriptionId != 0) { |
| 20 | binding.textSettingDescription.setText(item.descriptionId) | 34 | binding.textSettingDescription.setText(item.descriptionId) |
diff --git a/src/android/app/src/main/res/drawable/ic_audio.xml b/src/android/app/src/main/res/drawable/ic_audio.xml new file mode 100644 index 000000000..e306c3b0c --- /dev/null +++ b/src/android/app/src/main/res/drawable/ic_audio.xml | |||
| @@ -0,0 +1,9 @@ | |||
| 1 | <vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
| 2 | android:width="24dp" | ||
| 3 | android:height="24dp" | ||
| 4 | android:viewportHeight="24" | ||
| 5 | android:viewportWidth="24"> | ||
| 6 | <path | ||
| 7 | android:fillColor="?attr/colorControlNormal" | ||
| 8 | android:pathData="M3,9v6h4l5,5L12,4L7,9L3,9zM16.5,12c0,-1.77 -1.02,-3.29 -2.5,-4.03v8.05c1.48,-0.73 2.5,-2.25 2.5,-4.02zM14,3.23v2.06c2.89,0.86 5,3.54 5,6.71s-2.11,5.85 -5,6.71v2.06c4.01,-0.91 7,-4.49 7,-8.77s-2.99,-7.86 -7,-8.77z" /> | ||
| 9 | </vector> | ||
diff --git a/src/android/app/src/main/res/drawable/ic_code.xml b/src/android/app/src/main/res/drawable/ic_code.xml new file mode 100644 index 000000000..26f83b39b --- /dev/null +++ b/src/android/app/src/main/res/drawable/ic_code.xml | |||
| @@ -0,0 +1,9 @@ | |||
| 1 | <vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
| 2 | android:width="24dp" | ||
| 3 | android:height="24dp" | ||
| 4 | android:viewportWidth="960" | ||
| 5 | android:viewportHeight="960"> | ||
| 6 | <path | ||
| 7 | android:fillColor="?attr/colorControlNormal" | ||
| 8 | android:pathData="M320,720 L80,480l240,-240 57,57 -184,184 183,183 -56,56ZM640,720 L583,663 767,479 584,296 640,240 880,480 640,720Z"/> | ||
| 9 | </vector> | ||
diff --git a/src/android/app/src/main/res/drawable/ic_graphics.xml b/src/android/app/src/main/res/drawable/ic_graphics.xml new file mode 100644 index 000000000..2fdb5a4d6 --- /dev/null +++ b/src/android/app/src/main/res/drawable/ic_graphics.xml | |||
| @@ -0,0 +1,9 @@ | |||
| 1 | <vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
| 2 | android:width="24dp" | ||
| 3 | android:height="24dp" | ||
| 4 | android:viewportWidth="960" | ||
| 5 | android:viewportHeight="960"> | ||
| 6 | <path | ||
| 7 | android:fillColor="?attr/colorControlNormal" | ||
| 8 | android:pathData="M160,840q-33,0 -56.5,-23.5T80,760v-560q0,-33 23.5,-56.5T160,120h560q33,0 56.5,23.5T800,200v80h80v80h-80v80h80v80h-80v80h80v80h-80v80q0,33 -23.5,56.5T720,840L160,840ZM160,760h560v-560L160,200v560ZM240,680h200v-160L240,520v160ZM480,400h160v-120L480,280v120ZM240,480h200v-200L240,280v200ZM480,680h160v-240L480,440v240ZM160,200v560,-560Z"/> | ||
| 9 | </vector> | ||
diff --git a/src/android/app/src/main/res/drawable/ic_system_settings.xml b/src/android/app/src/main/res/drawable/ic_system_settings.xml new file mode 100644 index 000000000..7701a2bab --- /dev/null +++ b/src/android/app/src/main/res/drawable/ic_system_settings.xml | |||
| @@ -0,0 +1,9 @@ | |||
| 1 | <vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
| 2 | android:width="24dp" | ||
| 3 | android:height="24dp" | ||
| 4 | android:viewportWidth="960" | ||
| 5 | android:viewportHeight="960"> | ||
| 6 | <path | ||
| 7 | android:fillColor="?attr/colorControlNormal" | ||
| 8 | android:pathData="M320,960q-17,0 -28.5,-11.5T280,920q0,-17 11.5,-28.5T320,880q17,0 28.5,11.5T360,920q0,17 -11.5,28.5T320,960ZM480,960q-17,0 -28.5,-11.5T440,920q0,-17 11.5,-28.5T480,880q17,0 28.5,11.5T520,920q0,17 -11.5,28.5T480,960ZM640,960q-17,0 -28.5,-11.5T600,920q0,-17 11.5,-28.5T640,880q17,0 28.5,11.5T680,920q0,17 -11.5,28.5T640,960ZM320,800q-33,0 -56.5,-23.5T240,720v-640q0,-33 23.5,-56.5T320,0h320q33,0 56.5,23.5T720,80v640q0,33 -23.5,56.5T640,800L320,800ZM320,720h320v-40L320,680v40ZM320,600h320v-400L320,200v400ZM320,120h320v-40L320,80v40ZM320,120v-40,40ZM320,720v-40,40Z"/> | ||
| 9 | </vector> | ||
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 f1037a740..544280e75 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 | |||
| @@ -10,41 +10,59 @@ | |||
| 10 | android:focusable="true" | 10 | android:focusable="true" |
| 11 | android:gravity="center_vertical" | 11 | android:gravity="center_vertical" |
| 12 | android:minHeight="72dp" | 12 | android:minHeight="72dp" |
| 13 | android:padding="@dimen/spacing_large"> | 13 | android:padding="16dp"> |
| 14 | 14 | ||
| 15 | <LinearLayout | 15 | <LinearLayout |
| 16 | android:layout_width="match_parent" | 16 | android:layout_width="match_parent" |
| 17 | android:layout_height="wrap_content" | 17 | android:layout_height="wrap_content" |
| 18 | android:orientation="vertical"> | 18 | android:orientation="horizontal"> |
| 19 | 19 | ||
| 20 | <com.google.android.material.textview.MaterialTextView | 20 | <ImageView |
| 21 | android:id="@+id/text_setting_name" | 21 | android:id="@+id/icon" |
| 22 | style="@style/TextAppearance.Material3.HeadlineMedium" | 22 | android:layout_width="24dp" |
| 23 | android:layout_width="match_parent" | 23 | android:layout_height="24dp" |
| 24 | android:layout_height="wrap_content" | 24 | android:layout_marginStart="8dp" |
| 25 | android:textAlignment="viewStart" | 25 | android:layout_marginEnd="24dp" |
| 26 | android:textSize="16sp" | 26 | android:layout_gravity="center_vertical" |
| 27 | app:lineHeight="22dp" | 27 | android:visibility="gone" |
| 28 | tools:text="Setting Name" /> | 28 | app:tint="?attr/colorOnSurface" /> |
| 29 | |||
| 30 | <com.google.android.material.textview.MaterialTextView | ||
| 31 | android:id="@+id/text_setting_description" | ||
| 32 | style="@style/TextAppearance.Material3.BodySmall" | ||
| 33 | android:layout_width="match_parent" | ||
| 34 | android:layout_height="wrap_content" | ||
| 35 | android:layout_marginTop="@dimen/spacing_small" | ||
| 36 | android:textAlignment="viewStart" | ||
| 37 | tools:text="@string/app_disclaimer" /> | ||
| 38 | 29 | ||
| 39 | <com.google.android.material.textview.MaterialTextView | 30 | <LinearLayout |
| 40 | android:id="@+id/text_setting_value" | ||
| 41 | style="@style/TextAppearance.Material3.LabelMedium" | ||
| 42 | android:layout_width="match_parent" | 31 | android:layout_width="match_parent" |
| 43 | android:layout_height="wrap_content" | 32 | android:layout_height="wrap_content" |
| 44 | android:layout_marginTop="@dimen/spacing_small" | 33 | android:orientation="vertical"> |
| 45 | android:textAlignment="viewStart" | 34 | |
| 46 | android:textStyle="bold" | 35 | <com.google.android.material.textview.MaterialTextView |
| 47 | tools:text="1x" /> | 36 | android:id="@+id/text_setting_name" |
| 37 | style="@style/TextAppearance.Material3.HeadlineMedium" | ||
| 38 | android:layout_width="match_parent" | ||
| 39 | android:layout_height="wrap_content" | ||
| 40 | android:textAlignment="viewStart" | ||
| 41 | android:textSize="17sp" | ||
| 42 | app:lineHeight="22dp" | ||
| 43 | tools:text="Setting Name" /> | ||
| 44 | |||
| 45 | <com.google.android.material.textview.MaterialTextView | ||
| 46 | android:id="@+id/text_setting_description" | ||
| 47 | style="@style/TextAppearance.Material3.BodySmall" | ||
| 48 | android:layout_width="match_parent" | ||
| 49 | android:layout_height="wrap_content" | ||
| 50 | android:layout_marginTop="@dimen/spacing_small" | ||
| 51 | android:textAlignment="viewStart" | ||
| 52 | tools:text="@string/app_disclaimer" /> | ||
| 53 | |||
| 54 | <com.google.android.material.textview.MaterialTextView | ||
| 55 | android:id="@+id/text_setting_value" | ||
| 56 | style="@style/TextAppearance.Material3.LabelMedium" | ||
| 57 | android:layout_width="match_parent" | ||
| 58 | android:layout_height="wrap_content" | ||
| 59 | android:layout_marginTop="@dimen/spacing_small" | ||
| 60 | android:textAlignment="viewStart" | ||
| 61 | android:textStyle="bold" | ||
| 62 | android:textSize="13sp" | ||
| 63 | tools:text="1x" /> | ||
| 64 | |||
| 65 | </LinearLayout> | ||
| 48 | 66 | ||
| 49 | </LinearLayout> | 67 | </LinearLayout> |
| 50 | 68 | ||
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 a5767adee..a8f5aff78 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 | |||
| @@ -8,9 +8,7 @@ | |||
| 8 | android:clickable="true" | 8 | android:clickable="true" |
| 9 | android:focusable="true" | 9 | android:focusable="true" |
| 10 | android:minHeight="72dp" | 10 | android:minHeight="72dp" |
| 11 | android:paddingVertical="@dimen/spacing_large" | 11 | android:padding="16dp"> |
| 12 | android:paddingStart="@dimen/spacing_large" | ||
| 13 | android:paddingEnd="24dp"> | ||
| 14 | 12 | ||
| 15 | <com.google.android.material.materialswitch.MaterialSwitch | 13 | <com.google.android.material.materialswitch.MaterialSwitch |
| 16 | android:id="@+id/switch_widget" | 14 | android:id="@+id/switch_widget" |
| @@ -24,7 +22,7 @@ | |||
| 24 | android:layout_height="wrap_content" | 22 | android:layout_height="wrap_content" |
| 25 | android:layout_alignParentTop="true" | 23 | android:layout_alignParentTop="true" |
| 26 | android:layout_centerVertical="true" | 24 | android:layout_centerVertical="true" |
| 27 | android:layout_marginEnd="@dimen/spacing_large" | 25 | android:layout_marginEnd="24dp" |
| 28 | android:layout_toStartOf="@+id/switch_widget" | 26 | android:layout_toStartOf="@+id/switch_widget" |
| 29 | android:gravity="center_vertical" | 27 | android:gravity="center_vertical" |
| 30 | android:orientation="vertical"> | 28 | android:orientation="vertical"> |
| @@ -35,7 +33,7 @@ | |||
| 35 | android:layout_width="wrap_content" | 33 | android:layout_width="wrap_content" |
| 36 | android:layout_height="wrap_content" | 34 | android:layout_height="wrap_content" |
| 37 | android:textAlignment="viewStart" | 35 | android:textAlignment="viewStart" |
| 38 | android:textSize="16sp" | 36 | android:textSize="17sp" |
| 39 | app:lineHeight="28dp" | 37 | app:lineHeight="28dp" |
| 40 | tools:text="@string/frame_limit_enable" /> | 38 | tools:text="@string/frame_limit_enable" /> |
| 41 | 39 | ||
diff --git a/src/android/app/src/main/res/values/strings.xml b/src/android/app/src/main/res/values/strings.xml index c551a6106..98c3f20f8 100644 --- a/src/android/app/src/main/res/values/strings.xml +++ b/src/android/app/src/main/res/values/strings.xml | |||
| @@ -240,6 +240,7 @@ | |||
| 240 | <string name="shutting_down">Shutting down…</string> | 240 | <string name="shutting_down">Shutting down…</string> |
| 241 | <string name="reset_setting_confirmation">Do you want to reset this setting back to its default value?</string> | 241 | <string name="reset_setting_confirmation">Do you want to reset this setting back to its default value?</string> |
| 242 | <string name="reset_to_default">Reset to default</string> | 242 | <string name="reset_to_default">Reset to default</string> |
| 243 | <string name="reset_to_default_description">Resets all advanced settings</string> | ||
| 243 | <string name="reset_all_settings">Reset all settings?</string> | 244 | <string name="reset_all_settings">Reset all settings?</string> |
| 244 | <string name="reset_all_settings_description">All advanced settings will be reset to their default configuration. This can not be undone.</string> | 245 | <string name="reset_all_settings_description">All advanced settings will be reset to their default configuration. This can not be undone.</string> |
| 245 | <string name="settings_reset">Settings reset</string> | 246 | <string name="settings_reset">Settings reset</string> |
| @@ -271,10 +272,14 @@ | |||
| 271 | <string name="preferences_settings">Settings</string> | 272 | <string name="preferences_settings">Settings</string> |
| 272 | <string name="preferences_general">General</string> | 273 | <string name="preferences_general">General</string> |
| 273 | <string name="preferences_system">System</string> | 274 | <string name="preferences_system">System</string> |
| 275 | <string name="preferences_system_description">Docked mode, region, language</string> | ||
| 274 | <string name="preferences_graphics">Graphics</string> | 276 | <string name="preferences_graphics">Graphics</string> |
| 277 | <string name="preferences_graphics_description">Accuracy level, resolution, shader cache</string> | ||
| 275 | <string name="preferences_audio">Audio</string> | 278 | <string name="preferences_audio">Audio</string> |
| 279 | <string name="preferences_audio_description">Output engine, volume</string> | ||
| 276 | <string name="preferences_theme">Theme and color</string> | 280 | <string name="preferences_theme">Theme and color</string> |
| 277 | <string name="preferences_debug">Debug</string> | 281 | <string name="preferences_debug">Debug</string> |
| 282 | <string name="preferences_debug_description">CPU/GPU debugging, graphics API, fastmem</string> | ||
| 278 | 283 | ||
| 279 | <!-- ROM loading errors --> | 284 | <!-- ROM loading errors --> |
| 280 | <string name="loader_error_encrypted">Your ROM is encrypted</string> | 285 | <string name="loader_error_encrypted">Your ROM is encrypted</string> |