Browse Source
Merge pull request #11909 from t895/card-grid
android: Break home settings into grid with large screens
pull/15/merge
liamwhite
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
5 additions and
3 deletions
-
src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/HomeSettingsFragment.kt
-
src/android/app/src/main/res/layout/card_home_option.xml
|
|
|
@ -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, |
|
|
|
|
|
|
|
@ -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" |
|
|
|
|