Fixed
Status Update
Comments
il...@google.com <il...@google.com>
ap...@google.com <ap...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-master-dev
commit 5fd27fdcff532538fbc99f2932e318f9bd600910
Author: Ian Lake <ilake@google.com>
Date: Fri Oct 05 13:37:26 2018
Allow a set of top level destinations in NavigationUI
Rather than only allowing the start destination
of the graph to be a top level destination (i.e.,
a destination where the Up button does not appear),
allow developers to specify exactly what destinations
they want to appear as top level destinations.
The typical use cases include:
- all destinations in a navigation drawer
- all destinations in a bottom nav
- The start destination of a mandatory sign in flow
The default is still the start destination of your
navigation graph as the only top level destination.
Test: new AppBarConfigurationTest, changes to testapp
BUG: 117333663
Change-Id: Iac8773cf0d5ddcd258a9029a51c6f6735d800384
M navigation/integration-tests/testapp/src/main/java/androidx/navigation/testapp/NavigationActivity.kt
M navigation/ui/build.gradle
M navigation/ui/ktx/api/current.txt
M navigation/ui/ktx/src/main/java/androidx/navigation/ui/Activity.kt
M navigation/ui/ktx/src/main/java/androidx/navigation/ui/CollapsingToolbarLayout.kt
M navigation/ui/ktx/src/main/java/androidx/navigation/ui/DrawerLayout.kt
A navigation/ui/ktx/src/main/java/androidx/navigation/ui/NavController.kt
M navigation/ui/ktx/src/main/java/androidx/navigation/ui/Toolbar.kt
M navigation/ui/src/androidTest/java/androidx/navigation/ui/AppBarConfigurationTest.kt
M navigation/ui/src/main/java/androidx/navigation/ui/AbstractAppBarOnNavigatedListener.java
M navigation/ui/src/main/java/androidx/navigation/ui/AppBarConfiguration.java
M navigation/ui/src/main/java/androidx/navigation/ui/NavigationUI.java
https://android-review.googlesource.com/780044
https://goto.google.com/android-sha1/5fd27fdcff532538fbc99f2932e318f9bd600910
Branch: androidx-master-dev
commit 5fd27fdcff532538fbc99f2932e318f9bd600910
Author: Ian Lake <ilake@google.com>
Date: Fri Oct 05 13:37:26 2018
Allow a set of top level destinations in NavigationUI
Rather than only allowing the start destination
of the graph to be a top level destination (i.e.,
a destination where the Up button does not appear),
allow developers to specify exactly what destinations
they want to appear as top level destinations.
The typical use cases include:
- all destinations in a navigation drawer
- all destinations in a bottom nav
- The start destination of a mandatory sign in flow
The default is still the start destination of your
navigation graph as the only top level destination.
Test: new AppBarConfigurationTest, changes to testapp
BUG: 117333663
Change-Id: Iac8773cf0d5ddcd258a9029a51c6f6735d800384
M navigation/integration-tests/testapp/src/main/java/androidx/navigation/testapp/NavigationActivity.kt
M navigation/ui/build.gradle
M navigation/ui/ktx/api/current.txt
M navigation/ui/ktx/src/main/java/androidx/navigation/ui/Activity.kt
M navigation/ui/ktx/src/main/java/androidx/navigation/ui/CollapsingToolbarLayout.kt
M navigation/ui/ktx/src/main/java/androidx/navigation/ui/DrawerLayout.kt
A navigation/ui/ktx/src/main/java/androidx/navigation/ui/NavController.kt
M navigation/ui/ktx/src/main/java/androidx/navigation/ui/Toolbar.kt
M navigation/ui/src/androidTest/java/androidx/navigation/ui/AppBarConfigurationTest.kt
M navigation/ui/src/main/java/androidx/navigation/ui/AbstractAppBarOnNavigatedListener.java
M navigation/ui/src/main/java/androidx/navigation/ui/AppBarConfiguration.java
M navigation/ui/src/main/java/androidx/navigation/ui/NavigationUI.java
il...@google.com <il...@google.com> #3
This feature will be available in 1.0.0-alpha07.
ap...@google.com <ap...@google.com> #4
Project: platform/frameworks/support
Branch: androidx-master-dev
commit 63c127b60222bf015ef4a8281c31a47025dfe310
Author: Ian Lake <ilake@google.com>
Date: Thu Oct 18 16:07:53 2018
Expose AppBarConfiguration APIs in navigation-ktx
Previously, navigation-ktx methods totally hid the
AppBarConfiguration object from the API surface.
While convenient, this leads to issues where the API
surface continues to change whenever AppBarConfiguration
changes. It also prevented developers from reusing the
same AppBarConfiguration object in other APIs, such
as the NavController.navigateUp(AppBarConfiguration) API
needed for ActionBar integration.
By providing a AppBarConfiguration extension constructors
to encapsulate the AppBarConfiguration.Builder, we retain
much of the improved API surface while making it clear that
we're using AppBarConfiguration as the primitive for
all of these APIs.
The Kotlin extensions now mirror the NavigationUI API surface,
with a method that takes a DrawerLayout (without a default
value to prevent ambiguous calls) and a separate method that
takes an AppBarConfiguration.
Test: testapp still works
BUG: 117333663
Change-Id: I46c58731913a514a373783b6e791420272e2c83b
M navigation/integration-tests/testapp/src/main/java/androidx/navigation/testapp/NavigationActivity.kt
M navigation/ui/ktx/api/1.0.0-alpha07.txt
M navigation/ui/ktx/src/main/java/androidx/navigation/ui/Activity.kt
A navigation/ui/ktx/src/main/java/androidx/navigation/ui/AppBarConfiguration.kt
M navigation/ui/ktx/src/main/java/androidx/navigation/ui/CollapsingToolbarLayout.kt
M navigation/ui/ktx/src/main/java/androidx/navigation/ui/NavController.kt
M navigation/ui/ktx/src/main/java/androidx/navigation/ui/Toolbar.kt
M navigation/ui/src/main/java/androidx/navigation/ui/AppBarConfiguration.java
https://android-review.googlesource.com/793932
https://goto.google.com/android-sha1/63c127b60222bf015ef4a8281c31a47025dfe310
Branch: androidx-master-dev
commit 63c127b60222bf015ef4a8281c31a47025dfe310
Author: Ian Lake <ilake@google.com>
Date: Thu Oct 18 16:07:53 2018
Expose AppBarConfiguration APIs in navigation-ktx
Previously, navigation-ktx methods totally hid the
AppBarConfiguration object from the API surface.
While convenient, this leads to issues where the API
surface continues to change whenever AppBarConfiguration
changes. It also prevented developers from reusing the
same AppBarConfiguration object in other APIs, such
as the NavController.navigateUp(AppBarConfiguration) API
needed for ActionBar integration.
By providing a AppBarConfiguration extension constructors
to encapsulate the AppBarConfiguration.Builder, we retain
much of the improved API surface while making it clear that
we're using AppBarConfiguration as the primitive for
all of these APIs.
The Kotlin extensions now mirror the NavigationUI API surface,
with a method that takes a DrawerLayout (without a default
value to prevent ambiguous calls) and a separate method that
takes an AppBarConfiguration.
Test: testapp still works
BUG: 117333663
Change-Id: I46c58731913a514a373783b6e791420272e2c83b
M navigation/integration-tests/testapp/src/main/java/androidx/navigation/testapp/NavigationActivity.kt
M navigation/ui/ktx/api/1.0.0-alpha07.txt
M navigation/ui/ktx/src/main/java/androidx/navigation/ui/Activity.kt
A navigation/ui/ktx/src/main/java/androidx/navigation/ui/AppBarConfiguration.kt
M navigation/ui/ktx/src/main/java/androidx/navigation/ui/CollapsingToolbarLayout.kt
M navigation/ui/ktx/src/main/java/androidx/navigation/ui/NavController.kt
M navigation/ui/ktx/src/main/java/androidx/navigation/ui/Toolbar.kt
M navigation/ui/src/main/java/androidx/navigation/ui/AppBarConfiguration.java
Description
Version used: 1.0.0-alpha06
Currently, NavigationUI is hard coded to only hide the Up button on the start destination of the navigation graph. Particularly in cases where you're using bottom nav or a navigation drawer, it is advantageous to hide the Up button on all of those top level destinations.
NavigationUI should offer a way to pass in exactly what those top level destinations are. It should default to the start destination of the navigation graph, as it was before.