|
22 | 22 | import android.support.annotation.Nullable;
|
23 | 23 | import android.support.annotation.StyleRes;
|
24 | 24 |
|
25 |
| -import com.firebase.ui.auth.ui.FlowParameters; |
26 |
| -import com.firebase.ui.auth.util.CredentialsApiHelper; |
27 | 25 | import com.firebase.ui.auth.provider.FacebookProvider;
|
28 | 26 | import com.firebase.ui.auth.provider.GoogleProvider;
|
29 | 27 | import com.firebase.ui.auth.provider.IDPProviderParcel;
|
| 28 | +import com.firebase.ui.auth.ui.FlowParameters; |
30 | 29 | import com.firebase.ui.auth.ui.credentials.ChooseAccountActivity;
|
| 30 | +import com.firebase.ui.auth.util.CredentialsApiHelper; |
31 | 31 | import com.google.android.gms.common.api.Status;
|
32 | 32 | import com.google.android.gms.tasks.Continuation;
|
33 | 33 | import com.google.android.gms.tasks.Task;
|
@@ -94,10 +94,14 @@ public class AuthUI {
|
94 | 94 | )));
|
95 | 95 |
|
96 | 96 | /**
|
97 |
| - * The theme identifier to use in {@link SignInIntentBuilder#setTheme(int)} if no theme |
| 97 | + * Default theme to be used in {@link SignInIntentBuilder#setTheme(int)} if no theme |
98 | 98 | * customization is required.
|
99 | 99 | */
|
100 |
| - public static final int DEFAULT_THEME = R.style.FirebaseUI; |
| 100 | + public static @StyleRes int getDefaultTheme() { |
| 101 | + // TODO(iainmgin): figure out why this works as a static method but not as a static |
| 102 | + // final variable. |
| 103 | + return R.style.FirebaseUI; |
| 104 | + } |
101 | 105 |
|
102 | 106 | /**
|
103 | 107 | * Signs the current user out, if one is signed in. The
|
@@ -151,7 +155,8 @@ public Void then(@NonNull Task<Status> task) throws Exception {
|
151 | 155 | public static final class SignInIntentBuilder {
|
152 | 156 | private Context mContext;
|
153 | 157 | private FirebaseApp mFirebaseApp;
|
154 |
| - private int mTheme = DEFAULT_THEME; |
| 158 | + |
| 159 | + private int mTheme = getDefaultTheme(); |
155 | 160 | private List<String> mProviders = Collections.singletonList(EMAIL_PROVIDER);
|
156 | 161 | private String mTosUrl;
|
157 | 162 |
|
@@ -189,7 +194,7 @@ public SignInIntentBuilder setFirebaseApp(@Nullable FirebaseApp firebaseApp) {
|
189 | 194 |
|
190 | 195 | /**
|
191 | 196 | * Specifies the theme to use for the application flow. If no theme is specified,
|
192 |
| - * {@link #DEFAULT_THEME} will be used. |
| 197 | + * a default theme will be used. |
193 | 198 | */
|
194 | 199 | public SignInIntentBuilder setTheme(@StyleRes int theme) {
|
195 | 200 | mTheme = theme;
|
|
0 commit comments