diff options
| author | 2023-03-14 00:03:51 -0400 | |
|---|---|---|
| committer | 2023-06-03 00:05:43 -0700 | |
| commit | 37cc94526b746a7f6be046935554c0fdb573ff9c (patch) | |
| tree | fb0eb05e6e1ff78db15cfade5a942f70be577b92 /src/android | |
| parent | android: New settings fragment animations (diff) | |
| download | yuzu-37cc94526b746a7f6be046935554c0fdb573ff9c.tar.gz yuzu-37cc94526b746a7f6be046935554c0fdb573ff9c.tar.xz yuzu-37cc94526b746a7f6be046935554c0fdb573ff9c.zip | |
android: New swipe to refresh color scheme
Diffstat (limited to 'src/android')
| -rw-r--r-- | src/android/app/src/main/java/org/yuzu/yuzu_emu/ui/platform/PlatformGamesFragment.kt | 10 |
1 files changed, 9 insertions, 1 deletions
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 42b61a81a..73929e186 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 | |||
| @@ -17,10 +17,10 @@ import androidx.fragment.app.Fragment | |||
| 17 | import androidx.recyclerview.widget.GridLayoutManager | 17 | import androidx.recyclerview.widget.GridLayoutManager |
| 18 | import androidx.recyclerview.widget.RecyclerView | 18 | import androidx.recyclerview.widget.RecyclerView |
| 19 | import androidx.swiperefreshlayout.widget.SwipeRefreshLayout | 19 | import androidx.swiperefreshlayout.widget.SwipeRefreshLayout |
| 20 | import com.google.android.material.color.MaterialColors | ||
| 20 | import org.yuzu.yuzu_emu.R | 21 | import org.yuzu.yuzu_emu.R |
| 21 | import org.yuzu.yuzu_emu.YuzuApplication | 22 | import org.yuzu.yuzu_emu.YuzuApplication |
| 22 | import org.yuzu.yuzu_emu.adapters.GameAdapter | 23 | import org.yuzu.yuzu_emu.adapters.GameAdapter |
| 23 | import org.yuzu.yuzu_emu.utils.InsetsHelper | ||
| 24 | 24 | ||
| 25 | class PlatformGamesFragment : Fragment(), PlatformGamesView { | 25 | class PlatformGamesFragment : Fragment(), PlatformGamesView { |
| 26 | private val presenter = PlatformGamesPresenter(this) | 26 | private val presenter = PlatformGamesPresenter(this) |
| @@ -70,6 +70,14 @@ class PlatformGamesFragment : Fragment(), PlatformGamesView { | |||
| 70 | pullToRefresh.isRefreshing = false | 70 | pullToRefresh.isRefreshing = false |
| 71 | } | 71 | } |
| 72 | 72 | ||
| 73 | // Set theme color to the refresh animation's background | ||
| 74 | pullToRefresh.setProgressBackgroundColorSchemeColor( | ||
| 75 | MaterialColors.getColor(pullToRefresh, R.attr.colorPrimary) | ||
| 76 | ) | ||
| 77 | pullToRefresh.setColorSchemeColors( | ||
| 78 | MaterialColors.getColor(pullToRefresh, R.attr.colorOnPrimary) | ||
| 79 | ) | ||
| 80 | |||
| 73 | setInsets() | 81 | setInsets() |
| 74 | } | 82 | } |
| 75 | 83 | ||