|
|
@ -37,16 +37,21 @@ class AccentStrokeTextView(context: Context, attrs: AttributeSet) : |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
context.getCompatColor(R.color.disabled) |
|
|
|
context.getCompatColor(R.color.disabled) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
val accentColor = if (isInEditMode) { |
|
|
|
|
|
|
|
context.getCompatColor(R.color.accent) |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
ThemeStore.accentColor(context) |
|
|
|
|
|
|
|
} |
|
|
|
background = Selector.shapeBuild() |
|
|
|
background = Selector.shapeBuild() |
|
|
|
.setCornerRadius(radius) |
|
|
|
.setCornerRadius(radius) |
|
|
|
.setStrokeWidth(1.dpToPx()) |
|
|
|
.setStrokeWidth(1.dpToPx()) |
|
|
|
.setDisabledStrokeColor(disableColor) |
|
|
|
.setDisabledStrokeColor(disableColor) |
|
|
|
.setDefaultStrokeColor(ThemeStore.accentColor(context)) |
|
|
|
.setDefaultStrokeColor(accentColor) |
|
|
|
.setPressedBgColor(context.getCompatColor(R.color.transparent30)) |
|
|
|
.setPressedBgColor(context.getCompatColor(R.color.transparent30)) |
|
|
|
.create() |
|
|
|
.create() |
|
|
|
setTextColor( |
|
|
|
setTextColor( |
|
|
|
Selector.colorBuild() |
|
|
|
Selector.colorBuild() |
|
|
|
.setDefaultColor(ThemeStore.accentColor(context)) |
|
|
|
.setDefaultColor(accentColor) |
|
|
|
.setDisabledColor(disableColor) |
|
|
|
.setDisabledColor(disableColor) |
|
|
|
.create() |
|
|
|
.create() |
|
|
|
) |
|
|
|
) |
|
|
|