diff options
| author | 2023-04-26 03:41:23 -0400 | |
|---|---|---|
| committer | 2023-06-03 00:05:55 -0700 | |
| commit | 986f858e6f5267d6e9b6fc2d969984c5813a2e28 (patch) | |
| tree | 7bcd0f56b7bc4eed9b45f57e1912ce5cd6bdfb09 /src/android | |
| parent | android: Shape/spacing adjustments to game card (diff) | |
| download | yuzu-986f858e6f5267d6e9b6fc2d969984c5813a2e28.tar.gz yuzu-986f858e6f5267d6e9b6fc2d969984c5813a2e28.tar.xz yuzu-986f858e6f5267d6e9b6fc2d969984c5813a2e28.zip | |
android: Fix alignment of SwipeRefreshLayout
Diffstat (limited to 'src/android')
| -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 | |||
| 7 | import android.view.LayoutInflater | 7 | import android.view.LayoutInflater |
| 8 | import android.view.View | 8 | import android.view.View |
| 9 | import android.view.ViewGroup | 9 | import android.view.ViewGroup |
| 10 | import android.view.ViewGroup.MarginLayoutParams | ||
| 10 | import androidx.activity.OnBackPressedCallback | 11 | import androidx.activity.OnBackPressedCallback |
| 11 | import androidx.appcompat.app.AppCompatActivity | 12 | import androidx.appcompat.app.AppCompatActivity |
| 12 | import androidx.core.view.ViewCompat | 13 | import androidx.core.view.ViewCompat |
| @@ -194,11 +195,9 @@ class GamesFragment : Fragment() { | |||
| 194 | val insets = windowInsets.getInsets(WindowInsetsCompat.Type.systemBars()) | 195 | val insets = windowInsets.getInsets(WindowInsetsCompat.Type.systemBars()) |
| 195 | val extraListSpacing = resources.getDimensionPixelSize(R.dimen.spacing_med) | 196 | val extraListSpacing = resources.getDimensionPixelSize(R.dimen.spacing_med) |
| 196 | 197 | ||
| 197 | view.setPadding( | 198 | view.updatePadding( |
| 198 | insets.left, | 199 | top = insets.top + resources.getDimensionPixelSize(R.dimen.spacing_search), |
| 199 | insets.top + resources.getDimensionPixelSize(R.dimen.spacing_search), | 200 | bottom = insets.bottom + resources.getDimensionPixelSize(R.dimen.spacing_navigation) + extraListSpacing |
| 200 | insets.right, | ||
| 201 | insets.bottom + resources.getDimensionPixelSize(R.dimen.spacing_navigation) + extraListSpacing | ||
| 202 | ) | 201 | ) |
| 203 | binding.gridSearch.updatePadding( | 202 | binding.gridSearch.updatePadding( |
| 204 | left = insets.left, | 203 | left = insets.left, |
| @@ -216,6 +215,11 @@ class GamesFragment : Fragment() { | |||
| 216 | insets.top + resources.getDimensionPixelSize(R.dimen.spacing_refresh_end) | 215 | insets.top + resources.getDimensionPixelSize(R.dimen.spacing_refresh_end) |
| 217 | ) | 216 | ) |
| 218 | 217 | ||
| 218 | val mlpSwipe = binding.swipeRefresh.layoutParams as MarginLayoutParams | ||
| 219 | mlpSwipe.rightMargin = insets.right | ||
| 220 | mlpSwipe.leftMargin = insets.left | ||
| 221 | binding.swipeRefresh.layoutParams = mlpSwipe | ||
| 222 | |||
| 219 | windowInsets | 223 | windowInsets |
| 220 | } | 224 | } |
| 221 | } | 225 | } |