OpenGrok
Home
Sort by relevance
Sort by last modified time
Full Search
Definition
Symbol
File Path
History
|
|
Help
Searched
refs:NavGraph
(Results
1 - 17
of
17
) sorted by null
/frameworks/support/navigation/common/ktx/src/main/java/androidx/navigation/
NavGraph.kt
28
inline operator fun
NavGraph
.get(@IdRes id: Int): NavDestination =
32
operator fun
NavGraph
.contains(@IdRes id: Int): Boolean = findNode(id) != null
35
* Adds a destination to this
NavGraph
. The destination must have an
39
* the destination is already part of a [
NavGraph
], call
40
* [
NavGraph
.remove] before calling this method.</p>
44
inline operator fun
NavGraph
.plusAssign(node: NavDestination) {
50
* one parent, the destinations will be removed from the given
NavGraph
.
55
inline operator fun
NavGraph
.plusAssign(other:
NavGraph
) {
60
inline operator fun
NavGraph
.minusAssign(node: NavDestination)
[
all
...]
NavGraphBuilder.kt
22
* Construct a new [
NavGraph
]
31
* Construct a nested [
NavGraph
]
40
* DSL for constructing a new [
NavGraph
]
47
) : NavDestinationBuilder<
NavGraph
>(provider[NavGraphNavigator::class], id) {
71
override fun build():
NavGraph
= super.build().also {
navGraph
->
72
navGraph
.addDestinations(destinations)
76
navGraph
.startDestination = startDestination
/frameworks/support/navigation/runtime/ktx/src/main/java/androidx/navigation/
NavController.kt
22
* Construct a new [
NavGraph
]
28
):
NavGraph
= navigatorProvider.navigation(id, startDestination, block)
NavHost.kt
22
* Construct a new [
NavGraph
]
28
):
NavGraph
= navController.createGraph(id, startDestination, block)
/frameworks/support/navigation/common/src/main/java/androidx/navigation/
NavGraphNavigator.java
25
* A Navigator built specifically for {@link
NavGraph
} elements. Handles navigating to the
26
* correct destination when the
NavGraph
is the target of navigation actions.
29
public class NavGraphNavigator extends Navigator<
NavGraph
> {
34
* destination within a {@link
NavGraph
}.
42
* Creates a new {@link
NavGraph
} associated with this navigator.
47
public
NavGraph
createDestination() {
48
return new
NavGraph
(this);
52
public void navigate(@NonNull
NavGraph
destination, @Nullable Bundle args,
66
+ " is not a direct child of this
NavGraph
");
NavGraph.java
37
*
NavGraph
is a collection of {@link NavDestination} nodes fetchable by ID.
39
* <p>A
NavGraph
serves as a 'virtual' destination: while the
NavGraph
itself will not appear
40
* on the back stack, navigating to the
NavGraph
will cause the
43
public class
NavGraph
extends NavDestination implements Iterable<NavDestination> {
48
* Construct a new
NavGraph
. This
NavGraph
is not valid until you
52
* @param navigatorProvider The {@link NavController} which this
NavGraph
55
public
NavGraph
(@NonNull NavigatorProvider navigatorProvider) {
60
* Construct a new
NavGraph
. This NavGraph is not valid until yo
[
all
...]
NavDestination.java
72
private
NavGraph
mParent;
101
void setParent(
NavGraph
parent) {
106
* Gets the {@link
NavGraph
} that contains this destination. This will be set when a
107
* destination is added to a
NavGraph
via {@link
NavGraph
#addDestination}.
111
public
NavGraph
getParent() {
258
NavGraph
parent = current.getParent();
/frameworks/support/navigation/common/ktx/src/androidTest/java/androidx/navigation/
NavGraphTest.kt
37
val graph =
NavGraph
(navGraphNavigator)
46
val graph =
NavGraph
(navGraphNavigator)
58
val graph =
NavGraph
(navGraphNavigator)
59
val other =
NavGraph
(navGraphNavigator)
63
assertTrue("
NavGraph
should have destination1 from other",
68
assertTrue("
NavGraph
should have destination2 from other",
76
val graph =
NavGraph
(navGraphNavigator)
/frameworks/support/navigation/common/src/test/java/androidx/navigation/
NavGraphTest.java
68
private
NavGraph
createGraphWithDestination(NavDestination destination) {
69
NavGraph
graph = mNavGraphNavigator.createDestination();
74
private
NavGraph
createGraphWithDestinations(NavDestination... destinations) {
75
NavGraph
graph = mNavGraphNavigator.createDestination();
82
NavGraph
graph = mNavGraphNavigator.createDestination();
90
NavGraph
graph = createGraphWithDestination(destination);
98
NavGraph
graph = mNavGraphNavigator.createDestination();
113
NavGraph
graph = createGraphWithDestinations(destination, secondDestination);
124
NavGraph
graph = createGraphWithDestination(destination);
140
NavGraph
other = mNavGraphNavigator.createDestination()
[
all
...]
NavDestinationTest.java
48
NavGraph
parent = new
NavGraph
(mock(Navigator.class));
/frameworks/support/navigation/runtime/src/androidTest/java/androidx/navigation/
NavInflaterTest.java
51
NavGraph
graph = navInflater.inflate(R.navigation.nav_simple);
53
assertThat(graph, is(notNullValue(
NavGraph
.class)));
61
NavGraph
graph = navInflater.inflate(R.navigation.nav_simple);
63
assertThat(graph, is(notNullValue(
NavGraph
.class)));
108
NavGraph
graph = navInflater.inflate(R.navigation.nav_default_arguments);
NavControllerTest.java
74
assertThat(navController.getGraph(), is(nullValue(
NavGraph
.class)));
77
assertThat(navController.getGraph(), is(notNullValue(
NavGraph
.class)));
121
NavGraph
graph = new NavInflater(context, navController.getNavigatorProvider())
132
assertThat(navController.getGraph(), is(nullValue(
NavGraph
.class)));
/frameworks/support/navigation/runtime/src/main/java/androidx/navigation/
NavDeepLinkBuilder.java
34
* Class used to construct deep links to a particular destination in a {@link
NavGraph
}.
44
* The parent of the destination is the {@link
NavGraph
#getStartDestination() start destination}
45
* of the containing {@link
NavGraph
navigation graph}. In the cases where the destination is
56
private
NavGraph
mGraph;
93
* which uses the same {@link
NavGraph
} used to construct this
106
* which uses the same {@link
NavGraph
} used to construct this
119
* @param navGraphId ID of the {@link
NavGraph
} containing the deep link destination
131
* @param
navGraph
The {@link
NavGraph
} containing the deep link destination
135
public NavDeepLinkBuilder setGraph(@NonNull
NavGraph
navGraph)
[
all
...]
NavInflater.java
39
* Class which translates a navigation XML file into a {@link
NavGraph
}
77
* Inflates {@link
NavGraph
navigation graph} as specified in the application manifest.
89
public
NavGraph
inflateMetadataGraph() {
100
* Inflate a
NavGraph
from the given XML resource id.
107
public
NavGraph
inflate(@NavigationRes int graphResId) {
123
if (!(destination instanceof
NavGraph
)) {
125
+ " did not inflate into a
NavGraph
");
127
return (
NavGraph
) destination;
166
} else if (TAG_INCLUDE.equals(name) && dest instanceof
NavGraph
) {
169
((
NavGraph
) dest).addDestination(inflate(id))
[
all
...]
NavController.java
45
* {@link
NavGraph
navigation graph} owned by the controller. These graphs are typically
70
private
NavGraph
mGraph;
182
* to construct the {@link
NavGraph
navigation graph} for this nav controller should be added
306
NavGraph
parent = currentDestination.getParent();
335
* Sets the {@link
NavGraph
navigation graph} as specified in the application manifest.
352
NavGraph
metadataGraph = getNavInflater().inflateMetadataGraph();
372
* Sets the {@link
NavGraph
navigation graph} to the specified resource.
380
* @see #setGraph(
NavGraph
)
390
* Sets the {@link
NavGraph
navigation graph} to the specified graph.
399
public void setGraph(@NonNull
NavGraph
graph)
[
all
...]
/frameworks/support/navigation/ui/src/main/java/androidx/navigation/ui/
NavigationUI.java
39
import androidx.navigation.
NavGraph
;
250
* destination is itself a
NavGraph
.
252
private static NavDestination findStartDestination(@NonNull
NavGraph
graph) {
254
while (startDestination instanceof
NavGraph
) {
255
NavGraph
parent = (
NavGraph
) startDestination;
/frameworks/support/navigation/fragment/src/main/java/androidx/navigation/fragment/
NavHostFragment.java
33
import androidx.navigation.
NavGraph
;
55
* app:
navGraph
="@xml/nav_sample"
65
* the navigation host. This includes the {@link
NavGraph
navigation graph} as well as navigation
126
* Create a new NavHostFragment instance with an inflated {@link
NavGraph
} resource.
163
* Set a {@link
NavGraph
} for this navigation host's {@link NavController} by resource id.
Completed in 486 milliseconds