Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android 15 edge-to-edge enforcement #2177

Open
ArcherEmiya05 opened this issue Dec 5, 2024 · 0 comments
Open

Android 15 edge-to-edge enforcement #2177

ArcherEmiya05 opened this issue Dec 5, 2024 · 0 comments

Comments

@ArcherEmiya05
Copy link

ArcherEmiya05 commented Dec 5, 2024

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:

  1. Use Firebase Android UI Auth
  2. Use Phone Auth provider
  3. Run the project

Observed Results:

Screenshot_1733432497

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())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant