Android 15 edge-to-edge enforcement
Welcome to FirebaseUI and thanks for submitting an issue!
Please take a look at open issues, as well as resolved issues, to see if your issue is either already being addressed, or has been solved by someone else.
If not, please feel free to fill in the following info so we can help faster!
Step 1: Are you in the right place?
Yes
Step 2: Describe your environment
- Android device: AVD/Emulator
- Android OS version: 15
- Google Play Services version: N/A
- Firebase/Play Services SDK version: N/A
- FirebaseUI version: 8.0.2
Step 3: Describe the problem:
UI is broken in Android 15 due to the new edge-to-edge enforcement.
Steps to reproduce:
- Use Firebase Android UI Auth
- Use Phone Auth provider
- Run the project
Observed Results:
Expected Results:
Adapt edge-to-edge or fix the UI to make it look like the way it used to on older Android versions/
Relevant Code:
A temporary solution to this is to opt-out from edge-to-edge by setting the below style attribute and apply the theme using AuthUI.SignInIntentBuilder.setTheme
<!-- Firebase UI theme -->
<style name="Theme.App.FirebaseAuthUI">
<!-- For some reason, Firebase UI use this as textColorLink -->
<item name="colorPrimary">@color/mdc_colorAccent</item>
<!-- Use by Toolbar title color -->
<!-- Use by Outlined text field color (unfocused) -->
<!-- Use by OTP dashes color -->
<!-- Use by Button disabled color -->
<item name="colorOnSurface">@color/mdc_colorPrimary_White</item>
<!-- TextInputLayout and button shape -->
<item name="shapeAppearanceSmallComponent">@style/ShapeAppearance.MDC.SmallComponent</item> <!-- TODO FirebaseUI still uses MDC 2, remove this once they migrated to MDC 3 -->
<item name="shapeAppearanceCornerExtraSmall">@style/ShapeAppearance.MDC.SmallComponent</item>
<item name="android:windowOptOutEdgeToEdgeEnforcement" tools:targetApi="35">true</item> <!-- TODO FirebaseUI does not yet support edge-to-edge enforcement of Android 15, remove this once they adapted -->
</style>
Intent signInIntent =
AuthUI.getInstance(this).createSignInIntentBuilder()
// ...
.setTheme(R.style.AppTheme)
.build())
@ArcherEmiya05 thanks for reporting!
We're working on this in #2187 and we'll include it as part of the next release. In the meantime your workaround should do the trick. 👍
Hi, is there any plan to release a new version with the patch related to edge to edge enforcement since windowOptOutEdgeToEdgeEnforcement will no longer work when app runs on Android 16 and above?
In Android 16, windowOptOutEdgeToEdgeEnforcement does not work. This is blocking us from updating our app to Android 16, which we urgently need to do. The issue has been present for a long time, but it still hasn’t been addressed. Please prioritize fixing this in Firebase Auth UI.
@thatfiredev any update on this?
Using these properties for the firebase theme seems to work around the issue on Android 16:
<item name="android:fitsSystemWindows">true</item>
<item name="android:windowDrawsSystemBarBackgrounds">true</item>
@rocketraman If we use this
<item name="android:fitsSystemWindows">true</item>
<item name="android:windowDrawsSystemBarBackgrounds">true</item>
It loses the padding of buttons and the text field.
Hey everyone, We have just released v9.1.1 of the library which should address this issue. :)
Hey everyone, We have just released v9.1.1 of the library which should address this issue. :)
This fix is incomplete or incorrect at all, it doesn't provide backward compatibility and doesn't follow the documentation for handling edge-to-edge. Additionally use padding instead of margin for better result.
Not working on older Android version (versions prior to 15)
Statusbar content has no contrast thus battery percentage and other icons are no longer visible.
For those who need to make a release or update of their app now but was blocked by this issue. A workaround is to rollback using Firebase UI 8.0.2 and set targetSdk of your app to 35 so you can still use windowOptOutEdgeToEdgeEnforcement, assuming you don't rely on new features of API/SDK 36.
The 9.1.1 release is fixing edge-to-edge on api levels 34, 35 and 36 but not on api level 33 like on the Pixel 7 Pro emulator on which I captured the following screenshot.
Yes, that new version is not compatible with the older version of the OS.
@ArcherEmiya05 @nverinaud @mnk98 Thanks for letting us know! We'll take a look once again
Hello,
Thank you for taking the time to submit this bug.
We are happy to let you know that a resolution is already planned and on the roadmap for our upcoming new version.
We are actively working on the new SDK and will be sure to fix this bug once we have a public beta or a release candidate that includes this functionality. Please watch the main repository for the latest release.
In the meantime, we will keep this bug open for tracking.