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

@ -317,7 +317,9 @@ object TintHelper {
color color
) )
) )
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
box.buttonTintList = sl box.buttonTintList = sl
} else {
val drawable = val drawable =
createTintedDrawable( createTintedDrawable(
ContextCompat.getDrawable( ContextCompat.getDrawable(
@ -327,6 +329,7 @@ object TintHelper {
) )
box.buttonDrawable = drawable box.buttonDrawable = drawable
} }
}
fun setTint(image: ImageView, @ColorInt color: Int) { fun setTint(image: ImageView, @ColorInt color: Int) {
image.setColorFilter(color, PorterDuff.Mode.SRC_ATOP) image.setColorFilter(color, PorterDuff.Mode.SRC_ATOP)

@ -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