mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-11-22 16:55:37 +01:00
Merge pull request #11909 from t895/card-grid
android: Break home settings into grid with large screens
This commit is contained in:
commit
2d608cd625
@ -26,7 +26,7 @@ import androidx.fragment.app.Fragment
|
|||||||
import androidx.fragment.app.activityViewModels
|
import androidx.fragment.app.activityViewModels
|
||||||
import androidx.navigation.findNavController
|
import androidx.navigation.findNavController
|
||||||
import androidx.navigation.fragment.findNavController
|
import androidx.navigation.fragment.findNavController
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager
|
import androidx.recyclerview.widget.GridLayoutManager
|
||||||
import com.google.android.material.transition.MaterialSharedAxis
|
import com.google.android.material.transition.MaterialSharedAxis
|
||||||
import org.yuzu.yuzu_emu.BuildConfig
|
import org.yuzu.yuzu_emu.BuildConfig
|
||||||
import org.yuzu.yuzu_emu.HomeNavigationDirections
|
import org.yuzu.yuzu_emu.HomeNavigationDirections
|
||||||
@ -186,7 +186,8 @@ class HomeSettingsFragment : Fragment() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
binding.homeSettingsList.apply {
|
binding.homeSettingsList.apply {
|
||||||
layoutManager = LinearLayoutManager(requireContext())
|
layoutManager =
|
||||||
|
GridLayoutManager(requireContext(), resources.getInteger(R.integer.grid_columns))
|
||||||
adapter = HomeSettingAdapter(
|
adapter = HomeSettingAdapter(
|
||||||
requireActivity() as AppCompatActivity,
|
requireActivity() as AppCompatActivity,
|
||||||
viewLifecycleOwner,
|
viewLifecycleOwner,
|
||||||
|
@ -16,7 +16,8 @@
|
|||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/option_layout"
|
android:id="@+id/option_layout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_vertical">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/option_icon"
|
android:id="@+id/option_icon"
|
||||||
|
Loading…
Reference in New Issue
Block a user