Skip to content

Commit 08e7e38

Browse files
author
josefhruska
committed
CR fix #2
1 parent 4ed7434 commit 08e7e38

14 files changed

+18
-33
lines changed

app/src/main/AndroidManifest.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,11 @@
3434
<!-- Auth UI demo -->
3535
<activity
3636
android:name=".auth.AuthUiActivity"
37+
android:theme="@style/AppTheme.NoToolbar"
3738
android:label="@string/name_auth_ui"/>
3839
<activity
3940
android:name=".auth.SignedInActivity"
41+
android:theme="@style/AppTheme.NoToolbar"
4042
android:label="@string/name_auth_ui"/>
4143

4244
<!-- Storage UI demo-->

app/src/main/res/values/styles.xml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
<resources>
22
<!-- Base application theme. -->
3-
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
3+
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
44
<item name="colorPrimary">@color/colorPrimary</item>
55
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
66
<item name="colorAccent">@color/colorAccent</item>
7+
</style>
8+
9+
<style name="AppTheme.NoToolbar" parent="Theme.AppCompat.Light.NoActionBar">
710
<item name="windowActionBar">false</item>
811
<item name="windowNoTitle">true</item>
912
</style>

auth/src/main/AndroidManifest.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454

5555
<activity
5656
android:name=".ui.idp.AuthMethodPickerActivity"
57+
android:theme="@style/FirebaseUI.NoToolbar"
5758
android:label="@string/default_toolbar_title"
5859
android:exported="false"/>
5960

auth/src/main/java/com/firebase/ui/auth/AuthUI.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
import android.os.Parcel;
2020
import android.os.Parcelable;
2121
import android.support.annotation.DrawableRes;
22-
import android.support.annotation.LayoutRes;
2322
import android.support.annotation.NonNull;
2423
import android.support.annotation.Nullable;
2524
import android.support.annotation.StyleRes;

auth/src/main/java/com/firebase/ui/auth/ui/FlowParameters.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,9 @@
1616
import android.os.Parcel;
1717
import android.os.Parcelable;
1818
import android.support.annotation.DrawableRes;
19-
import android.support.annotation.LayoutRes;
2019
import android.support.annotation.NonNull;
2120
import android.support.annotation.Nullable;
2221
import android.support.annotation.RestrictTo;
23-
import android.support.annotation.StringRes;
2422
import android.support.annotation.StyleRes;
2523

2624
import com.firebase.ui.auth.AuthUI.IdpConfig;

