Skip to content

Commit 0c7b01b

Browse files
committed
Add READMEs for each recipe.
Remove duplicate content from Activity kdocs.
1 parent f3ab73b commit 0c7b01b

File tree

18 files changed

+10
-131
lines changed

18 files changed

+10
-131
lines changed

app/src/main/java/com/example/nav3recipes/animations/AnimatedActivity.kt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,6 @@ import com.example.nav3recipes.ui.setEdgeToEdgeConfig
2525
import kotlinx.serialization.Serializable
2626

2727

28-
/**
29-
* This recipe shows how to override the default animations at the `NavDisplay` level, and at the
30-
* individual destination level, shown for `ScreenC`.
31-
*
32-
*/
3328
@Serializable
3429
private data object ScreenA : NavKey
3530

app/src/main/java/com/example/nav3recipes/basic/BasicActivity.kt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,6 @@ import com.example.nav3recipes.content.ContentBlue
2929
import com.example.nav3recipes.content.ContentGreen
3030
import com.example.nav3recipes.ui.setEdgeToEdgeConfig
3131

32-
/**
33-
* Basic example with two screens, showing how to use the Navigation 3 API.
34-
*/
35-
3632
private data object RouteA
3733

3834
private data class RouteB(val id: String)

app/src/main/java/com/example/nav3recipes/basicdsl/BasicDslActivity.kt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,6 @@ import com.example.nav3recipes.content.ContentGreen
3030
import com.example.nav3recipes.ui.setEdgeToEdgeConfig
3131
import kotlinx.serialization.Serializable
3232

33-
/**
34-
* Basic example with two screens that uses the entryProvider DSL and has a persistent back stack.
35-
*/
36-
3733
@Serializable
3834
private data object RouteA : NavKey
3935

app/src/main/java/com/example/nav3recipes/basicsaveable/BasicSaveableActivity.kt

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,6 @@ import com.example.nav3recipes.content.ContentGreen
3030
import com.example.nav3recipes.ui.setEdgeToEdgeConfig
3131
import kotlinx.serialization.Serializable
3232

33-
/**
34-
* Basic example with a persistent back stack state.
35-
*
36-
* The back stack persists config changes because it's created using `rememberNavBackStack`. This
37-
* requires that the back stack keys be both serializable and implement `NavKey`.
38-
*/
39-
4033
@Serializable
4134
private data object RouteA : NavKey
4235

app/src/main/java/com/example/nav3recipes/bottomsheet/BottomSheetActivity.kt

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,16 +36,6 @@ import com.example.nav3recipes.content.ContentGreen
3636
import com.example.nav3recipes.ui.setEdgeToEdgeConfig
3737
import kotlinx.serialization.Serializable
3838

39-
/**
40-
* This recipe demonstrates how to create a bottom sheet. It does this by:
41-
*
42-
* - Adding the `BottomSheetSceneStrategy` to the list of strategies used by `NavDisplay`.
43-
* - Adding `BottomSheetSceneStrategy.bottomSheet()` to a `NavEntry`'s metadata to indicate that it
44-
* is a bottom sheet. In this case it is applied to the `NavEntry` for `RouteB`.
45-
*
46-
* See also https://developer.android.com/guide/navigation/navigation-3/custom-layouts
47-
*/
48-
4939
@Serializable
5040
private data object RouteA : NavKey
5141

app/src/main/java/com/example/nav3recipes/commonui/CommonUiActivity.kt

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -44,19 +44,6 @@ import com.example.nav3recipes.content.ContentPurple
4444
import com.example.nav3recipes.content.ContentRed
4545
import com.example.nav3recipes.ui.setEdgeToEdgeConfig
4646

47-
/**
48-
* Common navigation UI example. This app has three top level routes: Home, ChatList and Camera.
49-
* ChatList has a sub-route: ChatDetail.
50-
*
51-
* The app back stack state is modeled in `TopLevelBackStack`. This creates a back stack for each
52-
* top level route. It flattens those maps to create a single back stack for `NavDisplay`. This allows
53-
* `NavDisplay` to know where to go back to.
54-
*
55-
* Note that in this example, the Home route can move above the ChatList and Camera routes, meaning
56-
* navigating back from Home doesn't necessarily leave the app. The app will exit when the user goes
57-
* back from a single remaining top level route in the back stack.
58-
*/
59-
6047
private sealed interface TopLevelRoute {
6148
val icon: ImageVector
6249
}

app/src/main/java/com/example/nav3recipes/conditional/ConditionalActivity.kt

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,6 @@ import com.example.nav3recipes.content.ContentBlue
3333
import com.example.nav3recipes.content.ContentGreen
3434
import com.example.nav3recipes.content.ContentYellow
3535

36-
/**
37-
* Conditional navigation recipe.
38-
*
39-
* In this app we have a destination, Profile, that can only be
40-
* accessed once the user has logged in. If they attempt to access the Profile destination when
41-
* they're not logged in, they are redirected to the Login destination. Their ultimate destination,
42-
* Profile, is saved. Once they're logged in, they're taken to the Profile destination.
43-
*
44-
*/
45-
4636
private data object Home
4737

4838
// A marker interface is used to mark any routes that require login

app/src/main/java/com/example/nav3recipes/dialog/DialogActivity.kt

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,6 @@ import com.example.nav3recipes.content.ContentGreen
3737
import com.example.nav3recipes.ui.setEdgeToEdgeConfig
3838
import kotlinx.serialization.Serializable
3939

40-
/**
41-
* This recipe demonstrates how to create a dialog. It does this by:
42-
*
43-
* - Adding the `DialogSceneStrategy` to the list of strategies used by `NavDisplay`.
44-
* - Adding `DialogSceneStrategy.dialog` to a `NavEntry`'s metadata to indicate that it is a
45-
* dialog. In this case it is applied to the `NavEntry` for `RouteB`.
46-
*
47-
* See also https://developer.android.com/guide/navigation/navigation-3/custom-layouts
48-
*/
49-
5040
@Serializable
5141
private data object RouteA : NavKey
5242

app/src/main/java/com/example/nav3recipes/material/listdetail/MaterialListDetailActivity.kt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,6 @@ import com.example.nav3recipes.content.ContentYellow
4141
import com.example.nav3recipes.ui.setEdgeToEdgeConfig
4242
import kotlinx.serialization.Serializable
4343

44-
/**
45-
* This example uses the Material ListDetailSceneStrategy to create an adaptive scene. It has three
46-
* destinations: ConversationList, ConversationDetail and Profile. When the window width allows it,
47-
* the content for these destinations will be shown in a two pane layout.
48-
*/
4944
@Serializable
5045
private object ConversationList : NavKey
5146

app/src/main/java/com/example/nav3recipes/material/supportingpane/MaterialSupportingPaneActivity.kt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,6 @@ import com.example.nav3recipes.content.ContentRed
4141
import com.example.nav3recipes.ui.setEdgeToEdgeConfig
4242
import kotlinx.serialization.Serializable
4343

44-
/**
45-
* This example uses the Material SupportingPaneSceneStrategy to create an adaptive scene. It has three
46-
* destinations: Content, RelatedContent and Profile. When the window width allows it,
47-
* the content for these destinations will be shown in a two pane layout.
48-
*/
4944
@Serializable
5045
private object MainVideo : NavKey
5146

0 commit comments

Comments
 (0)