Skip to content

Commit 766ef86

Browse files
committed
Merge branch 'master' into version-3.0.1-dev
Change-Id: Ibb982a03e14834cf16a0624aac55f6ebc4680330
2 parents de21aae + 1a6f14b commit 766ef86

File tree

9 files changed

+28
-80
lines changed

9 files changed

+28
-80
lines changed

.travis.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,14 @@ cache:
1010
- $HOME/.gradle/caches/
1111
- $HOME/.gradle/wrapper/
1212
- $HOME/.android/build-cache
13-
before_install:
14-
- mkdir "$ANDROID_HOME/licenses" || true
15-
- echo -e "\n8933bad161af4178b1185d1a37fbf41ea5269c55" > "$ANDROID_HOME/licenses/android-sdk-license"
16-
- echo -e "\n84831b9409646a918e30573bab4c9c91346d8abd" > "$ANDROID_HOME/licenses/android-sdk-preview-license"
1713
android:
1814
components:
1915
# https://github.com/travis-ci/travis-ci/issues/6040#issuecomment-219367943
2016
- tools
2117
- tools
2218
before_script:
2319
- mv library/google-services.json app/google-services.json
24-
- ${ANDROID_HOME}tools/bin/sdkmanager --channel=3 "tools" "platform-tools" "build-tools;26.0.1" "platforms;android-26" "extras;google;m2repository"
20+
- echo y | ${ANDROID_HOME}tools/bin/sdkmanager --channel=3 "tools" "platform-tools" "build-tools;26.0.1" "platforms;android-26" "extras;google;m2repository"
2521
script: ./gradlew clean assembleDebug check
2622
after_failure:
2723
# tests

app/src/main/java/com/firebase/uidemo/auth/AuthUiActivity.java

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import android.support.annotation.StyleRes;
2424
import android.support.design.widget.Snackbar;
2525
import android.support.v7.app.AppCompatActivity;
26+
import android.support.v7.app.AppCompatDelegate;
2627
import android.view.View;
2728
import android.widget.Button;
2829
import android.widget.CheckBox;
@@ -193,6 +194,10 @@ public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
193194
if (isGoogleMisconfigured() || isFacebookMisconfigured() || isTwitterMisconfigured()) {
194195
showSnackbar(R.string.configuration_required);
195196
}
197+
198+
if (AppCompatDelegate.getDefaultNightMode() == AppCompatDelegate.MODE_NIGHT_YES) {
199+
mUseDarkTheme.setChecked(true);
200+
}
196201
}
197202

198203
@OnClick(R.id.sign_in)
@@ -281,22 +286,26 @@ private void setFacebookScopesEnabled(boolean enabled) {
281286
mFacebookScopePhotos.setEnabled(enabled);
282287
}
283288

