diff --git a/feature/src/main/java/com/terning/feature/filtering/filtering/FilteringOneScreen.kt b/feature/src/main/java/com/terning/feature/filtering/filtering/FilteringOneScreen.kt index 3f4a28c8c..17ba94a8c 100644 --- a/feature/src/main/java/com/terning/feature/filtering/filtering/FilteringOneScreen.kt +++ b/feature/src/main/java/com/terning/feature/filtering/filtering/FilteringOneScreen.kt @@ -1,6 +1,8 @@ package com.terning.feature.filtering.filtering +import androidx.compose.foundation.background import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.PaddingValues import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.padding @@ -21,6 +23,7 @@ import com.terning.core.designsystem.component.topappbar.BackButtonTopAppBar import com.terning.core.designsystem.theme.Grey300 import com.terning.core.designsystem.theme.TerningPointTheme import com.terning.core.designsystem.theme.TerningTheme +import com.terning.core.designsystem.theme.White import com.terning.feature.R import com.terning.feature.filtering.filtering.component.StatusOneRadioGroup @@ -30,6 +33,7 @@ fun FilteringOneScreen( onNextClick: (Int) -> Unit, navigateUp: () -> Unit, modifier: Modifier = Modifier, + paddingValues: PaddingValues = PaddingValues(), onButtonClick: (Int) -> Unit = {}, ) { val isButtonValid = remember { mutableStateOf(false) } @@ -38,6 +42,8 @@ fun FilteringOneScreen( Column( modifier = modifier + .padding(paddingValues) + .background(White) ) { BackButtonTopAppBar( onBackButtonClick = { navigateUp() } diff --git a/feature/src/main/java/com/terning/feature/filtering/filtering/FilteringThreeRoute.kt b/feature/src/main/java/com/terning/feature/filtering/filtering/FilteringThreeRoute.kt index b51640a80..3eb6a89db 100644 --- a/feature/src/main/java/com/terning/feature/filtering/filtering/FilteringThreeRoute.kt +++ b/feature/src/main/java/com/terning/feature/filtering/filtering/FilteringThreeRoute.kt @@ -1,6 +1,8 @@ package com.terning.feature.filtering.filtering +import androidx.compose.foundation.background import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.PaddingValues import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.padding @@ -26,6 +28,7 @@ import com.terning.core.designsystem.component.topappbar.BackButtonTopAppBar import com.terning.core.designsystem.theme.Grey300 import com.terning.core.designsystem.theme.TerningPointTheme import com.terning.core.designsystem.theme.TerningTheme +import com.terning.core.designsystem.theme.White import com.terning.core.extension.toast import com.terning.feature.R import java.util.Calendar @@ -37,6 +40,7 @@ fun FilteringThreeRoute( navigateUp: () -> Unit, navigateToStartHome: () -> Unit, viewModel: FilteringViewModel = hiltViewModel(), + paddingValues: PaddingValues ) { val context = LocalContext.current val lifecycleOwner = LocalLifecycleOwner.current @@ -68,6 +72,7 @@ fun FilteringThreeRoute( } FilteringThreeScreen( + paddingValues = paddingValues, navigateUp = { navigateUp() }, chosenYear = chosenYear, chosenMonth = chosenMonth, @@ -80,6 +85,7 @@ fun FilteringThreeRoute( @Composable fun FilteringThreeScreen( modifier: Modifier = Modifier, + paddingValues: PaddingValues = PaddingValues(), navigateUp: () -> Unit, chosenYear: Int, chosenMonth: Int, @@ -88,7 +94,9 @@ fun FilteringThreeScreen( onNextClick: () -> Unit, ) { Column( - modifier = modifier, + modifier = modifier + .padding(paddingValues) + .background(White), ) { BackButtonTopAppBar( onBackButtonClick = { navigateUp() } diff --git a/feature/src/main/java/com/terning/feature/filtering/filtering/FilteringTwoScreen.kt b/feature/src/main/java/com/terning/feature/filtering/filtering/FilteringTwoScreen.kt index e66df12e8..c35eec330 100644 --- a/feature/src/main/java/com/terning/feature/filtering/filtering/FilteringTwoScreen.kt +++ b/feature/src/main/java/com/terning/feature/filtering/filtering/FilteringTwoScreen.kt @@ -1,6 +1,8 @@ package com.terning.feature.filtering.filtering +import androidx.compose.foundation.background import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.PaddingValues import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.padding @@ -21,6 +23,7 @@ import com.terning.core.designsystem.component.topappbar.BackButtonTopAppBar import com.terning.core.designsystem.theme.Grey300 import com.terning.core.designsystem.theme.TerningPointTheme import com.terning.core.designsystem.theme.TerningTheme +import com.terning.core.designsystem.theme.White import com.terning.feature.R import com.terning.feature.filtering.filtering.component.StatusTwoRadioGroup @@ -30,6 +33,7 @@ fun FilteringTwoScreen( onNextClick: (Int, Int) -> Unit, navigateUp: () -> Unit, modifier: Modifier = Modifier, + paddingValues: PaddingValues = PaddingValues(), onButtonClick: (Int) -> Unit = {}, ) { val isButtonValid = remember { mutableStateOf(false) } @@ -38,6 +42,8 @@ fun FilteringTwoScreen( Column( modifier = modifier + .padding(paddingValues) + .background(White) ) { BackButtonTopAppBar( onBackButtonClick = { navigateUp() } diff --git a/feature/src/main/java/com/terning/feature/filtering/filtering/navigation/FilteringOneNavigation.kt b/feature/src/main/java/com/terning/feature/filtering/filtering/navigation/FilteringOneNavigation.kt index 266137688..3ac282c44 100644 --- a/feature/src/main/java/com/terning/feature/filtering/filtering/navigation/FilteringOneNavigation.kt +++ b/feature/src/main/java/com/terning/feature/filtering/filtering/navigation/FilteringOneNavigation.kt @@ -1,5 +1,6 @@ package com.terning.feature.filtering.filtering.navigation +import androidx.compose.foundation.layout.PaddingValues import androidx.navigation.NavController import androidx.navigation.NavGraphBuilder import androidx.navigation.NavHostController @@ -21,11 +22,13 @@ fun NavController.navigateFilteringOne( } fun NavGraphBuilder.filteringOneNavGraph( + paddingValues: PaddingValues, navHostController: NavHostController ) { composable { val args = it.toRoute() FilteringOneScreen( + paddingValues = paddingValues, name = args.name, onNextClick = { grade -> navHostController.navigateFilteringTwo(grade) }, navigateUp = { navHostController.navigateUp() } diff --git a/feature/src/main/java/com/terning/feature/filtering/filtering/navigation/FilteringThreeNavigation.kt b/feature/src/main/java/com/terning/feature/filtering/filtering/navigation/FilteringThreeNavigation.kt index 759c65c4d..97f95beae 100644 --- a/feature/src/main/java/com/terning/feature/filtering/filtering/navigation/FilteringThreeNavigation.kt +++ b/feature/src/main/java/com/terning/feature/filtering/filtering/navigation/FilteringThreeNavigation.kt @@ -1,5 +1,6 @@ package com.terning.feature.filtering.filtering.navigation +import androidx.compose.foundation.layout.PaddingValues import androidx.navigation.NavController import androidx.navigation.NavGraphBuilder import androidx.navigation.NavHostController @@ -23,11 +24,13 @@ fun NavController.navigateFilteringThree( } fun NavGraphBuilder.filteringThreeNavGraph( + paddingValues: PaddingValues, navHostController: NavHostController ) { composable { val args = it.toRoute() FilteringThreeRoute( + paddingValues = paddingValues, grade = args.grade, workingPeriod = args.workingPeriod, navigateUp = { navHostController.navigateUp() }, diff --git a/feature/src/main/java/com/terning/feature/filtering/filtering/navigation/FilteringTwoNavigation.kt b/feature/src/main/java/com/terning/feature/filtering/filtering/navigation/FilteringTwoNavigation.kt index 0bde2ac5e..ff9f1286d 100644 --- a/feature/src/main/java/com/terning/feature/filtering/filtering/navigation/FilteringTwoNavigation.kt +++ b/feature/src/main/java/com/terning/feature/filtering/filtering/navigation/FilteringTwoNavigation.kt @@ -1,5 +1,6 @@ package com.terning.feature.filtering.filtering.navigation +import androidx.compose.foundation.layout.PaddingValues import androidx.navigation.NavController import androidx.navigation.NavGraphBuilder import androidx.navigation.NavHostController @@ -21,11 +22,13 @@ fun NavController.navigateFilteringTwo( } fun NavGraphBuilder.filteringTwoNavGraph( + paddingValues: PaddingValues, navHostController: NavHostController ) { composable { val args = it.toRoute() FilteringTwoScreen( + paddingValues = paddingValues, grade = args.grade, onNextClick = { _, workingPeriod -> navHostController.navigateFilteringThree( diff --git a/feature/src/main/java/com/terning/feature/filtering/startfiltering/StartFilteringScreen.kt b/feature/src/main/java/com/terning/feature/filtering/startfiltering/StartFilteringScreen.kt index e8e1128b2..2429947ce 100644 --- a/feature/src/main/java/com/terning/feature/filtering/startfiltering/StartFilteringScreen.kt +++ b/feature/src/main/java/com/terning/feature/filtering/startfiltering/StartFilteringScreen.kt @@ -2,8 +2,10 @@ package com.terning.feature.filtering.startfiltering import androidx.compose.animation.AnimatedVisibility import androidx.compose.animation.fadeIn +import androidx.compose.foundation.background import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.PaddingValues import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxWidth @@ -27,12 +29,14 @@ import com.terning.core.designsystem.component.button.RectangleButton import com.terning.core.designsystem.component.image.TerningImage import com.terning.core.designsystem.theme.TerningPointTheme import com.terning.core.designsystem.theme.TerningTheme +import com.terning.core.designsystem.theme.White import com.terning.feature.R import kotlinx.coroutines.delay @Composable fun StartFilteringScreen( modifier: Modifier = Modifier, + paddingValues: PaddingValues = PaddingValues(), onNextClick: () -> Unit ) { var isVisible by remember { mutableStateOf(false) } @@ -46,7 +50,10 @@ fun StartFilteringScreen( } Box( - modifier = modifier.fillMaxSize() + modifier = modifier + .fillMaxSize() + .padding(paddingValues) + .background(White) ) { Column( modifier = Modifier.fillMaxSize(), diff --git a/feature/src/main/java/com/terning/feature/filtering/startfiltering/navigation/StartFilteringNavigation.kt b/feature/src/main/java/com/terning/feature/filtering/startfiltering/navigation/StartFilteringNavigation.kt index e70d98afa..17280736b 100644 --- a/feature/src/main/java/com/terning/feature/filtering/startfiltering/navigation/StartFilteringNavigation.kt +++ b/feature/src/main/java/com/terning/feature/filtering/startfiltering/navigation/StartFilteringNavigation.kt @@ -1,5 +1,6 @@ package com.terning.feature.filtering.startfiltering.navigation +import androidx.compose.foundation.layout.PaddingValues import androidx.navigation.NavController import androidx.navigation.NavGraphBuilder import androidx.navigation.NavHostController @@ -22,11 +23,13 @@ fun NavController.navigateStartFiltering( } fun NavGraphBuilder.startFilteringNavGraph( + paddingValues: PaddingValues, navHostController: NavHostController ) { composable { val args = it.toRoute() StartFilteringScreen( + paddingValues = paddingValues, onNextClick = { navHostController.navigateFilteringOne(args.name) } diff --git a/feature/src/main/java/com/terning/feature/filtering/starthome/StartHomeScreen.kt b/feature/src/main/java/com/terning/feature/filtering/starthome/StartHomeScreen.kt index 63b92593f..29cdba837 100644 --- a/feature/src/main/java/com/terning/feature/filtering/starthome/StartHomeScreen.kt +++ b/feature/src/main/java/com/terning/feature/filtering/starthome/StartHomeScreen.kt @@ -2,8 +2,10 @@ package com.terning.feature.filtering.starthome import androidx.compose.animation.AnimatedVisibility import androidx.compose.animation.fadeIn +import androidx.compose.foundation.background import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.PaddingValues import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.aspectRatio import androidx.compose.foundation.layout.fillMaxSize @@ -24,9 +26,6 @@ import androidx.compose.ui.res.stringResource import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp -import androidx.navigation.NavController -import androidx.navigation.NavOptions -import androidx.navigation.compose.rememberNavController import com.airbnb.lottie.compose.LottieAnimation import com.airbnb.lottie.compose.LottieCompositionSpec import com.airbnb.lottie.compose.LottieConstants @@ -34,16 +33,14 @@ import com.airbnb.lottie.compose.rememberLottieComposition import com.terning.core.designsystem.component.button.RectangleButton import com.terning.core.designsystem.theme.TerningPointTheme import com.terning.core.designsystem.theme.TerningTheme +import com.terning.core.designsystem.theme.White import com.terning.feature.R -import com.terning.feature.home.home.navigation.navigateHome -import com.terning.feature.main.MainNavigator -import com.terning.feature.main.rememberMainNavigator -import com.terning.feature.onboarding.signin.navigation.SignIn import kotlinx.coroutines.delay @Composable fun StartHomeScreen( modifier: Modifier = Modifier, + paddingValues: PaddingValues = PaddingValues(), navigateToHome: () -> Unit ) { var isVisible by remember { mutableStateOf(false) } @@ -57,7 +54,10 @@ fun StartHomeScreen( } Box( - modifier = modifier.fillMaxSize() + modifier = modifier + .fillMaxSize() + .padding(paddingValues) + .background(White) ) { Column( modifier = Modifier.fillMaxSize(), @@ -95,7 +95,7 @@ fun StartHomeScreen( } } -private const val DELAY : Long = 1000 +private const val DELAY: Long = 1000 @Composable fun StartHomeLottieAnimation( diff --git a/feature/src/main/java/com/terning/feature/filtering/starthome/navigation/StartHomeNavigation.kt b/feature/src/main/java/com/terning/feature/filtering/starthome/navigation/StartHomeNavigation.kt index ed29bcf97..ef2297130 100644 --- a/feature/src/main/java/com/terning/feature/filtering/starthome/navigation/StartHomeNavigation.kt +++ b/feature/src/main/java/com/terning/feature/filtering/starthome/navigation/StartHomeNavigation.kt @@ -2,6 +2,7 @@ package com.terning.feature.filtering.starthome.navigation import androidx.compose.animation.EnterTransition import androidx.compose.animation.ExitTransition +import androidx.compose.foundation.layout.PaddingValues import androidx.navigation.NavController import androidx.navigation.NavGraphBuilder import androidx.navigation.NavHostController @@ -21,6 +22,7 @@ fun NavController.navigateStartHome(navOptions: NavOptions? = null) { } fun NavGraphBuilder.startHomeNavGraph( + paddingValues: PaddingValues, navHostController: NavHostController ) { composable( @@ -37,14 +39,16 @@ fun NavGraphBuilder.startHomeNavGraph( ExitTransition.None } ) { - StartHomeScreen(navigateToHome = { - navHostController.navigateHome( - navOptions = NavOptions.Builder().setPopUpTo( - route = SignIn, - inclusive = true - ).build() - ) - } + StartHomeScreen( + paddingValues = paddingValues, + navigateToHome = { + navHostController.navigateHome( + navOptions = NavOptions.Builder().setPopUpTo( + route = SignIn, + inclusive = true + ).build() + ) + } ) } } diff --git a/feature/src/main/java/com/terning/feature/main/MainScreen.kt b/feature/src/main/java/com/terning/feature/main/MainScreen.kt index ca90e4a54..d78934eba 100644 --- a/feature/src/main/java/com/terning/feature/main/MainScreen.kt +++ b/feature/src/main/java/com/terning/feature/main/MainScreen.kt @@ -9,7 +9,6 @@ import androidx.compose.animation.slideIn import androidx.compose.animation.slideOut import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.fillMaxSize -import androidx.compose.foundation.layout.padding import androidx.compose.material3.Icon import androidx.compose.material3.NavigationBar import androidx.compose.material3.NavigationBarItem @@ -56,7 +55,7 @@ fun MainScreen( onTabSelected = navigator::navigate ) }, - ) { innerPadding -> + ) { paddingValues -> Column( modifier = Modifier.fillMaxSize() ) { @@ -77,29 +76,50 @@ fun MainScreen( startDestination = navigator.startDestination ) { splashNavGraph( - paddingValues = innerPadding, + paddingValues = paddingValues, navHostController = navigator.navController ) homeNavGraph( - paddingValues = innerPadding, + paddingValues = paddingValues, navHostController = navigator.navController ) calendarNavGraph(navHostController = navigator.navController) searchNavGraph(navHostController = navigator.navController) - myPageNavGraph( - paddingValues = innerPadding, + signInNavGraph( + paddingValues = paddingValues, + navHostController = navigator.navController + ) + signUpNavGraph( + paddingValues = paddingValues, + navHostController = navigator.navController + ) + startFilteringNavGraph( + paddingValues = paddingValues, + navHostController = navigator.navController + ) + startHomeNavGraph( + paddingValues = paddingValues, + navHostController = navigator.navController + ) + filteringOneNavGraph( + paddingValues = paddingValues, + navHostController = navigator.navController + ) + filteringTwoNavGraph( + paddingValues = paddingValues, + navHostController = navigator.navController + ) + filteringThreeNavGraph( + paddingValues = paddingValues, navHostController = navigator.navController ) - signInNavGraph(navHostController = navigator.navController) - signUpNavGraph(navHostController = navigator.navController) - filteringOneNavGraph(navHostController = navigator.navController) - filteringTwoNavGraph(navHostController = navigator.navController) - filteringThreeNavGraph(navHostController = navigator.navController) searchProcessNavGraph(navHostController = navigator.navController) changeFilterNavGraph(navHostController = navigator.navController) - startFilteringNavGraph(navHostController = navigator.navController) - startHomeNavGraph(navHostController = navigator.navController) internNavGraph(navHostController = navigator.navController) + myPageNavGraph( + paddingValues = paddingValues, + navHostController = navigator.navController + ) profileEditNavGraph(navHostController = navigator.navController) } } diff --git a/feature/src/main/java/com/terning/feature/onboarding/signin/SignInRoute.kt b/feature/src/main/java/com/terning/feature/onboarding/signin/SignInRoute.kt index 43b79c8c6..9b946f9f5 100644 --- a/feature/src/main/java/com/terning/feature/onboarding/signin/SignInRoute.kt +++ b/feature/src/main/java/com/terning/feature/onboarding/signin/SignInRoute.kt @@ -3,6 +3,7 @@ package com.terning.feature.onboarding.signin import android.content.Context import androidx.compose.foundation.background import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.PaddingValues import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxWidth @@ -31,6 +32,7 @@ import com.terning.feature.onboarding.signin.component.KakaoButton @Composable fun SignInRoute( + paddingValues: PaddingValues, navigateToHome: () -> Unit, navigateToSignUp: (String) -> Unit, viewModel: SignInViewModel = hiltViewModel(), @@ -79,6 +81,7 @@ fun SignInRoute( } SignInScreen( + paddingValues = paddingValues, onSignInClick = { viewModel.startKakaoLogIn( isKakaoAvailable = UserApiClient.instance.isKakaoTalkLoginAvailable( @@ -91,29 +94,28 @@ fun SignInRoute( @Composable fun SignInScreen( - modifier: Modifier = Modifier, - onSignInClick: () -> Unit = {}, + onSignInClick: () -> Unit, + paddingValues: PaddingValues = PaddingValues(), ) { Column( - modifier = modifier + modifier = Modifier .fillMaxSize() .background(color = White) + .padding(paddingValues) .padding(horizontal = 20.dp), horizontalAlignment = Alignment.CenterHorizontally ) { - Spacer(modifier = modifier.weight(1f)) + Spacer(modifier = Modifier.weight(1f)) TerningImage( painter = R.drawable.ic_terning_login, modifier = Modifier.fillMaxWidth() ) - Spacer(modifier = modifier.weight(1f)) + Spacer(modifier = Modifier.weight(1f)) KakaoButton( title = stringResource(id = R.string.sign_in_kakao_button), - onSignInClick = { - onSignInClick() - } + onSignInClick = onSignInClick ) - Spacer(modifier = modifier.weight(1f)) + Spacer(modifier = Modifier.weight(1f)) } } @@ -154,6 +156,8 @@ private const val KAKAO_NOT_LOGGED_IN = "statusCode=302" @Composable fun SignInScreenPreview() { TerningPointTheme { - SignInScreen() + SignInScreen( + onSignInClick = {} + ) } } \ No newline at end of file diff --git a/feature/src/main/java/com/terning/feature/onboarding/signin/navigation/SignInNavigation.kt b/feature/src/main/java/com/terning/feature/onboarding/signin/navigation/SignInNavigation.kt index f9ee42532..49f367ab3 100644 --- a/feature/src/main/java/com/terning/feature/onboarding/signin/navigation/SignInNavigation.kt +++ b/feature/src/main/java/com/terning/feature/onboarding/signin/navigation/SignInNavigation.kt @@ -1,5 +1,6 @@ package com.terning.feature.onboarding.signin.navigation +import androidx.compose.foundation.layout.PaddingValues import androidx.navigation.NavController import androidx.navigation.NavGraphBuilder import androidx.navigation.NavHostController @@ -19,10 +20,12 @@ fun NavController.navigateSignIn(navOptions: NavOptions? = null) { } fun NavGraphBuilder.signInNavGraph( + paddingValues: PaddingValues, navHostController: NavHostController, ) { composable { SignInRoute( + paddingValues = paddingValues, navigateToHome = { navHostController.navigateHome() }, navigateToSignUp = { authId -> navHostController.navigateSignUp(authId) } ) diff --git a/feature/src/main/java/com/terning/feature/onboarding/signup/SignUpRoute.kt b/feature/src/main/java/com/terning/feature/onboarding/signup/SignUpRoute.kt index e8d9c0f6d..9a963fe57 100644 --- a/feature/src/main/java/com/terning/feature/onboarding/signup/SignUpRoute.kt +++ b/feature/src/main/java/com/terning/feature/onboarding/signup/SignUpRoute.kt @@ -1,6 +1,7 @@ package com.terning.feature.onboarding.signup import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.PaddingValues import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.height @@ -34,6 +35,7 @@ import com.terning.feature.R @Composable fun SignUpRoute( + paddingValues: PaddingValues, authId: String, navigateToStartFiltering: (String) -> Unit, viewModel: SignUpViewModel = hiltViewModel(), @@ -70,6 +72,7 @@ fun SignUpRoute( } SignUpScreen( + paddingValues = paddingValues, state = state, onSignUpClick = { viewModel.postSignUpWithServer() @@ -92,48 +95,49 @@ fun SignUpScreen( onSignUpClick: () -> Unit, onInputChange: (String) -> Unit, onProfileEditClick: (Boolean) -> Unit, - modifier: Modifier = Modifier, - onValidationChanged: (Boolean) -> Unit + onValidationChanged: (Boolean) -> Unit, + paddingValues: PaddingValues = PaddingValues(), ) { val focusManager = LocalFocusManager.current Column( - modifier = modifier + modifier = Modifier .fillMaxSize() .addFocusCleaner(focusManager) + .padding(paddingValues) ) { - Spacer(modifier = modifier.height(56.dp)) + Spacer(modifier = Modifier.height(56.dp)) Text( text = stringResource(id = R.string.sign_up_title), style = TerningTheme.typography.heading2, - modifier = modifier.padding(start = 24.dp) + modifier = Modifier.padding(start = 24.dp) ) - Spacer(modifier = modifier.height(36.dp)) + Spacer(modifier = Modifier.height(36.dp)) Text( text = stringResource(id = R.string.sign_up_profile_image), style = TerningTheme.typography.body2, - modifier = modifier.padding(start = 24.dp), + modifier = Modifier.padding(start = 24.dp), color = Grey500 ) - Spacer(modifier = modifier.height(20.dp)) + Spacer(modifier = Modifier.height(20.dp)) Column( - modifier = modifier.align(Alignment.CenterHorizontally) + modifier = Modifier.align(Alignment.CenterHorizontally) ) { - Spacer(modifier = modifier.height(48.dp)) + Spacer(modifier = Modifier.height(48.dp)) ProfileWithPlusButton( - modifier = modifier.noRippleClickable { + modifier = Modifier.noRippleClickable { onProfileEditClick(true) }, index = state.profileImage ) } Column( - modifier = modifier + modifier = Modifier .align(Alignment.CenterHorizontally) .padding(horizontal = 24.dp) ) { Text(text = stringResource(id = R.string.sign_up_name)) - Spacer(modifier = modifier.height(20.dp)) + Spacer(modifier = Modifier.height(20.dp)) NameTextField( value = state.name, onValueChange = { name -> @@ -143,13 +147,13 @@ fun SignUpScreen( onValidationChanged = { isValid -> onValidationChanged(isValid) } ) } - Spacer(modifier = modifier.weight(1f)) + Spacer(modifier = Modifier.weight(1f)) RectangleButton( style = TerningTheme.typography.button1, paddingVertical = 20.dp, text = R.string.sign_up_next_button, onButtonClick = { onSignUpClick() }, - modifier = modifier.padding(bottom = 12.dp), + modifier = Modifier.padding(bottom = 12.dp), isEnabled = state.isButtonValid ) } diff --git a/feature/src/main/java/com/terning/feature/onboarding/signup/navigation/SignUpNavigation.kt b/feature/src/main/java/com/terning/feature/onboarding/signup/navigation/SignUpNavigation.kt index 20ba7bf6f..34308cc81 100644 --- a/feature/src/main/java/com/terning/feature/onboarding/signup/navigation/SignUpNavigation.kt +++ b/feature/src/main/java/com/terning/feature/onboarding/signup/navigation/SignUpNavigation.kt @@ -1,5 +1,6 @@ package com.terning.feature.onboarding.signup.navigation +import androidx.compose.foundation.layout.PaddingValues import androidx.navigation.NavController import androidx.navigation.NavGraphBuilder import androidx.navigation.NavHostController @@ -22,11 +23,13 @@ fun NavController.navigateSignUp( } fun NavGraphBuilder.signUpNavGraph( + paddingValues: PaddingValues, navHostController: NavHostController ) { composable { val args = it.toRoute() SignUpRoute( + paddingValues = paddingValues, authId = args.authId, navigateToStartFiltering = { name -> navHostController.navigateFilteringOne(name) } )