Files
mihon-bookoasis/app/src/main/java/eu/kanade/tachiyomi/widget/ThemedSwipeRefreshLayout.kt
T
Ivan Iskandar 932c92412c More themes cleanup (#5410)
* More themes cleanup

* Tweak some things

* Fix 'Clear History' icon

* Split out ripple colored to its own drawable

* Tidy up things

* Unify background dim amount

* Use primaryColor for Account login button

* More colored ripples

* use colorOnPrimary for selected comfortable library item title

Co-authored-by: Soitora <simon.mattila@protonmail.com>
2021-06-19 15:45:16 -04:00

20 lines
653 B
Kotlin

package eu.kanade.tachiyomi.widget
import android.content.Context
import android.util.AttributeSet
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout
import com.mikepenz.aboutlibraries.util.getThemeColor
import eu.kanade.tachiyomi.R
class ThemedSwipeRefreshLayout @JvmOverloads constructor(
context: Context,
attrs: AttributeSet? = null
) : SwipeRefreshLayout(context, attrs) {
init {
// Background
setProgressBackgroundColorSchemeColor(context.getThemeColor(R.attr.colorPrimary))
// This updates the progress arrow color
setColorSchemeColors(context.getThemeColor(R.attr.colorOnPrimary))
}
}