mirror of
https://github.com/gedoor/legado.git
synced 2025-08-10 00:52:30 +00:00
优化
This commit is contained in:
@@ -6,9 +6,6 @@ import androidx.appcompat.widget.AppCompatCheckBox
|
||||
import io.legado.app.lib.theme.accentColor
|
||||
import io.legado.app.utils.applyTint
|
||||
|
||||
/**
|
||||
* @author Aidan Follestad (afollestad)
|
||||
*/
|
||||
class ThemeCheckBox(context: Context, attrs: AttributeSet) : AppCompatCheckBox(context, attrs) {
|
||||
|
||||
init {
|
||||
|
||||
@@ -6,9 +6,6 @@ import androidx.appcompat.widget.AppCompatEditText
|
||||
import io.legado.app.lib.theme.accentColor
|
||||
import io.legado.app.utils.applyTint
|
||||
|
||||
/**
|
||||
* @author Aidan Follestad (afollestad)
|
||||
*/
|
||||
class ThemeEditText @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null
|
||||
|
||||
@@ -6,9 +6,6 @@ import android.widget.ProgressBar
|
||||
import io.legado.app.lib.theme.accentColor
|
||||
import io.legado.app.utils.applyTint
|
||||
|
||||
/**
|
||||
* @author Aidan Follestad (afollestad)
|
||||
*/
|
||||
class ThemeProgressBar(context: Context, attrs: AttributeSet) : ProgressBar(context, attrs) {
|
||||
|
||||
init {
|
||||
|
||||
@@ -6,9 +6,6 @@ import androidx.appcompat.widget.AppCompatRadioButton
|
||||
import io.legado.app.lib.theme.accentColor
|
||||
import io.legado.app.utils.applyTint
|
||||
|
||||
/**
|
||||
* @author Aidan Follestad (afollestad)
|
||||
*/
|
||||
class ThemeRadioButton(context: Context, attrs: AttributeSet) :
|
||||
AppCompatRadioButton(context, attrs) {
|
||||
|
||||
|
||||
@@ -12,18 +12,15 @@ import io.legado.app.utils.ColorUtils
|
||||
import io.legado.app.utils.dp
|
||||
import io.legado.app.utils.getCompatColor
|
||||
|
||||
/**
|
||||
* @author Aidan Follestad (afollestad)
|
||||
*/
|
||||
class ThemeRadioNoButton(context: Context, attrs: AttributeSet) :
|
||||
AppCompatRadioButton(context, attrs) {
|
||||
|
||||
private val isBottomBackground: Boolean
|
||||
|
||||
init {
|
||||
val typedArray = context.obtainStyledAttributes(attrs, R.styleable.ATERadioNoButton)
|
||||
val typedArray = context.obtainStyledAttributes(attrs, R.styleable.ThemeRadioNoButton)
|
||||
isBottomBackground =
|
||||
typedArray.getBoolean(R.styleable.ATERadioNoButton_isBottomBackground, false)
|
||||
typedArray.getBoolean(R.styleable.ThemeRadioNoButton_isBottomBackground, false)
|
||||
typedArray.recycle()
|
||||
initTheme()
|
||||
}
|
||||
|
||||
@@ -206,7 +206,7 @@
|
||||
</attr>
|
||||
</declare-styleable>
|
||||
|
||||
<declare-styleable name="ATERadioNoButton">
|
||||
<declare-styleable name="ThemeRadioNoButton">
|
||||
<attr name="isBottomBackground" />
|
||||
</declare-styleable>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user