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

FirebaseUI not adjusted according to the rotation and numbers of providers #1434

Closed
JitenderSha opened this issue Sep 4, 2018 · 6 comments
Closed

Comments

@JitenderSha
Copy link

Describe your environment

  • Android device: Nexus 5
  • Android OS version: 6
  • Google Play Services version: 12.8.74
  • Firebase/Play Services SDK version: firebase-auth:16.0.3, play-services-location:15.0.1
  • FirebaseUI version: 4.1.0

Step 3: Describe the problem:

  1. In Portrait mode
    As in screenshot 1, the blank space is leaved if used two providers.

  2. In Landscape mode
    As in screenshot 2, the blank space is leaved at the bottom of the logo and logo is not in vertical center.

Steps to reproduce:

  1. Use FirebaseUI using
    startActivityForResult(
    AuthUI.getInstance()
    .createSignInIntentBuilder()
    .setAvailableProviders(providers)
    .setLogo(R.mipmap.tb_logo) // Set logo drawable
    .setTheme(R.style.AppTheme) // Set theme
    .build(),
    RC_SIGN_IN);
  2. Run the app
  3. See in both orientations

Observed Results:

  • All is in screenshots

Expected Results:

  • What did you expect to happen?
    In Portrait mode, if two providers are used the space should evenly distributed between the logo and buttons.

In Landscape mode, the logo should be placed in vertical center of the screen.

Relevant Code:

Just copy paste the following :

// Choose authentication providers

   List<AuthUI.IdpConfig> providers = Arrays.asList(
            new AuthUI.IdpConfig.PhoneBuilder().build(),
            new AuthUI.IdpConfig.FacebookBuilder().build());

    startActivityForResult(
            AuthUI.getInstance()
                    .createSignInIntentBuilder()
                    .setAvailableProviders(providers)
                    .setLogo(R.mipmap.tb_logo)      // Set logo drawable
                    .setTheme(R.style.AppTheme)      // Set theme
                    .build(),
            RC_SIGN_IN);

screenshot_1
screenshot_2

@samtstern
Copy link
Contributor

@JitenderSha thanks for reporting. What is the bug in portrait mode? That looks correct to me.

Also you say this is "Android version 6" but from the look of the screenshots that device is running Android 4.x ... can you provide a screenshot from a device running Lollipop, Marshmallow, or higher? I just want to see if this is Android version specific.

@Paul-Foley
Copy link

@samtstern I have the same issue, in horizontal mode the layout looks wrong. Looks identical to @JitenderSha pictures, Logo off center and login buttons stuck to the very right. I am using Android API 28

@samtstern
Copy link
Contributor

#1457 shows this issue on a modern device, which is the confirmation I need.

@samtstern samtstern added this to the 4.2.1 milestone Sep 24, 2018
@Paul-Foley
Copy link

@samtstern any idea of a rough eta til fixed?

@SUPERCILEX
Copy link
Collaborator

@JitenderSha Probably 4.2.1 😊

@samtstern
Copy link
Contributor

This has been fixed and released in version 4.2.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants