diff --git a/app/src/main/java/eu/kanade/tachiyomi/widget/ThemedSwipeRefreshLayout.kt b/app/src/main/java/eu/kanade/tachiyomi/widget/ThemedSwipeRefreshLayout.kt new file mode 100644 index 000000000..22c549be1 --- /dev/null +++ b/app/src/main/java/eu/kanade/tachiyomi/widget/ThemedSwipeRefreshLayout.kt @@ -0,0 +1,24 @@ +package eu.kanade.tachiyomi.widget + +import android.content.Context +import android.util.AttributeSet +import androidx.core.content.ContextCompat +import androidx.swiperefreshlayout.widget.SwipeRefreshLayout +import eu.kanade.tachiyomi.R +import eu.kanade.tachiyomi.util.system.getResourceColor + +class ThemedSwipeRefreshLayout @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null) : + SwipeRefreshLayout(context, attrs) { + + init { + setColors() + } + + private fun setColors() { + setProgressBackgroundColorSchemeColor(context.getResourceColor(R.attr.colorAccent)) + 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)) + } +} diff --git a/app/src/main/res/layout-land/manga_info_controller.xml b/app/src/main/res/layout-land/manga_info_controller.xml index 7e10e7bb6..49b35fbec 100644 --- a/app/src/main/res/layout-land/manga_info_controller.xml +++ b/app/src/main/res/layout-land/manga_info_controller.xml @@ -1,5 +1,5 @@ - - + diff --git a/app/src/main/res/layout/chapters_controller.xml b/app/src/main/res/layout/chapters_controller.xml index 8bef044ad..5af583b81 100644 --- a/app/src/main/res/layout/chapters_controller.xml +++ b/app/src/main/res/layout/chapters_controller.xml @@ -15,7 +15,7 @@ android:elevation="5dp" android:visibility="invisible"/> - - + - - + diff --git a/app/src/main/res/layout/library_category.xml b/app/src/main/res/layout/library_category.xml index a5910a4ca..4d3fec8cc 100644 --- a/app/src/main/res/layout/library_category.xml +++ b/app/src/main/res/layout/library_category.xml @@ -3,7 +3,7 @@ android:layout_width="match_parent" android:layout_height="match_parent"> - diff --git a/app/src/main/res/layout/manga_info_controller.xml b/app/src/main/res/layout/manga_info_controller.xml index a23a0e075..15e5482cc 100644 --- a/app/src/main/res/layout/manga_info_controller.xml +++ b/app/src/main/res/layout/manga_info_controller.xml @@ -1,5 +1,5 @@ - - + diff --git a/app/src/main/res/layout/track_controller.xml b/app/src/main/res/layout/track_controller.xml index c2ed096ab..c55e959ad 100644 --- a/app/src/main/res/layout/track_controller.xml +++ b/app/src/main/res/layout/track_controller.xml @@ -5,7 +5,7 @@ android:layout_height="match_parent" android:orientation="vertical"> - - + diff --git a/app/src/main/res/layout/updates_controller.xml b/app/src/main/res/layout/updates_controller.xml index 9e0c56baa..2bd2f798f 100644 --- a/app/src/main/res/layout/updates_controller.xml +++ b/app/src/main/res/layout/updates_controller.xml @@ -1,5 +1,5 @@ - - + diff --git a/app/src/main/res/layout/webview_activity.xml b/app/src/main/res/layout/webview_activity.xml index 58f2c0b5b..5f0dd9460 100644 --- a/app/src/main/res/layout/webview_activity.xml +++ b/app/src/main/res/layout/webview_activity.xml @@ -21,7 +21,7 @@ - - +