How To Customize Firebase Auth Ui
I am using Firebase Auth Ui from number verification. I have some requirements where i need to change text and background color of country spinner's dropdown item. I am using this
Solution 1:
You'll want to extend the FirebaseUI theme and pass that into the builder options. Example:
<stylename="GreenTheme"parent="FirebaseUI"><!-- Required for sign-in flow styling --><itemname="colorPrimary">@color/material_green_500</item><itemname="colorPrimaryDark">@color/material_green_700</item><itemname="colorAccent">@color/material_purple_a700</item><itemname="colorControlNormal">@color/material_green_500</item><itemname="colorControlActivated">@color/material_lime_a700</item><itemname="colorControlHighlight">@color/material_green_a200</item><itemname="android:windowBackground">@color/material_green_50</item></style>
And in Java:
startActivityForResult(
AuthUI.getInstance(this).createSignInIntentBuilder()
// ....setTheme(R.style.GreenTheme)
.build());
And the docs: https://github.com/firebase/FirebaseUI-Android/blob/master/auth/README.md#themes
You'll basically want to extend the FirebaseUI style with your drop-down attribute.
Post a Comment for "How To Customize Firebase Auth Ui"