summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorliamwhite <liamwhite@users.noreply.github.com>2023-10-30 00:46:41 +0100
committerGitHub <noreply@github.com>2023-10-30 00:46:41 +0100
commit2d608cd62526a0dbde286c80e714d5b24725a8f9 (patch)
tree04f9f9784fc535785e454063bb8cd88d98ac7842
parentMerge pull request #11904 from ameerj/gl_threaded_opts_on (diff)
parentandroid: Break home settings into grid with large screens (diff)
downloadyuzu-2d608cd62526a0dbde286c80e714d5b24725a8f9.tar
yuzu-2d608cd62526a0dbde286c80e714d5b24725a8f9.tar.gz
yuzu-2d608cd62526a0dbde286c80e714d5b24725a8f9.tar.bz2
yuzu-2d608cd62526a0dbde286c80e714d5b24725a8f9.tar.lz
yuzu-2d608cd62526a0dbde286c80e714d5b24725a8f9.tar.xz
yuzu-2d608cd62526a0dbde286c80e714d5b24725a8f9.tar.zst
yuzu-2d608cd62526a0dbde286c80e714d5b24725a8f9.zip
-rw-r--r--src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/HomeSettingsFragment.kt5
-rw-r--r--src/android/app/src/main/res/layout/card_home_option.xml3
2 files changed, 5 insertions, 3 deletions
diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/HomeSettingsFragment.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/HomeSettingsFragment.kt
index fd9785075..f273c880a 100644
--- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/HomeSettingsFragment.kt
+++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/HomeSettingsFragment.kt
@@ -26,7 +26,7 @@ import androidx.fragment.app.Fragment
import androidx.fragment.app.activityViewModels
import androidx.navigation.findNavController
import androidx.navigation.fragment.findNavController
-import androidx.recyclerview.widget.LinearLayoutManager
+import androidx.recyclerview.widget.GridLayoutManager
import com.google.android.material.transition.MaterialSharedAxis
import org.yuzu.yuzu_emu.BuildConfig
import org.yuzu.yuzu_emu.HomeNavigationDirections
@@ -186,7 +186,8 @@ class HomeSettingsFragment : Fragment() {
}
binding.homeSettingsList.apply {
- layoutManager = LinearLayoutManager(requireContext())
+ layoutManager =
+ GridLayoutManager(requireContext(), resources.getInteger(R.integer.grid_columns))
adapter = HomeSettingAdapter(
requireActivity() as AppCompatActivity,
viewLifecycleOwner,
diff --git a/src/android/app/src/main/res/layout/card_home_option.xml b/src/android/app/src/main/res/layout/card_home_option.xml
index f9f1d89fb..6e8a232f9 100644
--- a/src/android/app/src/main/res/layout/card_home_option.xml
+++ b/src/android/app/src/main/res/layout/card_home_option.xml
@@ -16,7 +16,8 @@
<LinearLayout
android:id="@+id/option_layout"
android:layout_width="match_parent"
- android:layout_height="wrap_content">
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_vertical">
<ImageView
android:id="@+id/option_icon"