mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-12-25 22:07:38 +00:00
Fixed inconsistent animations in hide
This commit is contained in:
parent
e1bda4ee8b
commit
eec5b37da1
@ -24,8 +24,8 @@ abstract class CompatFragment<ViewModel : CompatViewModel, Binding : ViewDataBin
|
|||||||
|
|
||||||
binding.addOnRebindCallback(object : OnRebindCallback<Binding>() {
|
binding.addOnRebindCallback(object : OnRebindCallback<Binding>() {
|
||||||
override fun onPreBind(binding: Binding): Boolean {
|
override fun onPreBind(binding: Binding): Boolean {
|
||||||
(binding.root as? ViewGroup)?.startAnimations()
|
this@CompatFragment.onPreBind(binding)
|
||||||
return super.onPreBind(binding)
|
return true
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -42,6 +42,10 @@ abstract class CompatFragment<ViewModel : CompatViewModel, Binding : ViewDataBin
|
|||||||
delegate.onEventExecute(event, this)
|
delegate.onEventExecute(event, this)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected open fun onPreBind(binding: Binding) {
|
||||||
|
(binding.root as? ViewGroup)?.startAnimations()
|
||||||
|
}
|
||||||
|
|
||||||
protected fun ViewEvent.dispatchOnSelf() = delegate.onEventExecute(this, this@CompatFragment)
|
protected fun ViewEvent.dispatchOnSelf() = delegate.onEventExecute(this, this@CompatFragment)
|
||||||
|
|
||||||
}
|
}
|
@ -65,6 +65,8 @@ class HideFragment : CompatFragment<HideViewModel, FragmentHideMd2Binding>() {
|
|||||||
return super.onOptionsItemSelected(item)
|
return super.onOptionsItemSelected(item)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun onPreBind(binding: FragmentHideMd2Binding) = Unit
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
object MotionRevealHelper {
|
object MotionRevealHelper {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user