-
Notifications
You must be signed in to change notification settings - Fork 0
[setting/#4] 네비게이션 세팅 #9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
941c3bb
setting/#1: 패키지 내 더미파일 추가
vvan2 1a0d9ba
setting/#1: 경로 수정 및 파일 제거
vvan2 ac079ab
setting/#1: 경로 수정 및 파일 제거
vvan2 d0584ee
setting/#4: 메인 네비게이션 세팅
vvan2 5ffeb95
setting/#4: 부모,아이 네비게이션 분리
vvan2 d9c3d6f
setting/#4: 로그인(Auth) 네비게이션 세팅
vvan2 9ca1624
setting/#4: 아이 네비게이션 세팅 및 연결
vvan2 7cae014
setting/#4: 부모 네비게이션 세팅 및 연결
vvan2 1b6df8b
setting/#4: string 오타 수정
vvan2 837e839
setting/#4: main navigation 수정
vvan2 02d2dfe
setting/#4: auth navigation 수정
vvan2 cffd16c
setting/#4: kid navigation 수정
vvan2 d651eab
setting/#4: parent navigation 수정
vvan2 1c756a9
setting/#4: route model 수정
vvan2 d750d62
setting/#4: screen 크기 수정
vvan2 a18322b
setting/#4: route 및 navigation 수정
vvan2 dc50893
setting/#4: route 및 navigation 수정
vvan2 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
app/src/main/java/com/kiero/presentation/auth/navigation/AuthNavigation.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| package com.kiero.presentation.auth.navigation | ||
|
|
||
| import androidx.compose.foundation.layout.PaddingValues | ||
| import androidx.navigation.NavController | ||
| import androidx.navigation.NavGraphBuilder | ||
| import androidx.navigation.NavHostController | ||
| import androidx.navigation.NavOptions | ||
| import androidx.navigation.compose.composable | ||
| import androidx.navigation.compose.navigation | ||
| import com.kiero.core.navigation.Route | ||
| import com.kiero.presentation.auth.AuthRoute | ||
| import kotlinx.serialization.Serializable | ||
|
|
||
| @Serializable | ||
| sealed interface Auth : Route | ||
|
|
||
| @Serializable | ||
| data object AuthGraph : Route | ||
|
|
||
| @Serializable | ||
| data object Login : Auth | ||
|
|
||
| fun NavController.navigateToAuth( | ||
| navOptions: NavOptions? = null, | ||
| ) { | ||
| navigate(Login, navOptions) | ||
| } | ||
|
|
||
| fun NavGraphBuilder.authNavGraph( | ||
| navController: NavHostController, | ||
| paddingValues: PaddingValues, | ||
| navigateUp: () -> Unit, | ||
| navigateToParent: () -> Unit, | ||
| navigateToKid: () -> Unit, | ||
| ) { | ||
| navigation<AuthGraph>( | ||
| startDestination = Login | ||
| ) { | ||
| composable<Login> { | ||
| AuthRoute( | ||
| paddingValues = paddingValues, | ||
| navigateUp = navigateUp, | ||
| navigateToParent = navigateToParent, | ||
| navigateToKid = navigateToKid, | ||
| ) | ||
| } | ||
| } | ||
| } |
45 changes: 45 additions & 0 deletions
45
app/src/main/java/com/kiero/presentation/kid/journey/KidJourneyScreen.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| package com.kiero.presentation.kid.journey | ||
|
|
||
| import androidx.compose.foundation.layout.Column | ||
| import androidx.compose.foundation.layout.PaddingValues | ||
| import androidx.compose.foundation.layout.fillMaxSize | ||
| import androidx.compose.foundation.layout.padding | ||
| import androidx.compose.material3.Text | ||
| import androidx.compose.runtime.Composable | ||
| import androidx.compose.ui.Modifier | ||
| import androidx.compose.ui.tooling.preview.Preview | ||
| import com.kiero.core.designsystem.theme.KieroTheme | ||
|
|
||
| @Composable | ||
| fun KidJourneyRoute( | ||
| paddingValues: PaddingValues, | ||
| navigateUp: () -> Unit, | ||
| ) { | ||
| KidJourneyScreen( | ||
| paddingValues = paddingValues, | ||
| navigateUp = navigateUp | ||
| ) | ||
| } | ||
|
|
||
| @Composable | ||
| private fun KidJourneyScreen( | ||
| paddingValues: PaddingValues, | ||
| navigateUp: () -> Unit, | ||
| modifier: Modifier = Modifier, | ||
| ) { | ||
| Column( | ||
| modifier = modifier | ||
| .fillMaxSize() | ||
| .padding(paddingValues), | ||
| ) { | ||
| Text( | ||
| text = "오늘의 여정" | ||
| ) | ||
| } | ||
| } | ||
|
|
||
| @Composable | ||
| @Preview | ||
| private fun KidJourneyScreenPreview() { | ||
| KieroTheme {} | ||
| } |
27 changes: 27 additions & 0 deletions
27
app/src/main/java/com/kiero/presentation/kid/journey/navigation/KidJourneyNavigation.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| package com.kiero.presentation.kid.journey.navigation | ||
|
|
||
| import androidx.compose.foundation.layout.PaddingValues | ||
| import androidx.navigation.NavController | ||
| import androidx.navigation.NavGraphBuilder | ||
| import androidx.navigation.NavOptions | ||
| import androidx.navigation.compose.composable | ||
| import com.kiero.presentation.kid.journey.KidJourneyRoute | ||
| import com.kiero.presentation.kid.navigation.Journey | ||
|
|
||
| fun NavController.navigateToJourney( | ||
| navOptions: NavOptions? = null, | ||
| ) { | ||
| navigate(Journey, navOptions) | ||
| } | ||
|
|
||
| fun NavGraphBuilder.kidJourneyNavGraph( | ||
| paddingValues: PaddingValues, | ||
| navigateUp: () -> Unit, | ||
| ) { | ||
| composable<Journey> { | ||
| KidJourneyRoute( | ||
| paddingValues = paddingValues, | ||
| navigateUp = navigateUp, | ||
| ) | ||
| } | ||
| } |
45 changes: 45 additions & 0 deletions
45
app/src/main/java/com/kiero/presentation/kid/mission/KidMissionScreen.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| package com.kiero.presentation.kid.mission | ||
|
|
||
| import androidx.compose.foundation.layout.Column | ||
| import androidx.compose.foundation.layout.PaddingValues | ||
| import androidx.compose.foundation.layout.fillMaxSize | ||
| import androidx.compose.foundation.layout.padding | ||
| import androidx.compose.material3.Text | ||
| import androidx.compose.runtime.Composable | ||
| import androidx.compose.ui.Modifier | ||
| import androidx.compose.ui.tooling.preview.Preview | ||
| import com.kiero.core.designsystem.theme.KieroTheme | ||
|
|
||
| @Composable | ||
| fun KidMissionRoute( | ||
| paddingValues: PaddingValues, | ||
| navigateUp: () -> Unit, | ||
| ) { | ||
| KidMissionScreen( | ||
| paddingValues = paddingValues, | ||
| navigateUp = navigateUp | ||
| ) | ||
| } | ||
|
|
||
| @Composable | ||
| private fun KidMissionScreen( | ||
| paddingValues: PaddingValues, | ||
| navigateUp: () -> Unit, | ||
| modifier: Modifier = Modifier, | ||
| ) { | ||
| Column( | ||
| modifier = modifier | ||
| .fillMaxSize() | ||
| .padding(paddingValues), | ||
| ) { | ||
| Text( | ||
| text = "금화 미션" | ||
| ) | ||
| } | ||
| } | ||
|
|
||
| @Composable | ||
| @Preview | ||
| private fun KidMissionScreenPreview() { | ||
| KieroTheme {} | ||
| } |
27 changes: 27 additions & 0 deletions
27
app/src/main/java/com/kiero/presentation/kid/mission/navigation/KidMissionNavigation.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| package com.kiero.presentation.kid.mission.navigation | ||
|
|
||
| import androidx.compose.foundation.layout.PaddingValues | ||
| import androidx.navigation.NavController | ||
| import androidx.navigation.NavGraphBuilder | ||
| import androidx.navigation.NavOptions | ||
| import androidx.navigation.compose.composable | ||
| import com.kiero.presentation.kid.mission.KidMissionRoute | ||
| import com.kiero.presentation.kid.navigation.Mission | ||
|
|
||
| fun NavController.navigateToMission( | ||
| navOptions: NavOptions? = null, | ||
| ) { | ||
| navigate(Mission, navOptions) | ||
| } | ||
|
|
||
| fun NavGraphBuilder.kidMissionNavGraph( | ||
| paddingValues: PaddingValues, | ||
| navigateUp: () -> Unit, | ||
| ) { | ||
| composable<Mission> { | ||
| KidMissionRoute( | ||
| paddingValues = paddingValues, | ||
| navigateUp = navigateUp, | ||
| ) | ||
| } | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
마찬가지로 Screen에서 굳이 modifier를 뚫어줄 필요는 없다고 생각하는데 주완님 생각은 어떠신가요? 저스트 궁금