mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-19 22:59:18 +01:00
Update SwipeRefreshLayout
This commit is contained in:
parent
7e7eb9f39f
commit
f5a44245e9
@ -134,6 +134,7 @@ dependencies {
|
|||||||
implementation 'androidx.browser:browser:1.2.0'
|
implementation 'androidx.browser:browser:1.2.0'
|
||||||
implementation 'androidx.multidex:multidex:2.0.1'
|
implementation 'androidx.multidex:multidex:2.0.1'
|
||||||
implementation 'androidx.biometric:biometric:1.0.1'
|
implementation 'androidx.biometric:biometric:1.0.1'
|
||||||
|
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0-rc01'
|
||||||
implementation 'androidx.webkit:webkit:1.3.0-beta01'
|
implementation 'androidx.webkit:webkit:1.3.0-beta01'
|
||||||
|
|
||||||
final lifecycle_version = '2.2.0'
|
final lifecycle_version = '2.2.0'
|
||||||
|
@ -5,7 +5,6 @@ import android.util.AttributeSet
|
|||||||
import androidx.core.content.ContextCompat
|
import androidx.core.content.ContextCompat
|
||||||
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout
|
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout
|
||||||
import eu.kanade.tachiyomi.R
|
import eu.kanade.tachiyomi.R
|
||||||
import eu.kanade.tachiyomi.util.system.getResourceColor
|
|
||||||
|
|
||||||
class ThemedSwipeRefreshLayout @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null) :
|
class ThemedSwipeRefreshLayout @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null) :
|
||||||
SwipeRefreshLayout(context, attrs) {
|
SwipeRefreshLayout(context, attrs) {
|
||||||
@ -15,7 +14,9 @@ class ThemedSwipeRefreshLayout @JvmOverloads constructor(context: Context, attrs
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun setColors() {
|
private fun setColors() {
|
||||||
setProgressBackgroundColorSchemeColor(context.getResourceColor(R.attr.colorAccent))
|
// Background is controlled with "swipeRefreshLayoutProgressSpinnerBackgroundColor" in XML
|
||||||
|
|
||||||
|
// This updates the progress arrow color
|
||||||
setColorSchemeColors(
|
setColorSchemeColors(
|
||||||
ContextCompat.getColor(context, R.color.md_white_1000),
|
ContextCompat.getColor(context, R.color.md_white_1000),
|
||||||
ContextCompat.getColor(context, R.color.md_white_1000),
|
ContextCompat.getColor(context, R.color.md_white_1000),
|
||||||
|
@ -58,6 +58,7 @@
|
|||||||
<item name="textAppearanceButton">@style/TextAppearance.Widget.Button</item>
|
<item name="textAppearanceButton">@style/TextAppearance.Widget.Button</item>
|
||||||
<item name="textInputStyle">@style/Theme.Widget.TextInputLayout.OutlinedBox</item>
|
<item name="textInputStyle">@style/Theme.Widget.TextInputLayout.OutlinedBox</item>
|
||||||
<item name="android:itemTextAppearance">@style/TextAppearance.Widget.Menu</item>
|
<item name="android:itemTextAppearance">@style/TextAppearance.Widget.Menu</item>
|
||||||
|
<item name="swipeRefreshLayoutProgressSpinnerBackgroundColor">?attr/colorAccent</item>
|
||||||
|
|
||||||
<!-- Material Dialogs -->
|
<!-- Material Dialogs -->
|
||||||
<item name="md_background_color">?attr/colorSurface</item>
|
<item name="md_background_color">?attr/colorSurface</item>
|
||||||
@ -140,6 +141,7 @@
|
|||||||
<item name="textAppearanceButton">@style/TextAppearance.Widget.Button</item>
|
<item name="textAppearanceButton">@style/TextAppearance.Widget.Button</item>
|
||||||
<item name="textInputStyle">@style/Theme.Widget.TextInputLayout.OutlinedBox</item>
|
<item name="textInputStyle">@style/Theme.Widget.TextInputLayout.OutlinedBox</item>
|
||||||
<item name="android:itemTextAppearance">@style/TextAppearance.Widget.Menu</item>
|
<item name="android:itemTextAppearance">@style/TextAppearance.Widget.Menu</item>
|
||||||
|
<item name="swipeRefreshLayoutProgressSpinnerBackgroundColor">?attr/colorAccent</item>
|
||||||
|
|
||||||
<!-- Material Dialogs -->
|
<!-- Material Dialogs -->
|
||||||
<item name="md_background_color">?attr/colorSurface</item>
|
<item name="md_background_color">?attr/colorSurface</item>
|
||||||
|
Loading…
Reference in New Issue
Block a user