pull/32/head
kunfei 5 years ago
parent 95ba4c3a13
commit 864c417ccf
  1. 21
      app/src/main/java/io/legado/app/lib/theme/TintHelper.kt
  2. 10
      app/src/main/res/layout/dialog_read_aloud.xml

@ -317,15 +317,18 @@ object TintHelper {
color
)
)
box.buttonTintList = sl
val drawable =
createTintedDrawable(
ContextCompat.getDrawable(
box.context,
R.drawable.abc_btn_check_material
), sl
)
box.buttonDrawable = drawable
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
box.buttonTintList = sl
} else {
val drawable =
createTintedDrawable(
ContextCompat.getDrawable(
box.context,
R.drawable.abc_btn_check_material
), sl
)
box.buttonDrawable = drawable
}
}
fun setTint(image: ImageView, @ColorInt color: Int) {

@ -74,13 +74,10 @@
android:layout_height="1dp"
android:layout_weight="1" />
<io.legado.app.lib.theme.view.ATECheckBox
<io.legado.app.lib.theme.view.ATESwitch
android:id="@+id/cb_by_page"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:button="@null"
android:drawableRight="?android:attr/listChoiceIndicatorMultiple"
android:drawableEnd="?android:attr/listChoiceIndicatorMultiple"
android:text="@string/byPage"
tools:ignore="RtlHardcoded" />
@ -142,14 +139,11 @@
android:textColor="@color/tv_text_default"
android:textSize="14sp" />
<io.legado.app.lib.theme.view.ATECheckBox
<io.legado.app.lib.theme.view.ATESwitch
android:id="@+id/cb_tts_follow_sys"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:button="@null"
android:drawableRight="?android:attr/listChoiceIndicatorMultiple"
android:drawableEnd="?android:attr/listChoiceIndicatorMultiple"
android:text="@string/flow_sys"
android:contentDescription="@string/flow_sys"
tools:ignore="RtlHardcoded" />

Loading…
Cancel
Save