mirror of
https://github.com/topjohnwu/Magisk.git
synced 2026-01-26 03:05:09 -08:00
Removed exclusive usage of 29 level API
This commit is contained in:
@@ -17,7 +17,6 @@ import androidx.appcompat.widget.AppCompatImageView
|
||||
import androidx.appcompat.widget.Toolbar
|
||||
import androidx.core.animation.doOnEnd
|
||||
import androidx.core.view.*
|
||||
import androidx.core.widget.NestedScrollView
|
||||
import androidx.databinding.BindingAdapter
|
||||
import androidx.databinding.InverseBindingAdapter
|
||||
import androidx.databinding.InverseBindingListener
|
||||
@@ -427,18 +426,6 @@ fun Chip.setOnCloseClickedListenerBinding(listener: View.OnClickListener) {
|
||||
setOnCloseIconClickListener(listener)
|
||||
}
|
||||
|
||||
@BindingAdapter("onScrollStateChanged")
|
||||
fun NestedScrollView.setOnScrollStateChangeListener(listener: Runnable) {
|
||||
setOnScrollChangeListener { _: NestedScrollView?, _: Int, _: Int, _: Int, _: Int ->
|
||||
if (!handler.hasCallbacks(listener)) {
|
||||
listener.run()
|
||||
} else {
|
||||
handler.removeCallbacksAndMessages(null)
|
||||
}
|
||||
handler.postDelayed(listener, 1000)
|
||||
}
|
||||
}
|
||||
|
||||
@BindingAdapter("progressAnimated")
|
||||
fun ProgressBar.setProgressAnimated(newProgress: Int) {
|
||||
val animator = tag as? ValueAnimator
|
||||
|
||||
Reference in New Issue
Block a user