pull/32/head
kunfei 5 years ago
parent 4de8ed935f
commit 1f6fc5ed27
  1. 9
      app/src/main/java/io/legado/app/lib/theme/TintHelper.kt
  2. 1
      app/src/main/res/layout/item_book_source.xml
  3. 2
      app/src/main/res/layout/item_replace_rule.xml

@ -18,6 +18,7 @@ import androidx.core.content.ContextCompat
import androidx.core.graphics.drawable.DrawableCompat
import com.google.android.material.floatingactionbutton.FloatingActionButton
import io.legado.app.R
import io.legado.app.utils.isNightTheme
/**
* @author afollestad, plusCubed
@ -127,7 +128,7 @@ object TintHelper {
view: View, @ColorInt color: Int,
isBackground: Boolean
) {
setTintAuto(view, color, isBackground, view.context.isDarkTheme)
setTintAuto(view, color, isBackground, view.context.isNightTheme)
}
fun setTintAuto(
@ -395,7 +396,11 @@ object TintHelper {
if (switchView.trackDrawable != null) {
switchView.trackDrawable = modifySwitchDrawable(
switchView.context,
switchView.trackDrawable, color, false, false, useDarker
switchView.trackDrawable,
color,
thumb = false,
compatSwitch = false,
useDarker = useDarker
)
}
if (switchView.thumbDrawable != null) {

@ -15,7 +15,6 @@
android:layout_gravity="center"
android:layout_weight="1"
android:singleLine="true"
android:text=""
android:textColor="@color/tv_text_default" />
<io.legado.app.lib.theme.view.ATESwitch

@ -7,7 +7,7 @@
android:orientation="horizontal"
android:padding="8dp">
<androidx.appcompat.widget.AppCompatCheckBox
<io.legado.app.lib.theme.view.ATECheckBox
android:id="@+id/cb_name"
android:layout_width="0dp"
android:layout_height="wrap_content"

Loading…
Cancel
Save