Skip to content

Commit ee71114

Browse files
committed
Update to alpha8 and AppBarConfiguration
1 parent de2dc14 commit ee71114

File tree

4 files changed

+19
-14
lines changed

4 files changed

+19
-14
lines changed

app/build.gradle

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,11 @@ dependencies {
5656
// Kotlin
5757
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$rootProject.kotlinVersion"
5858

59-
implementation 'com.google.android.material:material:' + rootProject.supportVersion
60-
implementation 'androidx.appcompat:appcompat:' + rootProject.supportVersion
61-
implementation 'androidx.cardview:cardview:' + rootProject.supportVersion
62-
implementation 'androidx.recyclerview:recyclerview:' + rootProject.supportVersion
59+
implementation 'com.google.android.material:material:' + rootProject.materialVersion
60+
implementation 'androidx.appcompat:appcompat:' + rootProject.appCompatVersion
61+
implementation 'androidx.cardview:cardview:' + rootProject.cardViewVersion
62+
implementation 'androidx.recyclerview:recyclerview:' + rootProject.recyclerVersion
63+
6364
implementation 'androidx.constraintlayout:constraintlayout:' + rootProject.constraintLayoutVersion
6465

6566
// Navigation

app/src/main/java/com/example/android/codelabs/navigation/MainActivity.kt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class MainActivity : AppCompatActivity() {
5353

5454
setupBottomNavMenu(navController)
5555

56-
navController.addOnNavigatedListener { _, destination ->
56+
navController.addOnDestinationChangedListener { _, destination, _ ->
5757
val dest: String = try {
5858
resources.getResourceName(destination.id)
5959
} catch (e: Resources.NotFoundException) {
@@ -88,7 +88,8 @@ class MainActivity : AppCompatActivity() {
8888
// // And, since we are passing in drawerLayout, it will also determine whether to
8989
// // show the up arrow or drawer menu icon
9090
// drawerLayout = findViewById(R.id.drawer_layout)
91-
// setupActionBarWithNavController(navController, drawerLayout)
91+
// val appBarConfiguration = AppBarConfiguration(navController.graph, drawerLayout)
92+
// setupActionBarWithNavController(navController, appBarConfiguration)
9293
// TODO END STEP 9.5
9394
}
9495

@@ -120,7 +121,7 @@ class MainActivity : AppCompatActivity() {
120121
// override fun onSupportNavigateUp(): Boolean {
121122
// // Allows NavigationUI to support proper up navigation or the drawer layout
122123
// // drawer menu, depending on the situation
123-
// return drawerLayout.navigateUp(findNavController(R.id.my_nav_host_fragment))
124+
// return findNavController(R.id.my_nav_host_fragment).navigateUp(drawerLayout)
124125
// }
125126
// TODO END STEP 9.6
126127
}

build.gradle

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@
1919
buildscript {
2020

2121
ext {
22-
kotlinVersion = '1.2.71'
22+
kotlinVersion = '1.3.11'
2323
}
2424
repositories {
2525
google()
2626
jcenter()
2727
}
2828
dependencies {
29-
classpath 'com.android.tools.build:gradle:3.2.1'
30-
classpath 'android.arch.navigation:navigation-safe-args-gradle-plugin:1.0.0-alpha06'
29+
classpath 'com.android.tools.build:gradle:3.3.0-rc02'
30+
classpath 'android.arch.navigation:navigation-safe-args-gradle-plugin:1.0.0-alpha07'
3131
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
3232
// NOTE: Do not place your application dependencies here; they belong
3333
// in the individual module build.gradle files
@@ -46,7 +46,10 @@ task clean(type: Delete) {
4646
}
4747

4848
ext {
49-
supportVersion = "1.0.0"
50-
navigationVersion = "1.0.0-alpha06"
49+
appCompatVersion = "1.1.0-alpha01"
50+
recyclerVersion = "1.1.0-alpha01"
51+
cardViewVersion = "1.0.0"
52+
materialVersion = "1.1.0-alpha01"
53+
navigationVersion = "1.0.0-alpha08"
5154
constraintLayoutVersion = "2.0.0-alpha2"
5255
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Fri Oct 12 16:41:37 PDT 2018
1+
#Wed Dec 05 17:39:43 PST 2018
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-5.0-milestone-1-all.zip

0 commit comments

Comments
 (0)