Changing startActivityForResult layout in FirebaseUI

I just applied FirebaseUI from Github and it works great. The problem that I am facing is that I want to change the layout when a new action is called, because it does not look very good. Below is

Screen shot

I know that we can change the theme of Activity as:

startActivityForResult(
    AuthUI.getInstance(this).createSignInIntentBuilder()
        // ...
        .setTheme(R.style.AppThemeWithActionBar)
        .build());

But anyway, what can we change the layout of the called activity?

+4
source share
1 answer

There are many ways to change the layout; they provided redefinition of styles there. so add a style similar to this, for example:

 <style name="AppThemeWithActionBar" parent="FirebaseUI">
        <item name="android:windowBackground">@drawable/firebaseui_bg_image</item>
        <item name="windowActionBar">true</item>
        <item name="windowNoTitle">true</item>
        <item name="colorPrimary">@color/colorPrimary</item>
        <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
        <item name="colorAccent">@color/colorAccent</item>
        <item name="colorButtonNormal">@color/colorAccent</item>
        <item name="colorControlNormal">@color/white</item>
        <item name="colorControlActivated">@color/white</item>
        <item name="colorControlHighlight">@color/white</item>
        <item name="android:textColorTertiary">@color/white</item>
    </style>

    <style name="FirebaseUI.Text">
        <item name="android:layout_width">match_parent</item>
        <item name="android:layout_height">wrap_content</item>
        <item name="android:textColor">@android:color/white</item>
    </style>

    <style name="FirebaseUI.CountrySpinner">
        <item name="android:layout_width">wrap_content</item>
        <item name="android:layout_height">wrap_content</item>
        <item name="android:textColor">@color/white</item>
    </style>

    <style name="FirebaseUI.TextInputEditText.EmailField">
        <item name="android:inputType">textEmailAddress</item>
        <item name="android:textColor">@color/white</item>
    </style>

    <style name="FirebaseUI.TextInputEditText">
        <item name="android:textSize">18sp</item>
        <item name="android:layout_width">match_parent</item>
        <item name="android:layout_height">wrap_content</item>

    </style>

    <style name="FirebaseUI.TextInputEditText.PhoneField">
        <item name="android:layout_width">match_parent</item>
        <item name="android:layout_height">wrap_content</item>
        <item name="android:textColor">@color/white</item>
    </style>

, . Android FirebaseUI, Alt-, , ( ), .

0

All Articles