Reputation: 1527
Right now in the Android app I'm working on, I'm trying to figure out why, after rotating the device to landscape, my navbar's background still thinks the app is in portrait mode (and lays itself out at the bottom of my screen) when the navbar is already to the right of my screen.
Is it something to do with passing modified/wrong insets as the result of the OnApplyWindowInsetsListener
put in the window.decorView
?
Upvotes: 0
Views: 53
Reputation: 1527
Note to self: NEVER set an OnApplyWindowInsetsListener
to the window.decorView
. It replaces the decorView
's own insets listener, and said listener is the one laying out and animating the navigation bar and status bar backgrounds.
At maximum, use the Activity binding's root or the Fragment's view instead.
Upvotes: 0