pull/1658/head
kunfei 3 years ago
parent e4ea55d42f
commit 452bc76c9e
  1. 3
      app/src/main/java/io/legado/app/lib/theme/view/ThemeCheckBox.kt
  2. 3
      app/src/main/java/io/legado/app/lib/theme/view/ThemeEditText.kt
  3. 3
      app/src/main/java/io/legado/app/lib/theme/view/ThemeProgressBar.kt
  4. 3
      app/src/main/java/io/legado/app/lib/theme/view/ThemeRadioButton.kt
  5. 7
      app/src/main/java/io/legado/app/lib/theme/view/ThemeRadioNoButton.kt
  6. 2
      app/src/main/res/values/attrs.xml

@ -6,9 +6,6 @@ import androidx.appcompat.widget.AppCompatCheckBox
import io.legado.app.lib.theme.accentColor import io.legado.app.lib.theme.accentColor
import io.legado.app.utils.applyTint import io.legado.app.utils.applyTint
/**
* @author Aidan Follestad (afollestad)
*/
class ThemeCheckBox(context: Context, attrs: AttributeSet) : AppCompatCheckBox(context, attrs) { class ThemeCheckBox(context: Context, attrs: AttributeSet) : AppCompatCheckBox(context, attrs) {
init { init {

@ -6,9 +6,6 @@ import androidx.appcompat.widget.AppCompatEditText
import io.legado.app.lib.theme.accentColor import io.legado.app.lib.theme.accentColor
import io.legado.app.utils.applyTint import io.legado.app.utils.applyTint
/**
* @author Aidan Follestad (afollestad)
*/
class ThemeEditText @JvmOverloads constructor( class ThemeEditText @JvmOverloads constructor(
context: Context, context: Context,
attrs: AttributeSet? = null attrs: AttributeSet? = null

@ -6,9 +6,6 @@ import android.widget.ProgressBar
import io.legado.app.lib.theme.accentColor import io.legado.app.lib.theme.accentColor
import io.legado.app.utils.applyTint import io.legado.app.utils.applyTint
/**
* @author Aidan Follestad (afollestad)
*/
class ThemeProgressBar(context: Context, attrs: AttributeSet) : ProgressBar(context, attrs) { class ThemeProgressBar(context: Context, attrs: AttributeSet) : ProgressBar(context, attrs) {
init { init {

@ -6,9 +6,6 @@ import androidx.appcompat.widget.AppCompatRadioButton
import io.legado.app.lib.theme.accentColor import io.legado.app.lib.theme.accentColor
import io.legado.app.utils.applyTint import io.legado.app.utils.applyTint
/**
* @author Aidan Follestad (afollestad)
*/
class ThemeRadioButton(context: Context, attrs: AttributeSet) : class ThemeRadioButton(context: Context, attrs: AttributeSet) :
AppCompatRadioButton(context, attrs) { AppCompatRadioButton(context, attrs) {

@ -12,18 +12,15 @@ import io.legado.app.utils.ColorUtils
import io.legado.app.utils.dp import io.legado.app.utils.dp
import io.legado.app.utils.getCompatColor import io.legado.app.utils.getCompatColor
/**
* @author Aidan Follestad (afollestad)
*/
class ThemeRadioNoButton(context: Context, attrs: AttributeSet) : class ThemeRadioNoButton(context: Context, attrs: AttributeSet) :
AppCompatRadioButton(context, attrs) { AppCompatRadioButton(context, attrs) {
private val isBottomBackground: Boolean private val isBottomBackground: Boolean
init { init {
val typedArray = context.obtainStyledAttributes(attrs, R.styleable.ATERadioNoButton) val typedArray = context.obtainStyledAttributes(attrs, R.styleable.ThemeRadioNoButton)
isBottomBackground = isBottomBackground =
typedArray.getBoolean(R.styleable.ATERadioNoButton_isBottomBackground, false) typedArray.getBoolean(R.styleable.ThemeRadioNoButton_isBottomBackground, false)
typedArray.recycle() typedArray.recycle()
initTheme() initTheme()
} }

@ -206,7 +206,7 @@
</attr> </attr>
</declare-styleable> </declare-styleable>
<declare-styleable name="ATERadioNoButton"> <declare-styleable name="ThemeRadioNoButton">
<attr name="isBottomBackground" /> <attr name="isBottomBackground" />
</declare-styleable> </declare-styleable>

Loading…
Cancel
Save