Add initial decor view traversal
Summary: Catch the case when we mis the initial draw Reviewed By: lblasa Differential Revision: D39658946 fbshipit-source-id: 00a46226128e28a8753df2161d1edcd6ffa47d67
This commit is contained in:
committed by
Facebook GitHub Bot
parent
46824f3369
commit
7deb374c1c
@@ -49,6 +49,8 @@ class DecorViewObserver(val context: Context) : TreeObserver<DecorView>() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
node.viewTreeObserver.addOnPreDrawListener(listener)
|
node.viewTreeObserver.addOnPreDrawListener(listener)
|
||||||
|
// sometimes we are too late to the party and we miss the first draw
|
||||||
|
listener?.onPreDraw()
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun unsubscribe() {
|
override fun unsubscribe() {
|
||||||
|
|||||||
Reference in New Issue
Block a user