Skip to content

Commit 42fa51c

Browse files
SUPERCILEXsamtstern
authored andcommitted
Auth code cleanup (#376)
1 parent 079e9b6 commit 42fa51c

File tree

92 files changed

+513
-846
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

92 files changed

+513
-846
lines changed

.travis.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ language: android
22
jdk: oraclejdk8
33
# See https://github.com/travis-ci/travis-ci/issues/5582
44
sudo: required
5-
# See https://docs.travis-ci.com/user/languages/java/#Caching
65
before_cache:
76
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
87
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
@@ -18,8 +17,6 @@ android:
1817
- android-25
1918

2019
# Extras
21-
- extra-google-google_play_services
2220
- extra-google-m2repository
2321
- extra-android-m2repository
24-
- addon-google_apis-google-24
2522
script: ./gradlew clean :library:testAll :library:prepareArtifacts

app/build.gradle

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ apply plugin: 'com.neenbedankt.android-apt'
33
apply from: "../common/constants.gradle"
44

55
android {
6-
compileSdkVersion project.ext.compileSdk
7-
buildToolsVersion "${project.ext.buildtools}"
6+
compileSdkVersion compileSdk
7+
buildToolsVersion buildTools
88

99
defaultConfig {
1010
applicationId "com.firebase.uidemo"
1111
minSdkVersion 16
12-
targetSdkVersion project.ext.targetSdk
12+
targetSdkVersion targetSdk
1313
versionCode 1
1414
versionName "1.0"
1515
}
@@ -24,32 +24,28 @@ android {
2424
signingConfig signingConfigs.debug
2525
}
2626
}
27-
2827
}
2928

3029
dependencies {
3130
compile fileTree(dir: 'libs', include: ['*.jar'])
32-
compile "com.android.support:appcompat-v7:${project.ext.support_library_version}"
33-
compile "com.android.support:design:${project.ext.support_library_version}"
34-
compile "com.android.support:recyclerview-v7:${project.ext.support_library_version}"
35-
compile "com.android.support:support-v4:${project.ext.support_library_version}"
31+
compile "com.android.support:design:$support_library_version"
3632

3733
compile project(path: ':auth')
3834
compile project(path: ':database')
3935
compile project(path: ':storage')
4036

41-
compile "com.google.firebase:firebase-database:${project.ext.firebase_version}"
42-
compile "com.google.firebase:firebase-auth:${project.ext.firebase_version}"
43-
compile "com.google.firebase:firebase-storage:${project.ext.firebase_version}"
44-
compile "com.google.android.gms:play-services-auth:${project.ext.firebase_version}"
37+
compile "com.google.android.gms:play-services-auth:$firebase_version"
38+
compile "com.google.firebase:firebase-auth:$firebase_version"
39+
compile "com.google.firebase:firebase-database:$firebase_version"
40+
compile "com.google.firebase:firebase-storage:$firebase_version"
4541

4642
// The following dependencies are not required to use the Firebase UI library.
4743
// They are used to make some aspects of the demo app implementation simpler for
4844
// demonstrative purposes, and you may find them useful in your own apps; YMMV.
49-
compile 'com.jakewharton:butterknife:8.0.1'
5045
compile 'com.github.bumptech.glide:glide:3.7.0'
51-
compile 'pub.devrel:easypermissions:0.2.0'
52-
apt 'com.jakewharton:butterknife-compiler:8.0.1'
46+
compile 'pub.devrel:easypermissions:0.2.1'
47+
compile 'com.jakewharton:butterknife:8.4.0'
48+
apt 'com.jakewharton:butterknife-compiler:8.4.0'
5349
}
5450

5551
apply plugin: 'com.google.gms.google-services'

app/src/main/AndroidManifest.xml

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2+
<manifest
3+
xmlns:android="http://schemas.android.com/apk/res/android"
34
package="com.firebase.uidemo">
45

5-
<uses-permission android:name="android.permission.INTERNET" />
6-
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
6+
<uses-permission android:name="android.permission.INTERNET"/>
7+
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
78

89
<application
910
android:allowBackup="true"
@@ -12,30 +13,31 @@
1213
android:theme="@style/AppTheme">
1314
<activity android:name=".ChooserActivity">
1415
<intent-filter>
15-
<action android:name="android.intent.action.MAIN" />
16-
<category android:name="android.intent.category.LAUNCHER" />
16+
<action android:name="android.intent.action.MAIN"/>
17+
<category android:name="android.intent.category.LAUNCHER"/>
1718
</intent-filter>
18-
<meta-data android:name="android.app.shortcuts"
19-
android:resource="@xml/shortcuts" />
19+
<meta-data
20+
android:name="android.app.shortcuts"
21+
android:resource="@xml/shortcuts"/>
2022
</activity>
2123

2224
<!-- Chat demo -->
2325
<activity
2426
android:name=".database.ChatActivity"
25-
android:label="@string/name_chat" />
27+
android:label="@string/name_chat"/>
2628

2729
<!-- Auth UI demo -->
2830
<activity
2931
android:name=".auth.AuthUiActivity"
30-
android:label="@string/name_auth_ui" />
32+
android:label="@string/name_auth_ui"/>
3133
<activity
3234
android:name=".auth.SignedInActivity"
33-
android:label="@string/name_auth_ui" />
35+
android:label="@string/name_auth_ui"/>
3436

