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