|
|
@ -1,12 +1,13 @@ |
|
|
|
package io.legado.app.lib.theme.view |
|
|
|
package io.legado.app.lib.theme.view |
|
|
|
|
|
|
|
|
|
|
|
import android.content.Context |
|
|
|
import android.content.Context |
|
|
|
import android.graphics.Color |
|
|
|
|
|
|
|
import android.util.AttributeSet |
|
|
|
import android.util.AttributeSet |
|
|
|
import androidx.appcompat.widget.AppCompatRadioButton |
|
|
|
import androidx.appcompat.widget.AppCompatRadioButton |
|
|
|
|
|
|
|
import io.legado.app.R |
|
|
|
import io.legado.app.lib.theme.Selector |
|
|
|
import io.legado.app.lib.theme.Selector |
|
|
|
import io.legado.app.lib.theme.ThemeStore |
|
|
|
import io.legado.app.lib.theme.ThemeStore |
|
|
|
import io.legado.app.utils.dp |
|
|
|
import io.legado.app.utils.dp |
|
|
|
|
|
|
|
import io.legado.app.utils.getCompatColor |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* @author Aidan Follestad (afollestad) |
|
|
|
* @author Aidan Follestad (afollestad) |
|
|
@ -27,11 +28,11 @@ class ATERadioNoButton : AppCompatRadioButton { |
|
|
|
|
|
|
|
|
|
|
|
private fun init(context: Context, attrs: AttributeSet?) { |
|
|
|
private fun init(context: Context, attrs: AttributeSet?) { |
|
|
|
background = Selector.shapeBuild() |
|
|
|
background = Selector.shapeBuild() |
|
|
|
.setCornerRadius(3.dp) |
|
|
|
.setCornerRadius(2.dp) |
|
|
|
.setStrokeWidth(3.dp) |
|
|
|
.setStrokeWidth(2.dp) |
|
|
|
.setCheckedBgColor(ThemeStore.accentColor(context)) |
|
|
|
.setCheckedBgColor(ThemeStore.accentColor(context)) |
|
|
|
.setCheckedStrokeColor(ThemeStore.accentColor(context)) |
|
|
|
.setCheckedStrokeColor(ThemeStore.accentColor(context)) |
|
|
|
.setDefaultStrokeColor(Color.WHITE) |
|
|
|
.setDefaultStrokeColor(context.getCompatColor(R.color.tv_text_default)) |
|
|
|
.create() |
|
|
|
.create() |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|