diff options
author | Charles Lombardo <clombardo169@gmail.com> | 2023-04-26 09:41:23 +0200 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2023-06-03 09:05:55 +0200 |
commit | 986f858e6f5267d6e9b6fc2d969984c5813a2e28 (patch) | |
tree | 7bcd0f56b7bc4eed9b45f57e1912ce5cd6bdfb09 | |
parent | android: Shape/spacing adjustments to game card (diff) | |
download | yuzu-986f858e6f5267d6e9b6fc2d969984c5813a2e28.tar yuzu-986f858e6f5267d6e9b6fc2d969984c5813a2e28.tar.gz yuzu-986f858e6f5267d6e9b6fc2d969984c5813a2e28.tar.bz2 yuzu-986f858e6f5267d6e9b6fc2d969984c5813a2e28.tar.lz yuzu-986f858e6f5267d6e9b6fc2d969984c5813a2e28.tar.xz yuzu-986f858e6f5267d6e9b6fc2d969984c5813a2e28.tar.zst yuzu-986f858e6f5267d6e9b6fc2d969984c5813a2e28.zip |
-rw-r--r-- | src/android/app/src/main/java/org/yuzu/yuzu_emu/ui/GamesFragment.kt | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/ui/GamesFragment.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/ui/GamesFragment.kt index fb8c0fd32..5c58dd255 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/ui/GamesFragment.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/ui/GamesFragment.kt @@ -7,6 +7,7 @@ import android.os.Bundle import android.view.LayoutInflater import android.view.View import android.view.ViewGroup +import android.view.ViewGroup.MarginLayoutParams import androidx.activity.OnBackPressedCallback import androidx.appcompat.app.AppCompatActivity import androidx.core.view.ViewCompat @@ -194,11 +195,9 @@ class GamesFragment : Fragment() { val insets = windowInsets.getInsets(WindowInsetsCompat.Type.systemBars()) val extraListSpacing = resources.getDimensionPixelSize(R.dimen.spacing_med) - view.setPadding( - insets.left, - insets.top + resources.getDimensionPixelSize(R.dimen.spacing_search), - insets.right, - insets.bottom + resources.getDimensionPixelSize(R.dimen.spacing_navigation) + extraListSpacing + view.updatePadding( + top = insets.top + resources.getDimensionPixelSize(R.dimen.spacing_search), + bottom = insets.bottom + resources.getDimensionPixelSize(R.dimen.spacing_navigation) + extraListSpacing ) binding.gridSearch.updatePadding( left = insets.left, @@ -216,6 +215,11 @@ class GamesFragment : Fragment() { insets.top + resources.getDimensionPixelSize(R.dimen.spacing_refresh_end) ) + val mlpSwipe = binding.swipeRefresh.layoutParams as MarginLayoutParams + mlpSwipe.rightMargin = insets.right + mlpSwipe.leftMargin = insets.left + binding.swipeRefresh.layoutParams = mlpSwipe + windowInsets } } |