From 1f2be7655940dbe4090d1a950077374d80a380f0 Mon Sep 17 00:00:00 2001 From: Bnyro Date: Sat, 4 Feb 2023 11:21:44 +0100 Subject: [PATCH] Use an elevated surface color for the swipe to refresh --- .../java/com/github/libretube/ui/views/CustomSwipeToRefresh.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/github/libretube/ui/views/CustomSwipeToRefresh.kt b/app/src/main/java/com/github/libretube/ui/views/CustomSwipeToRefresh.kt index dc006a82e..8d2d7d1f2 100644 --- a/app/src/main/java/com/github/libretube/ui/views/CustomSwipeToRefresh.kt +++ b/app/src/main/java/com/github/libretube/ui/views/CustomSwipeToRefresh.kt @@ -9,6 +9,7 @@ import android.view.ViewConfiguration import androidx.swiperefreshlayout.widget.SwipeRefreshLayout import com.github.libretube.R import com.github.libretube.helpers.ThemeHelper +import com.google.android.material.elevation.SurfaceColors import kotlin.math.abs class CustomSwipeToRefresh(context: Context?, attrs: AttributeSet?) : @@ -19,7 +20,7 @@ class CustomSwipeToRefresh(context: Context?, attrs: AttributeSet?) : init { setColorSchemeColors(ThemeHelper.getThemeColor(this.context, R.attr.colorPrimary)) setProgressBackgroundColorSchemeColor( - ThemeHelper.getThemeColor(this.context, R.attr.colorSurface) + SurfaceColors.getColorForElevation(this.context, 20f) ) }