Skip to content

Commit 12d0ace

Browse files
authored
Use Navigation in Firestore (#1268)
1 parent 4d6534e commit 12d0ace

31 files changed

+948
-936
lines changed

analytics/build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
buildscript {
44
repositories {
5-
jcenter()
65
mavenLocal()
76
google()
7+
jcenter()
88
}
99
dependencies {
1010
classpath 'com.android.tools.build:gradle:4.1.2'
@@ -17,7 +17,7 @@ allprojects {
1717
repositories {
1818
//mavenLocal() must be listed at the top to facilitate testing
1919
mavenLocal()
20-
jcenter()
2120
google()
21+
jcenter()
2222
}
2323
}

app-indexing/build.gradle

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
buildscript {
44
repositories {
5-
jcenter()
65
mavenLocal()
76
google()
7+
jcenter()
88
}
99
dependencies {
1010
classpath 'com.android.tools.build:gradle:4.1.2'
@@ -15,9 +15,9 @@ buildscript {
1515

1616
allprojects {
1717
repositories {
18-
//mavenLocal() must be listed at the top to facilitate testing
18+
// mavenLocal() must be listed at the top to facilitate testing
1919
mavenLocal()
20-
jcenter()
2120
google()
21+
jcenter()
2222
}
2323
}

auth/build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
buildscript {
44
repositories {
5-
jcenter()
65
mavenLocal()
76
google()
7+
jcenter()
88
}
99
dependencies {
1010
classpath 'com.android.tools.build:gradle:4.1.2'
@@ -17,8 +17,8 @@ allprojects {
1717
repositories {
1818
//mavenLocal() must be listed at the top to facilitate testing
1919
mavenLocal()
20-
jcenter()
2120
google()
21+
jcenter()
2222
}
2323
}
2424

build.gradle

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ buildscript {
1111
classpath 'com.google.gms:google-services:4.3.5'
1212
classpath 'com.google.firebase:perf-plugin:1.3.5'
1313
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.5.1'
14+
classpath 'androidx.navigation:navigation-safe-args-gradle-plugin:2.3.4'
1415
}
1516
}
1617

config/build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
buildscript {
44
repositories {
5-
jcenter()
65
mavenLocal()
76
google()
7+
jcenter()
88
}
99
dependencies {
1010
classpath 'com.android.tools.build:gradle:4.1.2'
@@ -17,7 +17,7 @@ allprojects {
1717
repositories {
1818
//mavenLocal() must be listed at the top to facilitate testing
1919
mavenLocal()
20-
jcenter()
2120
google()
21+
jcenter()
2222
}
2323
}

crash/build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
buildscript {
44
repositories {
5-
jcenter()
65
mavenLocal()
76
google()
7+
jcenter()
88
}
99
dependencies {
1010
classpath 'com.android.tools.build:gradle:4.1.2'
@@ -18,8 +18,8 @@ allprojects {
1818
repositories {
1919
//mavenLocal() must be listed at the top to facilitate testing
2020
mavenLocal()
21-
jcenter()
2221
google()
22+
jcenter()
2323
}
2424
}
2525

database/build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
buildscript {
44
repositories {
5-
jcenter()
65
mavenLocal()
76
google()
7+
jcenter()
88
}
99
dependencies {
1010
classpath 'com.android.tools.build:gradle:4.1.2'
@@ -17,8 +17,8 @@ allprojects {
1717
repositories {
1818
//mavenLocal() must be listed at the top to facilitate testing
1919
mavenLocal()
20-
jcenter()
2120
google()
21+
jcenter()
2222
}
2323
}
2424

firestore/app/build.gradle

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
apply plugin: 'com.android.application'
22
apply plugin: 'kotlin-android'
3+
apply plugin: 'androidx.navigation.safeargs'
34

45
android {
56
testBuildType "release"
@@ -62,17 +63,19 @@ dependencies {
6263

6364
// Support Libs
6465
implementation 'androidx.appcompat:appcompat:1.2.0'
65-
implementation 'androidx.core:core:1.3.2'
66+
implementation 'androidx.core:core-ktx:1.3.2'
6667
implementation 'androidx.vectordrawable:vectordrawable-animated:1.1.0'
6768
implementation 'androidx.cardview:cardview:1.0.0'
6869
implementation 'androidx.browser:browser:1.0.0'
6970
implementation 'com.google.android.material:material:1.3.0'
7071
implementation 'androidx.media:media:1.2.1'
7172
implementation 'androidx.recyclerview:recyclerview:1.1.0'
7273
implementation 'androidx.multidex:multidex:2.0.1'
74+
implementation 'androidx.navigation:navigation-fragment-ktx:2.3.4'
75+
implementation 'androidx.navigation:navigation-ui-ktx:2.3.4'
7376

7477
// Android architecture components
75-
implementation 'androidx.lifecycle:lifecycle-runtime:2.3.0'
78+
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.3.0'
7679
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
7780
annotationProcessor 'androidx.lifecycle:lifecycle-compiler:2.3.0'
7881

firestore/app/src/androidTest/java/com/google/firebase/example/fireeats/MainActivityTest.java

-113
This file was deleted.

firestore/app/src/main/AndroidManifest.xml

-12
Original file line numberDiff line numberDiff line change
@@ -22,22 +22,10 @@
2222

2323
<activity
2424
android:name=".java.MainActivity"
25-
android:theme="@style/AppTheme.Activity">
26-
27-
</activity>
28-
29-
<activity
30-
android:name=".java.RestaurantDetailActivity"
3125
android:theme="@style/AppTheme.Activity" />
3226

3327
<activity
3428
android:name=".kotlin.MainActivity"
35-
android:theme="@style/AppTheme.Activity">
36-
37-
</activity>
38-
39-
<activity
40-
android:name=".kotlin.RestaurantDetailActivity"
4129
android:theme="@style/AppTheme.Activity" />
4230
</application>
4331

firestore/app/src/main/java/com/google/firebase/example/fireeats/EntryChoiceActivity.kt

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package com.google.firebase.example.fireeats
33
import android.content.Intent
44
import com.firebase.example.internal.BaseEntryChoiceActivity
55
import com.firebase.example.internal.Choice
6+
import com.google.firebase.example.fireeats.kotlin.MainActivity
67

78
class EntryChoiceActivity : BaseEntryChoiceActivity() {
89

firestore/app/src/main/java/com/google/firebase/example/fireeats/java/FilterDialogFragment.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ public void onDestroyView() {
5555
public void onAttach(Context context) {
5656
super.onAttach(context);
5757

58-
if (context instanceof FilterListener) {
59-
mFilterListener = (FilterListener) context;
58+
if (getParentFragment() instanceof FilterListener) {
59+
mFilterListener = (FilterListener) getParentFragment();
6060
}
6161
}
6262

0 commit comments

Comments
 (0)