Hi folks,
I'm having a UI bug related to displaying inter ads in android app with compose and enableEdgeToEdge() api and want to introduce to Google devs to fix.
Please see producible video video for more clarifications.
Description: The AdActivity that displays over my Compose Activity is transparent, making the app content underneath visible. Furthermore, the AdActivity causes the Compose Activity behind it to receive incorrect status bar inset values, resulting in its content not being positioned correctly. For instance, the 'AppBar' text composable moves up when an interstitial ad is shown.
Here are my project dependencies:
- Gradle 8.7
- AGP 8.5.0
- compileSdk 34
- targetSdk 34
- emulator: Pixel 8 API 34
- androidx.activity:activity:1.9.0
- androidx.compose 1.6.8
- kotlin 2.0.0
- play-services-ads: 23.2.0
Reproducible steps:
1. in app/AndroidManifest.xml, add android:windowSoftInputMode="adjustResize"
2. in Compose Activity, add enableEdgeToEdge() after super.onCreate()
3. add composable `TopAppBar(title = { Text(text = "AppBar") })` which uses WindowInsets.systemBars under the hood
4. run the app and show inter ads
The issue is also addressed in this
Github comment. If you need more information, please let me know. I'm looking forward to receiving your response soon. Happy coding :)