auth/src/main/java/com/firebase/ui/auth/ui/email/RegisterEmailActivity.java

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,8 @@ public static Intent createIntent(Context context, FlowParameters flowParams, St
5757
@Override
5858
protected void onCreate(Bundle savedInstanceState) {
5959
super.onCreate(savedInstanceState);
60-
setTheme(R.style.FirebaseUI);
6160
setContentView(R.layout.activity_register_email);
62-
setToolbar();
61+
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
6362
if (savedInstanceState != null) {
6463
return;
6564
}
@@ -147,14 +146,4 @@ private void setSlideAnimation() {
147146
overridePendingTransition(R.anim.slide_in_right, R.anim.slide_out_left);
148147
}
149148

150-
private void setToolbar() {
151-
try {
152-
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
153-
setSupportActionBar(toolbar);
154-
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
155-
} catch (IllegalStateException e) {
156-
// It is handled correctly but there is something wrong with tests.
157-
}
158-
}
159-
160149
}

auth/src/main/java/com/firebase/ui/auth/ui/idp/AuthMethodPickerActivity.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,17 +120,14 @@ private void populateIdpList(List<IdpConfig> providers) {
120120
case GoogleAuthProvider.PROVIDER_ID:
121121
loginButton = getLayoutInflater()
122122
.inflate(R.layout.idp_button_google, btnHolder, false);
123-
btnHolder.invalidate();
124123
break;
125124
case FacebookAuthProvider.PROVIDER_ID:
126125
loginButton = getLayoutInflater()
127126
.inflate(R.layout.idp_button_facebook, btnHolder, false);
128-
btnHolder.invalidate();
129127
break;
130128
case TwitterAuthProvider.PROVIDER_ID:
131129
loginButton = getLayoutInflater()
132130
.inflate(R.layout.idp_button_twitter, btnHolder, false);
133-
btnHolder.invalidate();
134131
break;
135132
default:
136133
Log.e(TAG, "No button for provider " + provider.getProviderId());

auth/src/main/res/drawable/idp_button_background_google.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<item>
44
<shape android:shape="rectangle">
55
<corners android:radius="3dp"/>
6-
<solid android:color="#d0021b"/>
6+
<solid android:color="#ffffff"/>
77
</shape>
88
</item>
99
</selector>

auth/src/main/res/layout/activity_register_email.xml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,12 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
3-
xmlns:app="http://schemas.android.com/apk/res-auto"
43
android:layout_width="match_parent"
54
android:layout_height="match_parent"
65
android:background="@color/whiteColor">
76

8-
<android.support.v7.widget.Toolbar
9-
android:id="@+id/toolbar"
10-
android:layout_width="match_parent"
11-
android:layout_height="?attr/actionBarSize"
12-
android:background="@color/gray_6"
13-
app:theme="@style/Toolbar" />
14-
157
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
168
android:layout_width="match_parent"
179
android:layout_height="match_parent"
18-
android:layout_marginTop="?attr/actionBarSize"
1910
android:orientation="vertical">
2011

2112
<FrameLayout

auth/src/main/res/layout/check_email_layout.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<android.support.design.widget.TextInputEditText
2424
android:id="@+id/email"
2525
style="@style/FirebaseUI.EditText.EmailField"
26-
android:textCursorDrawable="@drawable/edit_text_cursor_custom" />
26+
android:textCursorDrawable="@drawable/edit_text_cursor_settleup" />
2727

2828
</android.support.design.widget.TextInputLayout>
2929

auth/src/main/res/layout/forgot_password_layout.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@
1515
<android.support.design.widget.TextInputLayout xmlns:app="http://schemas.android.com/apk/res-auto"
1616
android:id="@+id/email_layout"
1717
style="@style/FirebaseUI.Text.TextInputLayout"
18+
android:paddingTop="16dp"
1819
android:layout_width="match_parent"
1920
android:layout_height="wrap_content"
2021
android:layout_below="@+id/body_text"
2122
android:paddingLeft="32dp"
2223
android:paddingRight="32dp"
23-
android:paddingTop="16dp"
2424
app:errorTextAppearance="@style/FirebaseUI.Text.ErrorText"
2525
app:hintTextAppearance="@style/FirebaseUI.Text.HintText">
2626

auth/src/main/res/layout/register_email_layout.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
<android.support.design.widget.TextInputEditText
6161
android:id="@+id/email"
6262
style="@style/FirebaseUI.EditText.EmailField"
63-
android:textCursorDrawable="@drawable/edit_text_cursor_custom" />
63+
android:textCursorDrawable="@drawable/edit_text_cursor_settleup" />
6464

6565
</android.support.design.widget.TextInputLayout>
6666

@@ -82,7 +82,7 @@
8282
android:layout_width="match_parent"
8383
android:layout_height="wrap_content"
8484
android:imeOptions="actionDone"
85-
android:textCursorDrawable="@drawable/edit_text_cursor_custom" />
85+
android:textCursorDrawable="@drawable/edit_text_cursor_settleup" />
8686

8787
</android.support.design.widget.TextInputLayout>
8888

auth/src/main/res/values/styles.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@
1515
<item name="android:editTextStyle">@style/FirebaseUI.EditText</item>
1616
</style>
1717

18+
<style name="FirebaseUI.NoToolbar">
19+
<item name="windowActionBar">false</item>
20+
<item name="windowNoTitle">true</item>
21+
</style>
22+
1823
<style name="FirebaseUI.Transparent" parent="FirebaseUI">
1924
<item name="android:windowIsTranslucent">true</item>
2025
<item name="android:windowBackground">@android:color/transparent</item>

0 commit comments

Comments
 (0)