Skip to content

Commit baf6d33

Browse files
committed
Changes resulting from QA:
* The auth method picker screen looks really bad in landscape, put everything in a ScrollView as a temporary measure until we can think of some better UX * TestUtils did not compile, had to change some code and move the package Change-Id: I84d3d974390774a7ea3c7cf5deb444b022bb7fd8
1 parent 48a2fe4 commit baf6d33

File tree

5 files changed

+33
-30
lines changed

5 files changed

+33
-30
lines changed

auth/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ dependencies {
4646
testCompile 'junit:junit:4.12'
4747
//noinspection NewerVersionAvailable, GradleDynamicVersion
4848
testCompile 'org.mockito:mockito-core:2.5.+'
49-
testCompile 'org.robolectric:robolectric:3.2.1'
49+
testCompile 'org.robolectric:robolectric:3.2.2'
5050
// See https://github.com/robolectric/robolectric/issues/1932#issuecomment-219796474
5151
testCompile 'org.khronos:opengl-api:gl1.1-android-2.1_r1'
5252
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
import android.support.annotation.RestrictTo;
2222
import android.util.Log;
2323
import android.view.View;
24+
import android.view.ViewGroup;
2425
import android.widget.ImageView;
25-
import android.widget.LinearLayout;
2626

2727
import com.firebase.ui.auth.AuthUI;
2828
import com.firebase.ui.auth.AuthUI.IdpConfig;
@@ -111,7 +111,7 @@ private void populateIdpList(List<IdpConfig> providers) {
111111
}
112112
}
113113

114-
LinearLayout btnHolder = (LinearLayout) findViewById(R.id.btn_holder);
114+
ViewGroup btnHolder = (ViewGroup) findViewById(R.id.btn_holder);
115115
for (final IdpProvider provider : mIdpProviders) {
116116
View loginButton = null;
117117
switch (provider.getProviderId()) {
Lines changed: 20 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,34 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<LinearLayout
3-
xmlns:android="http://schemas.android.com/apk/res/android"
2+
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
43
android:layout_width="match_parent"
5-
android:layout_height="match_parent"
6-
android:clipChildren="false"
7-
android:clipToPadding="false"
8-
android:gravity="center|bottom"
9-
android:orientation="vertical">
4+
android:layout_height="match_parent">
105

116
<LinearLayout
127
android:layout_width="match_parent"
13-
android:layout_height="match_parent"
14-
android:layout_weight="1.0"
15-
android:gravity="center">
8+
android:layout_height="wrap_content"
9+
android:clipChildren="false"
10+
android:clipToPadding="false"
11+
android:gravity="center|bottom"
12+
android:orientation="vertical">
1613

1714
<ImageView
1815
android:id="@+id/logo"
1916
style="@style/FirebaseUI.AuthMethodPicker.Logo"
20-
android:contentDescription="@string/accessibility_logo"/>
17+
android:layout_marginBottom="64dp"
18+
android:layout_marginTop="48dp"
19+
android:contentDescription="@string/accessibility_logo" />
2120

22-
</LinearLayout>
21+
<LinearLayout
22+
android:id="@+id/btn_holder"
23+
style="@style/FirebaseUI.AuthMethodPicker.ButtonHolder"
24+
android:layout_weight="0">
2325

24-
<LinearLayout
25-
android:id="@+id/btn_holder"
26-
android:layout_weight="0"
27-
style="@style/FirebaseUI.AuthMethodPicker.ButtonHolder">
26+
<Button
27+
android:id="@+id/email_provider"
28+
style="@style/FirebaseUI.Button.AccountChooser.EmailButton"
29+
android:text="@string/sign_in_with_email" />
2830

29-
<Button
30-
android:id="@+id/email_provider"
31-
style="@style/FirebaseUI.Button.AccountChooser.EmailButton"
32-
android:text="@string/sign_in_with_email"/>
31+
</LinearLayout>
3332

3433
</LinearLayout>
35-
36-
</LinearLayout>
34+
</ScrollView>

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22
<resources>
33

44
<style name="FirebaseUI" parent="Theme.AppCompat.Light.DarkActionBar">
5-
<item name="android:textColor">@color/authui_inputTextColorDark</item>
6-
<item name="android:textColorPrimary">@color/authui_inputTextColor</item>
75
<item name="colorPrimary">@color/authui_colorPrimary</item>
86
<item name="colorPrimaryDark">@color/authui_colorPrimaryDark</item>
97
<item name="colorAccent">@color/authui_colorAccent</item>
108
<item name="colorButtonNormal">@color/authui_colorPrimary</item>
11-
<item name="android:buttonStyle">@style/FirebaseUI.Button</item>
12-
<item name="android:editTextStyle">@style/FirebaseUI.EditText</item>
139
<item name="colorControlNormal">@color/authui_colorPrimary</item>
1410
<item name="colorControlActivated">@color/authui_colorAccent</item>
1511
<item name="colorControlHighlight">@color/authui_colorAccent</item>
12+
<item name="android:textColor">@color/authui_inputTextColorDark</item>
13+
<item name="android:textColorPrimary">@color/authui_inputTextColor</item>
14+
<item name="android:buttonStyle">@style/FirebaseUI.Button</item>
15+
<item name="android:editTextStyle">@style/FirebaseUI.EditText</item>
1616
</style>
1717

1818
<style name="FirebaseUI.Transparent" parent="FirebaseUI">

database/src/androidTest/java/com/firebase/ui/database/utils/TestUtils.java renamed to database/src/androidTest/java/com/firebase/ui/database/TestUtils.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,15 @@ public static void runAndWaitUntil(FirebaseArray array,
3838
Callable<Boolean> done) throws InterruptedException {
3939
final Semaphore semaphore = new Semaphore(0);
4040
array.setOnChangedListener(new FirebaseArray.OnChangedListener() {
41-
public void onChanged(EventType type, int index, int oldIndex) {
41+
42+
@Override
43+
public void onChildChanged(EventType type, int index, int oldIndex) {
4244
semaphore.release();
4345
}
4446

47+
@Override
48+
public void onDataChanged() {}
49+
4550
@Override
4651
public void onCancelled(DatabaseError databaseError) {
4752
throw new IllegalStateException(databaseError.toException());

0 commit comments

Comments
 (0)