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 color
) )
) )
box.buttonTintList = sl if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
val drawable = box.buttonTintList = sl
createTintedDrawable( } else {
ContextCompat.getDrawable( val drawable =
box.context, createTintedDrawable(
R.drawable.abc_btn_check_material ContextCompat.getDrawable(
), sl box.context,
) R.drawable.abc_btn_check_material
box.buttonDrawable = drawable ), sl
)
box.buttonDrawable = drawable
}
} }
fun setTint(image: ImageView, @ColorInt color: Int) { fun setTint(image: ImageView, @ColorInt color: Int) {

@ -74,13 +74,10 @@
android:layout_height="1dp" android:layout_height="1dp"
android:layout_weight="1" /> 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:id="@+id/cb_by_page"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:button="@null"
android:drawableRight="?android:attr/listChoiceIndicatorMultiple"
android:drawableEnd="?android:attr/listChoiceIndicatorMultiple"
android:text="@string/byPage" android:text="@string/byPage"
tools:ignore="RtlHardcoded" /> tools:ignore="RtlHardcoded" />
@ -142,14 +139,11 @@
android:textColor="@color/tv_text_default" android:textColor="@color/tv_text_default"
android:textSize="14sp" /> 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:id="@+id/cb_tts_follow_sys"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:button="@null"
android:drawableRight="?android:attr/listChoiceIndicatorMultiple"
android:drawableEnd="?android:attr/listChoiceIndicatorMultiple"
android:text="@string/flow_sys" android:text="@string/flow_sys"
android:contentDescription="@string/flow_sys" android:contentDescription="@string/flow_sys"
tools:ignore="RtlHardcoded" /> tools:ignore="RtlHardcoded" />

Loading…
Cancel
Save