mirror of
https://github.com/topjohnwu/Magisk.git
synced 2026-01-11 12:36:12 -08:00
Updated indication of whether the module is enabled
This commit is contained in:
@@ -2,6 +2,7 @@ package com.topjohnwu.magisk.utils
|
||||
|
||||
import android.animation.Animator
|
||||
import android.animation.ValueAnimator
|
||||
import android.graphics.Paint
|
||||
import android.graphics.drawable.Drawable
|
||||
import android.os.Build
|
||||
import android.view.View
|
||||
@@ -456,4 +457,13 @@ fun View.setOnLongClickListenerBinding(listener: () -> Unit) {
|
||||
listener()
|
||||
true
|
||||
}
|
||||
}
|
||||
|
||||
@BindingAdapter("strikeThrough")
|
||||
fun TextView.setStrikeThroughEnabled(useStrikeThrough: Boolean) {
|
||||
paintFlags = if (useStrikeThrough) {
|
||||
paintFlags or Paint.STRIKE_THRU_TEXT_FLAG
|
||||
} else {
|
||||
paintFlags and Paint.STRIKE_THRU_TEXT_FLAG.inv()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user