Improve support for edge-to-edge layout

[Problem/Question]
When increasing the target SDK level to 35 android now defaults to using the edge-to-edge layout. So if I increase the SDK level in my app, which uses Sendbird, the Sendbird screens are affected too. Sendbird then displays elements behind the status bar at the top and behind the navigation bar at the bottom, making it impossible to interact with those elements. On my Pixel 9 for example the entirety of the ActionBar ends up behind the status bar, making it impossible to interact with it. On the Screen generated from the ChannelFragment the input field to write a message at the bottom ends up being completely covered by the navigation bar if 3 button navigation is enabled, making it impossible to write a message.
In the screenshot below you can see the issue on the ChannelFragment screen. I took the screenshot in the sample app from the GitHub Repository. The only thing I changed was the targetSdk increase and switching to the dark theme in the app. The navigation bar covers the input field and the status bar covers the ActionBar.

I have tried overriding all of the Fragments with a custom implementation where I apply the insets myself, but that leaves the status bar and navigation bar grey, and I can’t figure out where that grey comes from and how to change that grey to a color that fits my apps colors better.

How should I handle this?


[SDK Version]
3.22.0 of the UIKit for Android View library.

[Reproduction Steps]

  • Increase targetSdkVersion to 35

[Frequency]
100% of the time.

[Current impact]
We can’t increase the SDK level of our app to 35. But at some point, we will be forced to do that because otherwise Google will stop showing our app in the Google Play Store.

I have figured out where the grey background color came from, that appeared after I applied the insets to the Fragments. It is the background color of the ImageView inside the sb_activity.xml layout.
However, I still don’t have a proper solution for my problem. The only half decent solution I have, is to overwrite all the Activities Sendbird UIKit for Android View provides with my own Activities. I don’t count this as a proper solution though because it is quite a lot of work.

I found a better temporary solution. I can opt out the activities through the Manifest alone, without having to override all of them. I figured it out thanks to this StackOverflow answer: https://stackoverflow.com/a/79025741/10645087.

However, Google has announced that the opt out flag will be removed again with Android 16, so this still needs a fix without the opt out.