-
-
Save gpetuhov/2169c208f56ba1f16ffb54ca336a764d to your computer and use it in GitHub Desktop.
Revisions
-
cutiko revised this gist
Mar 20, 2018 . 1 changed file with 8 additions and 9 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -8,18 +8,17 @@ protected void onCreate(Bundle savedInstanceState) { setContentView(R.layout.activity_main); Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); setSupportActionBar(toolbar); //I rather using a list, this way handling providers is separeted from the login methods List<AuthUI.IdpConfig> providers = Arrays.asList( new AuthUI.IdpConfig.EmailBuilder().build(), new AuthUI.IdpConfig.GoogleBuilder().build(), new AuthUI.IdpConfig.FacebookBuilder().build() ); startActivityForResult( AuthUI.getInstance() .createSignInIntentBuilder() .setAvailableProviders(providers) .setTheme(R.style.LoginTheme) .setLogo(R.mipmap.logo) .build(), -
cutiko revised this gist
Oct 23, 2017 . 1 changed file with 11 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -6,4 +6,14 @@ This is a snippet to customize Firebase-Ui-auth login. **Thanks to the wonderful - [logo](https://www.dropbox.com/sh/4rz070t1s698qzw/AABJe5gSyf2aVq5MME8o18vRa?dl=0) 2. Use the colors provided in `colors.xml` 3. Copy paste the themes in the `styles.xml` 4. Apply the theme and the logo in the java as the example in `LoginActivity.java` This are the size of the background in pixels, so you can create your own: - mdpi: 360 x 640 - hpdi: 540 x 960 - xhdpi: 720 x 1280 - xxhdpi: 1080 x 1920 - xxxhdpi: 1440 x 2560 *I'm still working in a solution to support correctly other devices like tablets, my first thought contemplate using the `dimens` still not sure if it is gonna be a dirty but quick fix* -
cutiko revised this gist
May 11, 2017 . 1 changed file with 4 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,9 +1,9 @@ ## Instructions This is a snippet to customize Firebase-Ui-auth login. **Thanks to the wonderfull people in Firebase-Ui**. 1. Download and add to your project this files - [bg_login](https://www.dropbox.com/sh/xgif3cz6ryjoozo/AAC1RSCYu3-SRpf2-Wg8jjM9a?dl=0) - [logo](https://www.dropbox.com/sh/4rz070t1s698qzw/AABJe5gSyf2aVq5MME8o18vRa?dl=0) 2. Use the colors provided in `colors.xml` 3. Copy paste the themes in the `styles.xml` 4. Apply the theme and the logo in the java as the example in `LoginActivity.java` -
cutiko revised this gist
May 11, 2017 . 2 changed files with 16 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,9 @@ ## Instructions This is a snippet to customize Firebase-Ui-auth login. **Thanks to the wonderfull people in Firebase-Ui**. 1- Download and add to your project this files - [bg_login](https://www.dropbox.com/sh/xgif3cz6ryjoozo/AAC1RSCYu3-SRpf2-Wg8jjM9a?dl=0) - [logo](https://www.dropbox.com/sh/4rz070t1s698qzw/AABJe5gSyf2aVq5MME8o18vRa?dl=0) 2- Use the colors provided in `colors.xml` 3- Copy paste the themes in the `styles.xml` 4- Apply the theme and the logo in the java as the example in `LoginActivity.java` This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <resources> <color name="colorPrimary">#673AB7</color> <color name="colorPrimaryDark">#512DA8</color> <color name="colorPrimaryLight">#EDE7F6</color> <color name="colorAccent">#7C4DFF</color> <color name="colorSecondary">#FFC107</color> </resources> -
cutiko renamed this gist
May 11, 2017 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ 1- Download and add to your project this files - [bg_login] (https://www.dropbox.com/sh/xgif3cz6ryjoozo/AAC1RSCYu3-SRpf2-Wg8jjM9a?dl=0) - [logo] (https://www.dropbox.com/sh/4rz070t1s698qzw/AABJe5gSyf2aVq5MME8o18vRa?dl=0) 2- -
cutiko revised this gist
May 11, 2017 . 5 changed files with 48 additions and 73 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,28 @@ public class LoginActivity extends AppCompatActivity { private static final int RC_SIGN_IN = 343; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); setSupportActionBar(toolbar); startActivityForResult( AuthUI.getInstance() .createSignInIntentBuilder() .setProviders( Arrays.asList( new AuthUI.IdpConfig.Builder(AuthUI.EMAIL_PROVIDER).build(), new AuthUI.IdpConfig.Builder(AuthUI.GOOGLE_PROVIDER).build(), new AuthUI.IdpConfig.Builder(AuthUI.FACEBOOK_PROVIDER).build(), new AuthUI.IdpConfig.Builder(AuthUI.TWITTER_PROVIDER).build() ) ) .setTheme(R.style.LoginTheme) .setLogo(R.mipmap.logo) .build(), RC_SIGN_IN); } } This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,12 +0,0 @@ This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,12 +0,0 @@ This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,9 +0,0 @@ This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,50 +1,30 @@ <resources> <style name="LoginTheme" parent="FirebaseUI"> <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">@android:color/white</item> <item name="colorControlActivated">@android:color/white</item> <item name="colorControlHighlight">@android:color/white</item> <item name="android:textColor">@android:color/white</item> <item name="android:textColorPrimary">@android:color/white</item> <item name="android:textColorSecondary">@android:color/white</item> <item name="android:windowBackground">@mipmap/bg_login</item> <item name="windowActionBar">false</item> <item name="windowNoTitle">true</item> <item name="android:textColorHint">@android: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:fontFamily">sans-serif</item> <item name="android:textColor">@android:color/white</item> </style> <style name="FirebaseUI.Text.Link"> <item name="android:textColor">@color/colorSecondary</item> </style> </resources> -
cutiko revised this gist
Oct 3, 2016 . 1 changed file with 9 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,9 @@ <color name="colorPrimary">#673AB7</color> <color name="colorPrimaryDark">#512DA8</color> <color name="colorPrimaryLight">#EDE7F6</color> <color name="colorAccent">#7C4DFF</color> <color name="colorAccentDark">#311B92</color> <color name="colorAccentLight">#D1C4E9</color> <color name="colorWhite">#FFFFFF</color> <color name="colorBlack">#212121</color> <color name="colorGray">#727272</color> -
cutiko revised this gist
Oct 3, 2016 . No changes.There are no files selected for viewing
-
cutiko revised this gist
Sep 7, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ Download the assets referred in other files from the following links: - [bg_login] (https://www.dropbox.com/sh/xgif3cz6ryjoozo/AAC1RSCYu3-SRpf2-Wg8jjM9a?dl=0) - [logo] (https://www.dropbox.com/sh/4rz070t1s698qzw/AABJe5gSyf2aVq5MME8o18vRa?dl=0) -
cutiko revised this gist
Sep 7, 2016 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,2 +1,4 @@ Download the assets referred in the previous files from the following links: - [bg_login] (https://www.dropbox.com/sh/xgif3cz6ryjoozo/AAC1RSCYu3-SRpf2-Wg8jjM9a?dl=0) - [logo] (https://www.dropbox.com/sh/4rz070t1s698qzw/AABJe5gSyf2aVq5MME8o18vRa?dl=0) -
cutiko revised this gist
Sep 7, 2016 . 1 changed file with 1 addition and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,2 @@ Download the assets referred in the previous files from the following links: [bg_login] (https://www.dropbox.com/sh/xgif3cz6ryjoozo/AAC1RSCYu3-SRpf2-Wg8jjM9a?dl=0) -
cutiko revised this gist
Sep 7, 2016 . 1 changed file with 3 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,3 @@ Download the assets referred in the previous files from the following links: (bg_login) [https://www.dropbox.com/sh/xgif3cz6ryjoozo/AAC1RSCYu3-SRpf2-Wg8jjM9a?dl=0] -
cutiko revised this gist
Sep 7, 2016 . 2 changed files with 24 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,12 @@ <?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_pressed="true"> <color android:color="@color/colorAccentDark"/> </item> <item> <color android:color="@color/colorAccent"/> </item> </selector> This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,12 @@ <?xml version="1.0" encoding="utf-8"?> <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <item android:drawable="@mipmap/bg_login"/> <item android:top="120dp"> <bitmap android:src="@mipmap/logo" android:gravity="top|center_horizontal" /> </item> </layer-list> -
cutiko created this gist
Sep 7, 2016 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,50 @@ <style name="FullscreenTheme" parent="AppTheme"> <item name="android:actionBarStyle">@style/FullscreenActionBarStyle</item> <item name="android:windowActionBarOverlay">true</item> <item name="android:windowBackground">@drawable/bg_login</item> <item name="metaButtonBarStyle">?android:attr/buttonBarStyle</item> <item name="metaButtonBarButtonStyle">?android:attr/buttonBarButtonStyle</item> <item name="windowActionBar">false</item> <item name="windowNoTitle">true</item> <item name="colorControlNormal">@color/colorWhite</item> <item name="colorControlActivated">@color/colorWhite</item> <item name="colorControlHighlight">@color/colorWhite</item> </style> <style name="FullscreenActionBarStyle" parent="Widget.AppCompat.ActionBar"> <item name="android:background">@color/colorPrimary</item> </style> <style name="FirebaseUI.Button" parent="@style/FullscreenTheme"> <item name="android:background">@drawable/bg_btn_accent</item> <item name="android:layout_width">wrap_content</item> <item name="android:layout_gravity">right</item> <item name="android:layout_height">36dp</item> <item name="android:layout_margin">8dp</item> <item name="android:textColor">@color/colorWhite</item> <item name="android:textAllCaps">true</item> <item name="android:radius">2dp</item> </style> <style name="FirebaseUI.EditText"> <item name="android:paddingBottom">14dp</item> <item name="android:paddingTop">14dp</item> <item name="android:layout_width">match_parent</item> <item name="android:layout_height">wrap_content</item> <item name="colorControlActivated">@color/colorWhite</item> <item name="colorControlHighlight">@color/colorWhite</item> <item name="android:textColorHint">@color/colorWhite</item> <item name="android:textColor">@color/colorWhite</item> </style> <style name="FirebaseUI.Text.TextInputLayout" parent="@style/FirebaseUI.EditText" /> <style name="FirebaseUI.Text.HintText" parent="@style/FirebaseUI.EditText" /> <style name="FirebaseUI.ImageView.VisibilityToggle" parent="@style/FirebaseUI.EditText"> <item name="android:visibility">gone</item> </style> <style name="FirebaseUI.Text.Link" parent="FirebaseUI.EditText" /> <style name="FirebaseUI.Text.BodyText" parent="FirebaseUI.EditText" />