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>() {
|
||||
override fun onPreBind(binding: Binding): Boolean {
|
||||
(binding.root as? ViewGroup)?.startAnimations()
|
||||
return super.onPreBind(binding)
|
||||
this@CompatFragment.onPreBind(binding)
|
||||
return true
|
||||
}
|
||||
})
|
||||
|
||||
@ -42,6 +42,10 @@ abstract class CompatFragment<ViewModel : CompatViewModel, Binding : ViewDataBin
|
||||
delegate.onEventExecute(event, this)
|
||||
}
|
||||
|
||||
protected open fun onPreBind(binding: Binding) {
|
||||
(binding.root as? ViewGroup)?.startAnimations()
|
||||
}
|
||||
|
||||
protected fun ViewEvent.dispatchOnSelf() = delegate.onEventExecute(this, this@CompatFragment)
|
||||
|
||||
}
|
@ -65,6 +65,8 @@ class HideFragment : CompatFragment<HideViewModel, FragmentHideMd2Binding>() {
|
||||
return super.onOptionsItemSelected(item)
|
||||
}
|
||||
|
||||
override fun onPreBind(binding: FragmentHideMd2Binding) = Unit
|
||||
|
||||
}
|
||||
|
||||
object MotionRevealHelper {
|
||||
|
Loading…
Reference in New Issue
Block a user