289+
@OnClick({R.id.default_theme, R.id.purple_theme, R.id.green_theme, R.id.dark_theme})
290+
public void toggleDarkTheme() {
291+
int mode = mUseDarkTheme.isChecked() ?
292+
AppCompatDelegate.MODE_NIGHT_YES : AppCompatDelegate.MODE_NIGHT_AUTO;
293+
AppCompatDelegate.setDefaultNightMode(mode);
294+
getDelegate().setLocalNightMode(mode);
295+
}
296+
284297
@MainThread
285298
@StyleRes
286299
private int getSelectedTheme() {
287-
if (mUseDefaultTheme.isChecked()) {
288-
return AuthUI.getDefaultTheme();
300+
if (mUseGreenTheme.isChecked()) {
301+
return R.style.GreenTheme;
289302
}
290303

291304
if (mUsePurpleTheme.isChecked()) {
292305
return R.style.PurpleTheme;
293306
}
294307

295-
if (mUseDarkTheme.isChecked()) {
296-
return R.style.DarkTheme;
297-
}
298-
299-
return R.style.GreenTheme;
308+
return AuthUI.getDefaultTheme();
300309
}
301310

302311
@MainThread
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<resources>
2+
<color name="colorPrimary">#016AA8</color>
3+
<color name="colorPrimaryDark">#01579B</color>
4+
</resources>

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

Lines changed: 0 additions & 38 deletions
This file was deleted.

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

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,6 @@
33
<color name="colorPrimaryDark">#0288D1</color>
44
<color name="colorAccent">#FFA000</color>
55

6-
<!-- Text -->
7-
<color name="text_default_material_dark_primary">#ffffffff</color>
8-
<color name="text_default_material_light_primary">#de000000</color>
9-
<color name="text_default_material_dark_secondary">#b3ffffff</color>
10-
<color name="text_default_material_light_secondary">#8a000000</color>
11-
126
<color name="material_deep_purple_50">#EDE7F6</color>
137
<color name="material_deep_purple_500">#673AB7</color>
148
<color name="material_deep_purple_700">#512DA8</color>
@@ -20,15 +14,9 @@
2014

2115
<color name="material_gray_300">#E0E0E0</color>
2216
<color name="material_gray_500">#9e9e9e</color>
23-
<color name="material_gray_850">#ff303030</color>
24-
<color name="material_gray_900">#ff212121</color>
2517

2618
<color name="material_lime_a700">#AEEA00</color>
27-
28-
<color name="material_purple_50">#F3E5F5</color>
2919
<color name="material_purple_a700">#AA00FF</color>
30-
3120
<color name="material_red_a200">#FF5252</color>
3221

33-
<color name="material_deep_teal_a200">#ff80cbc4</color>
3422
</resources>

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

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,6 @@
2121
<item name="android:windowBackground">@color/material_green_50</item>
2222
</style>
2323

24-
<style name="DarkTheme">
25-
<item name="colorPrimary">@color/material_gray_900</item>
26-
<item name="colorPrimaryDark">@android:color/black</item>
27-
<item name="colorAccent">@android:color/black</item>
28-
<item name="android:colorBackground">@color/material_gray_850</item>
29-
<item name="android:colorForeground">@android:color/white</item>
30-
<item name="android:textColor">@color/text_default_material_dark_primary</item>
31-
<item name="android:textColorPrimary">@color/text_default_material_dark_primary</item>
32-
<item name="android:textColorPrimaryInverse">@color/text_default_material_light_primary</item>
33-
<item name="android:textColorSecondary">@color/text_default_material_dark_secondary</item>
34-
<item name="android:textColorSecondaryInverse">@color/text_default_material_light_secondary</item>
35-
<item name="android:windowBackground">@color/material_gray_850</item>
36-
</style>
37-
3824
<style name="WarnButton" parent="Widget.AppCompat.Button.Colored">
3925
<item name="colorButtonNormal">@color/material_red_a200</item>
4026
<item name="android:textColor">@android:color/white</item>

auth/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ dependencies {
4949
compile 'com.firebaseui:firebase-ui-auth:3.0.0'
5050
5151
// Required only if Facebook login support is required
52-
compile('com.facebook.android:facebook-android-sdk:4.26.0')
52+
compile 'com.facebook.android:facebook-login:4.27.0'
5353
5454
// Required only if Twitter login support is required
5555
compile("com.twitter.sdk.android:twitter-core:3.0.0@aar") { transitive = true }

library/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ dependencies {
3535
}
3636

3737
/**
38-
* Returns list of tasks names that prepareArtfacts should depend on.
38+
* Returns list of tasks names that prepareArtifacts should depend on.
3939
*/
4040
def prepareArtifactsTasks() {
4141
return submodules.collect { name ->

storage/README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ To load an image from a `StorageReference`, first register in your `AppGlideModu
1919
public class MyAppGlideModule extends AppGlideModule {
2020

2121
@Override
22-
public void registerComponents(Context context, Registry registry) {
22+
public void registerComponents(Context context, Glide glide, Registry registry) {
2323
// Register FirebaseImageLoader to handle StorageReference
2424
registry.append(StorageReference.class, InputStream.class,
2525
new FirebaseImageLoader.Factory());
@@ -38,11 +38,13 @@ ImageView imageView = ...;
3838

3939
// Download directly from StorageReference using Glide
4040
// (See MyAppGlideModule for Loader registration)
41-
GlidApp.with(this /* context */)
41+
GlideApp.with(this /* context */)
4242
.load(storageReference)
4343
.into(imageView);
4444
```
4545

46+
If GlideApp is not an importable class, build your application first before trying to use. For more information, see Glide v4 ['Generated API'][generated-api] documentation.
47+
4648
Images displayed using `FirebaseImageLoader` are cached by their path in Cloud Storage, so
4749
repeated loads will be fast and conserve bandwidth. For more information on caching in Glide,
4850
see [this guide][glide-caching].
@@ -51,3 +53,4 @@ see [this guide][glide-caching].
5153
[glide]: https://github.com/bumptech/glide
5254
[storage-reference]: https://firebase.google.com/docs/reference/android/com/google/firebase/storage/StorageReference
5355
[glide-caching]: https://github.com/bumptech/glide/wiki/Caching-and-Cache-Invalidation
56+
[generated-api]: https://bumptech.github.io/glide/doc/generatedapi.html

0 commit comments

Comments
 (0)