diff options
| author | 2023-03-13 23:47:39 -0400 | |
|---|---|---|
| committer | 2023-06-03 00:05:43 -0700 | |
| commit | f40059e4babb4db53bfe58e360c787e80ca51398 (patch) | |
| tree | fbd81dc4420704d55252c1717d5323df9dccef3c /src/android | |
| parent | android: Use Material 3 components (diff) | |
| download | yuzu-f40059e4babb4db53bfe58e360c787e80ca51398.tar.gz yuzu-f40059e4babb4db53bfe58e360c787e80ca51398.tar.xz yuzu-f40059e4babb4db53bfe58e360c787e80ca51398.zip | |
android: Use edge to edge
Diffstat (limited to 'src/android')
9 files changed, 110 insertions, 21 deletions
diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsActivity.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsActivity.kt index 1705a72e8..e403aa6d7 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsActivity.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsActivity.kt | |||
| @@ -8,20 +8,24 @@ import android.content.Intent | |||
| 8 | import android.content.IntentFilter | 8 | import android.content.IntentFilter |
| 9 | import android.os.Bundle | 9 | import android.os.Bundle |
| 10 | import android.view.Menu | 10 | import android.view.Menu |
| 11 | import android.view.View | ||
| 12 | import android.widget.FrameLayout | ||
| 11 | import android.widget.Toast | 13 | import android.widget.Toast |
| 12 | import androidx.appcompat.app.AlertDialog | 14 | import androidx.appcompat.app.AlertDialog |
| 13 | import androidx.appcompat.app.AppCompatActivity | 15 | import androidx.appcompat.app.AppCompatActivity |
| 16 | import androidx.core.view.ViewCompat | ||
| 17 | import androidx.core.view.WindowCompat | ||
| 18 | import androidx.core.view.WindowInsetsCompat | ||
| 19 | import androidx.core.view.updatePadding | ||
| 14 | import androidx.localbroadcastmanager.content.LocalBroadcastManager | 20 | import androidx.localbroadcastmanager.content.LocalBroadcastManager |
| 21 | import com.google.android.material.appbar.AppBarLayout | ||
| 15 | import com.google.android.material.dialog.MaterialAlertDialogBuilder | 22 | import com.google.android.material.dialog.MaterialAlertDialogBuilder |
| 16 | import com.google.android.material.progressindicator.LinearProgressIndicator | 23 | import com.google.android.material.progressindicator.LinearProgressIndicator |
| 17 | import org.yuzu.yuzu_emu.NativeLibrary | 24 | import org.yuzu.yuzu_emu.NativeLibrary |
| 18 | import org.yuzu.yuzu_emu.R | 25 | import org.yuzu.yuzu_emu.R |
| 19 | import org.yuzu.yuzu_emu.features.settings.model.Settings | 26 | import org.yuzu.yuzu_emu.features.settings.model.Settings |
| 20 | import org.yuzu.yuzu_emu.features.settings.ui.SettingsFragment.Companion.newInstance | 27 | import org.yuzu.yuzu_emu.features.settings.ui.SettingsFragment.Companion.newInstance |
| 21 | import org.yuzu.yuzu_emu.utils.DirectoryInitialization | 28 | import org.yuzu.yuzu_emu.utils.* |
| 22 | import org.yuzu.yuzu_emu.utils.DirectoryStateReceiver | ||
| 23 | import org.yuzu.yuzu_emu.utils.EmulationMenuSettings | ||
| 24 | import org.yuzu.yuzu_emu.utils.ThemeHelper | ||
| 25 | 29 | ||
| 26 | class SettingsActivity : AppCompatActivity(), SettingsActivityView { | 30 | class SettingsActivity : AppCompatActivity(), SettingsActivityView { |
| 27 | private val presenter = SettingsActivityPresenter(this) | 31 | private val presenter = SettingsActivityPresenter(this) |
| @@ -32,6 +36,9 @@ class SettingsActivity : AppCompatActivity(), SettingsActivityView { | |||
| 32 | 36 | ||
| 33 | super.onCreate(savedInstanceState) | 37 | super.onCreate(savedInstanceState) |
| 34 | setContentView(R.layout.activity_settings) | 38 | setContentView(R.layout.activity_settings) |
| 39 | |||
| 40 | WindowCompat.setDecorFitsSystemWindows(window, false) | ||
| 41 | |||
| 35 | val launcher = intent | 42 | val launcher = intent |
| 36 | val gameID = launcher.getStringExtra(ARG_GAME_ID) | 43 | val gameID = launcher.getStringExtra(ARG_GAME_ID) |
| 37 | val menuTag = launcher.getStringExtra(ARG_MENU_TAG) | 44 | val menuTag = launcher.getStringExtra(ARG_MENU_TAG) |
| @@ -40,6 +47,8 @@ class SettingsActivity : AppCompatActivity(), SettingsActivityView { | |||
| 40 | // Show "Back" button in the action bar for navigation | 47 | // Show "Back" button in the action bar for navigation |
| 41 | setSupportActionBar(findViewById(R.id.toolbar_settings)) | 48 | setSupportActionBar(findViewById(R.id.toolbar_settings)) |
| 42 | supportActionBar!!.setDisplayHomeAsUpEnabled(true) | 49 | supportActionBar!!.setDisplayHomeAsUpEnabled(true) |
| 50 | |||
| 51 | setInsets() | ||
| 43 | } | 52 | } |
| 44 | 53 | ||
| 45 | override fun onSupportNavigateUp(): Boolean { | 54 | override fun onSupportNavigateUp(): Boolean { |
| @@ -185,6 +194,17 @@ class SettingsActivity : AppCompatActivity(), SettingsActivityView { | |||
| 185 | private val fragment: SettingsFragment? | 194 | private val fragment: SettingsFragment? |
| 186 | get() = supportFragmentManager.findFragmentByTag(FRAGMENT_TAG) as SettingsFragment? | 195 | get() = supportFragmentManager.findFragmentByTag(FRAGMENT_TAG) as SettingsFragment? |
| 187 | 196 | ||
| 197 | private fun setInsets() { | ||
| 198 | val appBar = findViewById<AppBarLayout>(R.id.appbar_settings) | ||
| 199 | val frame = findViewById<FrameLayout>(R.id.frame_content) | ||
| 200 | ViewCompat.setOnApplyWindowInsetsListener(frame) { view: View, windowInsets: WindowInsetsCompat -> | ||
| 201 | val insets = windowInsets.getInsets(WindowInsetsCompat.Type.systemBars()) | ||
| 202 | view.updatePadding(left = insets.left, right = insets.right) | ||
| 203 | InsetsHelper.insetAppBar(insets, appBar) | ||
| 204 | windowInsets | ||
| 205 | } | ||
| 206 | } | ||
| 207 | |||
| 188 | companion object { | 208 | companion object { |
| 189 | private const val ARG_MENU_TAG = "menu_tag" | 209 | private const val ARG_MENU_TAG = "menu_tag" |
| 190 | private const val ARG_GAME_ID = "game_id" | 210 | private const val ARG_GAME_ID = "game_id" |
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 fe04c9651..bef5b9705 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 | |||
| @@ -8,6 +8,9 @@ import android.os.Bundle | |||
| 8 | import android.view.LayoutInflater | 8 | import android.view.LayoutInflater |
| 9 | import android.view.View | 9 | import android.view.View |
| 10 | import android.view.ViewGroup | 10 | import android.view.ViewGroup |
| 11 | import androidx.core.view.ViewCompat | ||
| 12 | import androidx.core.view.WindowInsetsCompat | ||
| 13 | import androidx.core.view.updatePadding | ||
| 11 | import androidx.fragment.app.Fragment | 14 | import androidx.fragment.app.Fragment |
| 12 | import androidx.fragment.app.FragmentActivity | 15 | import androidx.fragment.app.FragmentActivity |
| 13 | import androidx.recyclerview.widget.LinearLayoutManager | 16 | import androidx.recyclerview.widget.LinearLayoutManager |
| @@ -25,6 +28,8 @@ class SettingsFragment : Fragment(), SettingsFragmentView { | |||
| 25 | private var activityView: SettingsActivityView? = null | 28 | private var activityView: SettingsActivityView? = null |
| 26 | private var adapter: SettingsAdapter? = null | 29 | private var adapter: SettingsAdapter? = null |
| 27 | 30 | ||
| 31 | private lateinit var recyclerView: RecyclerView | ||
| 32 | |||
| 28 | override fun onAttach(context: Context) { | 33 | override fun onAttach(context: Context) { |
| 29 | super.onAttach(context) | 34 | super.onAttach(context) |
| 30 | activityView = context as SettingsActivityView | 35 | activityView = context as SettingsActivityView |
| @@ -50,7 +55,7 @@ class SettingsFragment : Fragment(), SettingsFragmentView { | |||
| 50 | 55 | ||
| 51 | override fun onViewCreated(view: View, savedInstanceState: Bundle?) { | 56 | override fun onViewCreated(view: View, savedInstanceState: Bundle?) { |
| 52 | val manager = LinearLayoutManager(activity) | 57 | val manager = LinearLayoutManager(activity) |
| 53 | val recyclerView = view.findViewById<RecyclerView>(R.id.list_settings) | 58 | recyclerView = view.findViewById(R.id.list_settings) |
| 54 | recyclerView.adapter = adapter | 59 | recyclerView.adapter = adapter |
| 55 | recyclerView.layoutManager = manager | 60 | recyclerView.layoutManager = manager |
| 56 | val dividerDecoration = MaterialDividerItemDecoration(requireContext(), LinearLayoutManager.VERTICAL) | 61 | val dividerDecoration = MaterialDividerItemDecoration(requireContext(), LinearLayoutManager.VERTICAL) |
| @@ -58,6 +63,8 @@ class SettingsFragment : Fragment(), SettingsFragmentView { | |||
| 58 | recyclerView.addItemDecoration(dividerDecoration) | 63 | recyclerView.addItemDecoration(dividerDecoration) |
| 59 | val activity = activity as SettingsActivityView? | 64 | val activity = activity as SettingsActivityView? |
| 60 | presenter.onViewCreated(activity!!.settings) | 65 | presenter.onViewCreated(activity!!.settings) |
| 66 | |||
| 67 | setInsets() | ||
| 61 | } | 68 | } |
| 62 | 69 | ||
| 63 | override fun onDetach() { | 70 | override fun onDetach() { |
| @@ -106,6 +113,14 @@ class SettingsFragment : Fragment(), SettingsFragmentView { | |||
| 106 | activityView!!.onSettingChanged() | 113 | activityView!!.onSettingChanged() |
| 107 | } | 114 | } |
| 108 | 115 | ||
| 116 | private fun setInsets() { | ||
| 117 | ViewCompat.setOnApplyWindowInsetsListener(recyclerView) { view: View, windowInsets: WindowInsetsCompat -> | ||
| 118 | val insets = windowInsets.getInsets(WindowInsetsCompat.Type.systemBars()) | ||
| 119 | view.updatePadding(bottom = insets.bottom) | ||
| 120 | windowInsets | ||
| 121 | } | ||
| 122 | } | ||
| 123 | |||
| 109 | companion object { | 124 | companion object { |
| 110 | private const val ARGUMENT_MENU_TAG = "menu_tag" | 125 | private const val ARGUMENT_MENU_TAG = "menu_tag" |
| 111 | private const val ARGUMENT_GAME_ID = "game_id" | 126 | private const val ARGUMENT_GAME_ID = "game_id" |
diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/ui/main/MainActivity.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/ui/main/MainActivity.kt index 266403885..ba60a26e8 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/ui/main/MainActivity.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/ui/main/MainActivity.kt | |||
| @@ -9,9 +9,17 @@ import android.net.Uri | |||
| 9 | import android.os.Bundle | 9 | import android.os.Bundle |
| 10 | import android.view.Menu | 10 | import android.view.Menu |
| 11 | import android.view.MenuItem | 11 | import android.view.MenuItem |
| 12 | import android.view.View | ||
| 13 | import android.widget.FrameLayout | ||
| 12 | import android.widget.Toast | 14 | import android.widget.Toast |
| 13 | import androidx.appcompat.app.AppCompatActivity | 15 | import androidx.appcompat.app.AppCompatActivity |
| 14 | import androidx.appcompat.widget.Toolbar | 16 | import androidx.appcompat.widget.Toolbar |
| 17 | import androidx.core.view.ViewCompat | ||
| 18 | import androidx.core.view.WindowCompat | ||
| 19 | import androidx.core.view.WindowInsetsCompat | ||
| 20 | import androidx.core.view.updatePadding | ||
| 21 | import com.google.android.material.appbar.AppBarLayout | ||
| 22 | import com.google.android.material.color.MaterialColors | ||
| 15 | import com.google.android.material.dialog.MaterialAlertDialogBuilder | 23 | import com.google.android.material.dialog.MaterialAlertDialogBuilder |
| 16 | import org.yuzu.yuzu_emu.NativeLibrary | 24 | import org.yuzu.yuzu_emu.NativeLibrary |
| 17 | import org.yuzu.yuzu_emu.R | 25 | import org.yuzu.yuzu_emu.R |
| @@ -31,6 +39,9 @@ class MainActivity : AppCompatActivity(), MainView { | |||
| 31 | 39 | ||
| 32 | super.onCreate(savedInstanceState) | 40 | super.onCreate(savedInstanceState) |
| 33 | setContentView(R.layout.activity_main) | 41 | setContentView(R.layout.activity_main) |
| 42 | |||
| 43 | WindowCompat.setDecorFitsSystemWindows(window, false) | ||
| 44 | |||
| 34 | findViews() | 45 | findViews() |
| 35 | setSupportActionBar(toolbar) | 46 | setSupportActionBar(toolbar) |
| 36 | presenter.onCreate() | 47 | presenter.onCreate() |
| @@ -50,6 +61,8 @@ class MainActivity : AppCompatActivity(), MainView { | |||
| 50 | 61 | ||
| 51 | // Dismiss previous notifications (should not happen unless a crash occurred) | 62 | // Dismiss previous notifications (should not happen unless a crash occurred) |
| 52 | EmulationActivity.tryDismissRunningNotification(this) | 63 | EmulationActivity.tryDismissRunningNotification(this) |
| 64 | |||
| 65 | setInsets() | ||
| 53 | } | 66 | } |
| 54 | 67 | ||
| 55 | override fun onSaveInstanceState(outState: Bundle) { | 68 | override fun onSaveInstanceState(outState: Bundle) { |
| @@ -230,4 +243,15 @@ class MainActivity : AppCompatActivity(), MainView { | |||
| 230 | EmulationActivity.tryDismissRunningNotification(this) | 243 | EmulationActivity.tryDismissRunningNotification(this) |
| 231 | super.onDestroy() | 244 | super.onDestroy() |
| 232 | } | 245 | } |
| 246 | |||
| 247 | private fun setInsets() { | ||
| 248 | val appBar = findViewById<AppBarLayout>(R.id.appbar_main) | ||
| 249 | val frame = findViewById<FrameLayout>(R.id.games_platform_frame) | ||
| 250 | ViewCompat.setOnApplyWindowInsetsListener(frame) { view: View, windowInsets: WindowInsetsCompat -> | ||
| 251 | val insets = windowInsets.getInsets(WindowInsetsCompat.Type.systemBars()) | ||
| 252 | view.updatePadding(left = insets.left, right = insets.right) | ||
| 253 | InsetsHelper.insetAppBar(insets, appBar) | ||
| 254 | windowInsets | ||
| 255 | } | ||
| 256 | } | ||
| 233 | } | 257 | } |
diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/ui/platform/PlatformGamesFragment.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/ui/platform/PlatformGamesFragment.kt index efd77ea7e..42b61a81a 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/ui/platform/PlatformGamesFragment.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/ui/platform/PlatformGamesFragment.kt | |||
| @@ -10,6 +10,9 @@ import android.view.View | |||
| 10 | import android.view.ViewGroup | 10 | import android.view.ViewGroup |
| 11 | import android.view.ViewTreeObserver.OnGlobalLayoutListener | 11 | import android.view.ViewTreeObserver.OnGlobalLayoutListener |
| 12 | import android.widget.TextView | 12 | import android.widget.TextView |
| 13 | import androidx.core.view.ViewCompat | ||
| 14 | import androidx.core.view.WindowInsetsCompat | ||
| 15 | import androidx.core.view.updatePadding | ||
| 13 | import androidx.fragment.app.Fragment | 16 | import androidx.fragment.app.Fragment |
| 14 | import androidx.recyclerview.widget.GridLayoutManager | 17 | import androidx.recyclerview.widget.GridLayoutManager |
| 15 | import androidx.recyclerview.widget.RecyclerView | 18 | import androidx.recyclerview.widget.RecyclerView |
| @@ -17,6 +20,7 @@ import androidx.swiperefreshlayout.widget.SwipeRefreshLayout | |||
| 17 | import org.yuzu.yuzu_emu.R | 20 | import org.yuzu.yuzu_emu.R |
| 18 | import org.yuzu.yuzu_emu.YuzuApplication | 21 | import org.yuzu.yuzu_emu.YuzuApplication |
| 19 | import org.yuzu.yuzu_emu.adapters.GameAdapter | 22 | import org.yuzu.yuzu_emu.adapters.GameAdapter |
| 23 | import org.yuzu.yuzu_emu.utils.InsetsHelper | ||
| 20 | 24 | ||
| 21 | class PlatformGamesFragment : Fragment(), PlatformGamesView { | 25 | class PlatformGamesFragment : Fragment(), PlatformGamesView { |
| 22 | private val presenter = PlatformGamesPresenter(this) | 26 | private val presenter = PlatformGamesPresenter(this) |
| @@ -65,6 +69,8 @@ class PlatformGamesFragment : Fragment(), PlatformGamesView { | |||
| 65 | refresh() | 69 | refresh() |
| 66 | pullToRefresh.isRefreshing = false | 70 | pullToRefresh.isRefreshing = false |
| 67 | } | 71 | } |
| 72 | |||
| 73 | setInsets() | ||
| 68 | } | 74 | } |
| 69 | 75 | ||
| 70 | override fun refresh() { | 76 | override fun refresh() { |
| @@ -91,6 +97,14 @@ class PlatformGamesFragment : Fragment(), PlatformGamesView { | |||
| 91 | textView = root.findViewById(R.id.gamelist_empty_text) | 97 | textView = root.findViewById(R.id.gamelist_empty_text) |
| 92 | } | 98 | } |
| 93 | 99 | ||
| 100 | private fun setInsets() { | ||
| 101 | ViewCompat.setOnApplyWindowInsetsListener(recyclerView) { view: View, windowInsets: WindowInsetsCompat -> | ||
| 102 | val insets = windowInsets.getInsets(WindowInsetsCompat.Type.systemBars()) | ||
| 103 | view.updatePadding(bottom = insets.bottom) | ||
| 104 | windowInsets | ||
| 105 | } | ||
| 106 | } | ||
| 107 | |||
| 94 | companion object { | 108 | companion object { |
| 95 | const val TAG = "PlatformGamesFragment" | 109 | const val TAG = "PlatformGamesFragment" |
| 96 | } | 110 | } |
diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/InsetsHelper.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/InsetsHelper.kt index 3f9acc5b0..2eae77a1d 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/InsetsHelper.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/InsetsHelper.kt | |||
| @@ -1,12 +1,22 @@ | |||
| 1 | package org.yuzu.yuzu_emu.utils | 1 | package org.yuzu.yuzu_emu.utils |
| 2 | 2 | ||
| 3 | import android.content.Context | 3 | import android.content.Context |
| 4 | import android.view.ViewGroup.MarginLayoutParams | ||
| 5 | import androidx.core.graphics.Insets | ||
| 6 | import com.google.android.material.appbar.AppBarLayout | ||
| 4 | 7 | ||
| 5 | object InsetsHelper { | 8 | object InsetsHelper { |
| 6 | const val THREE_BUTTON_NAVIGATION = 0 | 9 | const val THREE_BUTTON_NAVIGATION = 0 |
| 7 | const val TWO_BUTTON_NAVIGATION = 1 | 10 | const val TWO_BUTTON_NAVIGATION = 1 |
| 8 | const val GESTURE_NAVIGATION = 2 | 11 | const val GESTURE_NAVIGATION = 2 |
| 9 | 12 | ||
| 13 | fun insetAppBar(insets: Insets, appBarLayout: AppBarLayout) { | ||
| 14 | val mlpAppBar = appBarLayout.layoutParams as MarginLayoutParams | ||
| 15 | mlpAppBar.leftMargin = insets.left | ||
| 16 | mlpAppBar.rightMargin = insets.right | ||
| 17 | appBarLayout.layoutParams = mlpAppBar | ||
| 18 | } | ||
| 19 | |||
| 10 | fun getSystemGestureType(context: Context): Int { | 20 | fun getSystemGestureType(context: Context): Int { |
| 11 | val resources = context.resources | 21 | val resources = context.resources |
| 12 | val resourceId = | 22 | val resourceId = |
diff --git a/src/android/app/src/main/res/layout/activity_main.xml b/src/android/app/src/main/res/layout/activity_main.xml index 34abf955d..059aaa9b4 100644 --- a/src/android/app/src/main/res/layout/activity_main.xml +++ b/src/android/app/src/main/res/layout/activity_main.xml | |||
| @@ -9,6 +9,7 @@ | |||
| 9 | android:id="@+id/appbar_main" | 9 | android:id="@+id/appbar_main" |
| 10 | android:layout_width="match_parent" | 10 | android:layout_width="match_parent" |
| 11 | android:layout_height="wrap_content" | 11 | android:layout_height="wrap_content" |
| 12 | android:fitsSystemWindows="true" | ||
| 12 | app:liftOnScrollTargetViewId="@id/grid_games"> | 13 | app:liftOnScrollTargetViewId="@id/grid_games"> |
| 13 | 14 | ||
| 14 | <androidx.appcompat.widget.Toolbar | 15 | <androidx.appcompat.widget.Toolbar |
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 449deab08..dc23200ea 100644 --- a/src/android/app/src/main/res/layout/activity_settings.xml +++ b/src/android/app/src/main/res/layout/activity_settings.xml | |||
| @@ -9,7 +9,8 @@ | |||
| 9 | <com.google.android.material.appbar.AppBarLayout | 9 | <com.google.android.material.appbar.AppBarLayout |
| 10 | android:id="@+id/appbar_settings" | 10 | android:id="@+id/appbar_settings" |
| 11 | android:layout_width="match_parent" | 11 | android:layout_width="match_parent" |
| 12 | android:layout_height="wrap_content"> | 12 | android:layout_height="wrap_content" |
| 13 | android:fitsSystemWindows="true"> | ||
| 13 | 14 | ||
| 14 | <androidx.appcompat.widget.Toolbar | 15 | <androidx.appcompat.widget.Toolbar |
| 15 | android:id="@+id/toolbar_settings" | 16 | android:id="@+id/toolbar_settings" |
diff --git a/src/android/app/src/main/res/layout/fragment_grid.xml b/src/android/app/src/main/res/layout/fragment_grid.xml index 01399e18d..bfb670b6d 100644 --- a/src/android/app/src/main/res/layout/fragment_grid.xml +++ b/src/android/app/src/main/res/layout/fragment_grid.xml | |||
| @@ -1,13 +1,14 @@ | |||
| 1 | <?xml version="1.0" encoding="utf-8"?> | 1 | <?xml version="1.0" encoding="utf-8"?> |
| 2 | <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" | 2 | <FrameLayout |
| 3 | xmlns:tools="http://schemas.android.com/tools" | 3 | xmlns:android="http://schemas.android.com/apk/res/android" |
| 4 | android:layout_width="match_parent" | 4 | xmlns:tools="http://schemas.android.com/tools" |
| 5 | android:layout_height="match_parent"> | 5 | android:layout_width="match_parent" |
| 6 | android:layout_height="match_parent"> | ||
| 6 | 7 | ||
| 7 | <androidx.swiperefreshlayout.widget.SwipeRefreshLayout | 8 | <androidx.swiperefreshlayout.widget.SwipeRefreshLayout |
| 8 | android:id="@+id/swipe_refresh" | 9 | android:id="@+id/swipe_refresh" |
| 9 | android:layout_width="wrap_content" | 10 | android:layout_width="match_parent" |
| 10 | android:layout_height="wrap_content"> | 11 | android:layout_height="match_parent"> |
| 11 | 12 | ||
| 12 | <RelativeLayout | 13 | <RelativeLayout |
| 13 | android:layout_width="match_parent" | 14 | android:layout_width="match_parent" |
| @@ -17,18 +18,20 @@ | |||
| 17 | android:id="@+id/gamelist_empty_text" | 18 | android:id="@+id/gamelist_empty_text" |
| 18 | android:layout_width="match_parent" | 19 | android:layout_width="match_parent" |
| 19 | android:layout_height="match_parent" | 20 | android:layout_height="match_parent" |
| 21 | android:gravity="center" | ||
| 20 | android:text="@string/empty_gamelist" | 22 | android:text="@string/empty_gamelist" |
| 21 | android:visibility="gone" | ||
| 22 | android:textSize="18sp" | 23 | android:textSize="18sp" |
| 23 | android:gravity="center" /> | 24 | android:visibility="gone" /> |
| 25 | |||
| 26 | <androidx.recyclerview.widget.RecyclerView | ||
| 27 | android:id="@+id/grid_games" | ||
| 28 | android:layout_width="match_parent" | ||
| 29 | android:layout_height="match_parent" | ||
| 30 | android:clipToPadding="false" | ||
| 31 | tools:listitem="@layout/card_game" /> | ||
| 24 | 32 | ||
| 25 | <androidx.recyclerview.widget.RecyclerView | ||
| 26 | android:id="@+id/grid_games" | ||
| 27 | android:layout_width="match_parent" | ||
| 28 | android:layout_height="match_parent" | ||
| 29 | android:clipToPadding="false" | ||
| 30 | tools:listitem="@layout/card_game" /> | ||
| 31 | </RelativeLayout> | 33 | </RelativeLayout> |
| 32 | 34 | ||
| 33 | </androidx.swiperefreshlayout.widget.SwipeRefreshLayout> | 35 | </androidx.swiperefreshlayout.widget.SwipeRefreshLayout> |
| 36 | |||
| 34 | </FrameLayout> | 37 | </FrameLayout> |
diff --git a/src/android/app/src/main/res/layout/fragment_settings.xml b/src/android/app/src/main/res/layout/fragment_settings.xml index 13780927e..6feb092ff 100644 --- a/src/android/app/src/main/res/layout/fragment_settings.xml +++ b/src/android/app/src/main/res/layout/fragment_settings.xml | |||
| @@ -8,6 +8,7 @@ | |||
| 8 | android:id="@+id/list_settings" | 8 | android:id="@+id/list_settings" |
| 9 | android:layout_width="match_parent" | 9 | android:layout_width="match_parent" |
| 10 | android:layout_height="match_parent" | 10 | android:layout_height="match_parent" |
| 11 | android:background="?attr/colorSurface" /> | 11 | android:background="?attr/colorSurface" |
| 12 | android:clipToPadding="false" /> | ||
| 12 | 13 | ||
| 13 | </org.yuzu.yuzu_emu.features.settings.ui.SettingsFrameLayout> | 14 | </org.yuzu.yuzu_emu.features.settings.ui.SettingsFrameLayout> |