pull/51/head
kunfei 5 years ago
parent 415d3dea6d
commit 8bd1cc0de2
  1. 3
      app/src/main/java/io/legado/app/ui/widget/BadgeView.kt
  2. 1
      app/src/main/res/layout/item_bookshelf_list.xml

@ -16,6 +16,7 @@ import android.widget.TabWidget
import androidx.appcompat.widget.AppCompatTextView
import io.legado.app.R
import io.legado.app.lib.theme.accentColor
import io.legado.app.utils.getCompatColor
import io.legado.app.utils.gone
import io.legado.app.utils.visible
@ -146,7 +147,7 @@ class BadgeView @JvmOverloads constructor(
}
fun setHighlight(highlight: Boolean) {
setBackground(resources.getColor(if (highlight) R.color.highlight else R.color.darker_gray))
setBackground(context.getCompatColor(if (highlight) R.color.highlight else R.color.darker_gray))
}
fun setBadgeMargin(dipMargin: Int) {

@ -46,7 +46,6 @@
android:layout_height="26dp"
android:layout_gravity="right"
android:visibility="invisible"
app:loading_color="@color/colorAccent"
app:loading_width="2dp"
tools:ignore="RtlHardcoded" />
</FrameLayout>

Loading…
Cancel
Save