3537
<!-- Storage UI demo-->
3638
<activity
3739
android:name=".storage.ImageActivity"
38-
android:label="@string/name_image" />
40+
android:label="@string/name_image"/>
3941
</application>
4042

4143
</manifest>

app/src/main/res/drawable/chat_message_arrow.xml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,12 @@
44
android:fromDegrees="45"
55
android:toDegrees="45"
66
android:pivotX="-40%"
7-
android:pivotY="87%" >
7+
android:pivotY="87%">
88
<shape
9-
android:shape="rectangle" >
10-
<stroke android:color="@android:color/transparent" android:width="10dp"/>
11-
<solid
12-
android:color="@color/material_grey_300" />
9+
android:shape="rectangle">
10+
<stroke
11+
android:color="@android:color/transparent"
12+
android:width="10dp"/>
13+
<solid android:color="@color/material_grey_300"/>
1314
</shape>
1415
</rotate>
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
2+
<shape
3+
xmlns:android="http://schemas.android.com/apk/res/android"
4+
android:shape="rectangle">
35
<corners android:radius="4dp"/>
4-
<solid android:color="@color/material_grey_300" />
6+
<solid android:color="@color/material_grey_300"/>
57
</shape>
Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
2+
<RelativeLayout
3+
xmlns:android="http://schemas.android.com/apk/res/android"
34
xmlns:tools="http://schemas.android.com/tools"
45
android:layout_width="match_parent"
56
android:layout_height="match_parent"
6-
77
tools:context=".database.ChatActivity">
88

99
<android.support.v7.widget.RecyclerView
@@ -16,7 +16,7 @@
1616
android:layout_alignParentTop="true"
1717
android:clipToPadding="false"
1818
android:padding="16dp"
19-
tools:listitem="@layout/message" />
19+
tools:listitem="@layout/message"/>
2020

2121
<LinearLayout
2222
android:id="@+id/footer"
@@ -26,21 +26,24 @@
2626
android:layout_alignParentLeft="true"
2727
android:layout_alignParentStart="true"
2828
android:orientation="horizontal"
29+
android:paddingStart="16dp"
30+
android:paddingEnd="16dp"
2931
android:paddingLeft="16dp">
3032

3133
<EditText
3234
android:id="@+id/messageEdit"
33-
android:layout_width="wrap_content"
35+
android:layout_width="0dp"
3436
android:layout_height="wrap_content"
35-
android:layout_weight="1" />
37+
android:layout_weight="1"/>
3638

3739
<Button
3840
android:id="@+id/sendButton"
3941
style="@style/Widget.AppCompat.Button.Borderless.Colored"
4042
android:layout_width="wrap_content"
4143
android:layout_height="wrap_content"
42-
android:layout_gravity="bottom|right"
43-
android:text="Send" />
44+
android:layout_gravity="bottom|end"
45+
android:text="Send"/>
46+
4447
</LinearLayout>
4548

4649
</RelativeLayout>

app/src/main/res/layout/activity_chooser.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
2+
<LinearLayout
3+
xmlns:android="http://schemas.android.com/apk/res/android"
34
android:layout_width="match_parent"
45
android:layout_height="match_parent"
56
android:orientation="vertical"

app/src/main/res/layout/activity_image.xml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
3-
xmlns:app="http://schemas.android.com/apk/res-auto"
2+
<LinearLayout
3+
xmlns:android="http://schemas.android.com/apk/res/android"
44
xmlns:tools="http://schemas.android.com/tools"
55
android:layout_width="match_parent"
66
android:layout_height="match_parent"
@@ -15,20 +15,20 @@
1515
style="@style/TextAppearance.AppCompat.Medium"
1616
android:layout_width="wrap_content"
1717
android:layout_height="wrap_content"
18-
android:text="Upload" />
18+
android:text="Upload"/>
1919

2020
<Button
2121
android:id="@+id/button_choose_photo"
2222
android:layout_width="wrap_content"
2323
android:layout_height="wrap_content"
24-
android:text="Choose Image" />
24+
android:text="Choose Image"/>
2525

2626
<TextView
2727
style="@style/TextAppearance.AppCompat.Medium"
2828
android:layout_width="wrap_content"
2929
android:layout_height="wrap_content"
3030
android:layout_marginTop="20dp"
31-
android:text="Download" />
31+
android:text="Download"/>
3232

3333
<LinearLayout
3434
android:layout_width="wrap_content"
@@ -40,7 +40,7 @@
4040
android:layout_width="wrap_content"
4141
android:layout_height="wrap_content"
4242
android:enabled="false"
43-
android:text="Download" />
43+
android:text="Download"/>
4444

4545
</LinearLayout>
4646

@@ -51,6 +51,6 @@
5151
android:scaleType="centerCrop"
5252
android:src="#E6E6E6"
5353
android:visibility="invisible"
54-
tools:visibility="visible" />
54+
tools:visibility="visible"/>
5555

5656
</LinearLayout>

0 commit comments

Comments
 (0)