Skip to content

Commit 2548c2a

Browse files
committed
Adds more styling to demo app
1 parent 891947f commit 2548c2a

File tree

5 files changed

+74
-0
lines changed

5 files changed

+74
-0
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
3+
<item android:top="1dp">
4+
<shape
5+
android:shape="rectangle"
6+
xmlns:android="http://schemas.android.com/apk/res/android">
7+
<solid android:color="#BEDEE8" />
8+
</shape>
9+
</item>
10+
</layer-list>
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
3+
<item android:top="1dp">
4+
<shape
5+
android:shape="rectangle"
6+
xmlns:android="http://schemas.android.com/apk/res/android">
7+
<solid android:color="#E8E8E8" />
8+
</shape>
9+
</item>
10+
</layer-list>

app/src/main/res/fabric.properties

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
apiSecret=YOUR_BUILD_SECRET
2+
apiKey=YOUR_API_KEY
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<menu xmlns:android="http://schemas.android.com/apk/res/android"
3+
xmlns:uidemo="http://schemas.android.com/apk/res-auto">
4+
<item android:id="@+id/login_menu_item"
5+
android:title="Login"
6+
uidemo:showAsAction="always"/>
7+
<item android:id="@+id/logout_menu_item"
8+
android:title="Logout"
9+
uidemo:showAsAction="always"/>
10+
</menu>
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
package com.firebase.ui.com.firebasei.ui.authimpl;
2+
3+
import android.app.Activity;
4+
import android.content.Context;
5+
6+
import com.firebase.client.AuthData;
7+
import com.firebase.client.Firebase;
8+
import com.firebase.client.FirebaseError;
9+
10+
public class PasswordAuthHelper extends FirebaseAuthHelper {
11+
12+
private final String LOG_TAG = "PasswordAuthHelper";
13+
14+
public final static String PROVIDER_NAME = "password";
15+
16+
private TokenAuthHandler mHandler;
17+
private Activity mActivity;
18+
private Firebase mRef;
19+
20+
public PasswordAuthHelper(Context context, Firebase ref, TokenAuthHandler handler) {
21+
mActivity = (Activity) context;
22+
mRef = ref;
23+
mHandler = handler;
24+
}
25+
26+
public void login(String email, String password) {
27+
mRef.authWithPassword(email, password, new Firebase.AuthResultHandler() {
28+
@Override
29+
public void onAuthenticated(AuthData authData) {
30+
mHandler.onSuccess(authData);
31+
}
32+
@Override
33+
public void onAuthenticationError(FirebaseError firebaseError) {
34+
mHandler.onUserError(firebaseError);
35+
}
36+
});
37+
}
38+
39+
public String getProviderName() { return PROVIDER_NAME; }
40+
public Firebase getFirebaseRef() { return mRef; }
41+
public void logout() {}
42+
}

0 commit comments

Comments
 (0)