For #25808: Update method signatures for View.OnAttachStateChangeListener
This commit is contained in:
parent
0189958bff
commit
40fbcb6e9e
|
@ -49,11 +49,11 @@ class MenuPresenter(
|
||||||
menuToolbar.invalidateActions()
|
menuToolbar.invalidateActions()
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onViewDetachedFromWindow(v: View?) {
|
override fun onViewDetachedFromWindow(v: View) {
|
||||||
menuToolbar.onStop()
|
menuToolbar.onStop()
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onViewAttachedToWindow(v: View?) {
|
override fun onViewAttachedToWindow(v: View) {
|
||||||
// no-op
|
// no-op
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,11 +35,11 @@ class LifecycleViewProvider(view: View) : LifecycleOwner {
|
||||||
internal class ViewBinding(
|
internal class ViewBinding(
|
||||||
private val registry: LifecycleRegistry,
|
private val registry: LifecycleRegistry,
|
||||||
) : View.OnAttachStateChangeListener {
|
) : View.OnAttachStateChangeListener {
|
||||||
override fun onViewAttachedToWindow(v: View?) {
|
override fun onViewAttachedToWindow(v: View) {
|
||||||
registry.currentState = State.RESUMED
|
registry.currentState = State.RESUMED
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onViewDetachedFromWindow(v: View?) {
|
override fun onViewDetachedFromWindow(v: View) {
|
||||||
registry.currentState = State.DESTROYED
|
registry.currentState = State.DESTROYED
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user