mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-14 14:20:30 +05:30
Merge pull request #2962 from Bnyro/master
Use an elevated surface color for the swipe to refresh
This commit is contained in:
commit
b8a1e8d56a
@ -9,6 +9,7 @@ import android.view.ViewConfiguration
|
|||||||
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout
|
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout
|
||||||
import com.github.libretube.R
|
import com.github.libretube.R
|
||||||
import com.github.libretube.helpers.ThemeHelper
|
import com.github.libretube.helpers.ThemeHelper
|
||||||
|
import com.google.android.material.elevation.SurfaceColors
|
||||||
import kotlin.math.abs
|
import kotlin.math.abs
|
||||||
|
|
||||||
class CustomSwipeToRefresh(context: Context?, attrs: AttributeSet?) :
|
class CustomSwipeToRefresh(context: Context?, attrs: AttributeSet?) :
|
||||||
@ -19,7 +20,7 @@ class CustomSwipeToRefresh(context: Context?, attrs: AttributeSet?) :
|
|||||||
init {
|
init {
|
||||||
setColorSchemeColors(ThemeHelper.getThemeColor(this.context, R.attr.colorPrimary))
|
setColorSchemeColors(ThemeHelper.getThemeColor(this.context, R.attr.colorPrimary))
|
||||||
setProgressBackgroundColorSchemeColor(
|
setProgressBackgroundColorSchemeColor(
|
||||||
ThemeHelper.getThemeColor(this.context, R.attr.colorSurface)
|
SurfaceColors.getColorForElevation(this.context, 20f)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user