-
Notifications
You must be signed in to change notification settings - Fork 0
온보딩 마지막 수정 #174
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
온보딩 마지막 수정 #174
Changes from 11 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
a061195
rename : 클래스명 좀 더 명확하게 변경 #136
theBettor 8b6dd2f
Merge remote-tracking branch 'origin/develop' into refactor/onboardin…
theBettor c1f9572
test
theBettor 0d43734
test
theBettor e8089c9
1. 왜자꾸 NavHost에서 파라미터를 요구하는지 이해할 수가 없었다. GraphBuilder에서 Screen이 아닌 Ro…
theBettor c851fbd
Merge branch 'refactor/test-onboarding' into refactor/onboarding_fini…
theBettor 30147f3
refactor: 프로필 세팅화면 끼워넣기 #157
theBettor 00710aa
feat: 기기 내의 이미지를 선택하면 바로 UI에 반영 그 과정에 Route를 만들고 다음 화면에 넘기기 #134
theBettor f02b20e
refactor: 저장된 uri 다른 뷰모델로 보내서 화면에 띄우기 #133
theBettor 0a374d7
Merge branch 'refactor/0510_onboarding' into refactor/onboarding_fini…
theBettor 0434cc8
fix: textfield placeholder:할머니 제거 #168
theBettor 4ca914b
refactor: 초대코드공유화면 순서변경 #132
theBettor 4cf9d7e
refactor: 이미지 처리된 Layout 수정(SpeechBubble 구조변경) #117
theBettor 1c6d068
fix: 테스트 코드 삭제
theBettor 6bcbb01
Merge remote-tracking branch 'origin/refactor/onboarding_finishing' i…
theBettor 7f91cb1
revert: unintended change of SocialLoginHelper.kt
theBettor b0b1e09
Merge remote-tracking branch 'origin/develop' into refactor/onboardin…
theBettor 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
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 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
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
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
148 changes: 148 additions & 0 deletions
148
.../main/java/com/teampatch/feature/onboarding/enter/OnboardingEnterProfileSettingsScreen.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,148 @@ | ||
| package com.teampatch.feature.onboarding.enter | ||
|
|
||
| import android.util.Log | ||
| import androidx.activity.compose.rememberLauncherForActivityResult | ||
| import androidx.activity.result.PickVisualMediaRequest | ||
| import androidx.activity.result.contract.ActivityResultContracts | ||
| import androidx.compose.foundation.Image | ||
| import androidx.compose.foundation.background | ||
| import androidx.compose.foundation.layout.Box | ||
| import androidx.compose.foundation.layout.fillMaxWidth | ||
| import androidx.compose.foundation.layout.padding | ||
| import androidx.compose.foundation.layout.size | ||
| import androidx.compose.foundation.shape.CircleShape | ||
| import androidx.compose.material3.Icon | ||
| import androidx.compose.material3.Text | ||
| import androidx.compose.runtime.Composable | ||
| import androidx.compose.ui.Alignment | ||
| import androidx.compose.ui.Modifier | ||
| import androidx.compose.ui.draw.clip | ||
| import androidx.compose.ui.layout.ContentScale | ||
| import androidx.compose.ui.res.painterResource | ||
| import androidx.compose.ui.res.stringArrayResource | ||
| import androidx.compose.ui.res.stringResource | ||
| import androidx.compose.ui.text.SpanStyle | ||
| import androidx.compose.ui.text.buildAnnotatedString | ||
| import androidx.compose.ui.text.withStyle | ||
| import androidx.compose.ui.tooling.preview.Preview | ||
| import androidx.compose.ui.unit.dp | ||
| import androidx.hilt.navigation.compose.hiltViewModel | ||
| import coil.compose.rememberAsyncImagePainter | ||
| import com.teampatch.core.designsystem.component.DefaultButton | ||
| import com.teampatch.core.designsystem.component.OnBoardingLayout | ||
| import com.teampatch.core.designsystem.theme.BL | ||
| import com.teampatch.core.designsystem.theme.HarmonyTheme | ||
| import com.teampatch.core.designsystem.theme.MainGreen | ||
| import com.teampatch.core.designsystem.theme.WH | ||
| import com.teampatch.core.designsystem.utils.noRippleClickable | ||
| import com.teampatch.core.designsystem.utils.previewPlaceholder | ||
| import com.teampatch.feature.onboarding.enter.R.array.title_onboarding_enter_profile | ||
| import com.teampatch.feature.onboarding.enter.R.string.subtext_onboarding_enter_name | ||
| import com.teampatch.feature.onboarding.enter.R.string.text_onboarding_enter_enter_space | ||
| import com.teampatch.feature.onboarding.enter.viewmodel.OnboardingEnterInvitationCodeViewModel | ||
|
|
||
| @Composable | ||
| internal fun OnboardingEnterProfileSettingsScreen( | ||
| viewModel: OnboardingEnterInvitationCodeViewModel = hiltViewModel(), // ViewModel 주입 | ||
| onBackRequest: () -> Unit, | ||
| onEnterSpaceScreenRequest: () -> Unit, | ||
| ) { | ||
| val profileImageUri = viewModel.profileImageUri | ||
|
|
||
| val photoPicker = rememberLauncherForActivityResult( | ||
| contract = ActivityResultContracts.PickVisualMedia(), | ||
| onResult = { uri -> | ||
| if (uri != null) { | ||
| viewModel.updateProfileImage(uri) // ViewModel에서 관리 | ||
| } | ||
| } | ||
| ) | ||
|
|
||
| val titles = stringArrayResource(title_onboarding_enter_profile) | ||
|
|
||
| OnBoardingLayout( | ||
| title = buildAnnotatedString { | ||
| if (titles.size >= 3) { | ||
| withStyle(style = SpanStyle(color = BL)) { | ||
| append(titles[0]) | ||
| } | ||
| withStyle(style = SpanStyle(color = MainGreen)) { | ||
| append(titles[1]) | ||
| } | ||
| withStyle(style = SpanStyle(color = BL)) { | ||
| append(titles[2]) | ||
| } | ||
| } else { | ||
| Log.e("TitleCheck", "Error: Missing Strings") | ||
| } | ||
| }, | ||
| subtext = stringResource(subtext_onboarding_enter_name), | ||
| onBackRequest = { onBackRequest() }, | ||
| bottomBar = { | ||
| DefaultButton( | ||
| onClick = { onEnterSpaceScreenRequest() }, | ||
| modifier = Modifier | ||
| .fillMaxWidth() | ||
| .padding(20.dp) | ||
| ) { | ||
| Text(stringResource(text_onboarding_enter_enter_space)) | ||
| } | ||
| } | ||
| ) { | ||
| Box( | ||
| contentAlignment = Alignment.Center, | ||
| modifier = Modifier | ||
| .fillMaxWidth() | ||
| .padding(top = 44.dp) | ||
| .noRippleClickable { | ||
| val pickerRequest = | ||
| PickVisualMediaRequest(ActivityResultContracts.PickVisualMedia.ImageOnly) | ||
| photoPicker.launch(pickerRequest) | ||
| } | ||
| ) { | ||
| // 이미지를 감싸는 Box 추가 (아이콘을 정렬하기 위해) | ||
| Box( | ||
| modifier = Modifier.size(144.dp) // 이미지 크기와 동일한 크기 | ||
| ) { | ||
| Image( | ||
| painter = rememberAsyncImagePainter( | ||
| model = profileImageUri | ||
| ?: com.teampatch.core.designsystem.R.drawable.ic_my_appbar, // 기본 이미지 설정 | ||
| placeholder = previewPlaceholder(com.teampatch.core.designsystem.R.drawable.ic_my_appbar) | ||
| ), | ||
| contentDescription = "profile", | ||
| contentScale = ContentScale.Crop, | ||
| modifier = Modifier | ||
| .size(144.dp) | ||
| .clip(CircleShape) | ||
| ) | ||
|
|
||
| // 카메라 아이콘을 이미지의 오른쪽 아래에 정렬 | ||
| Box( | ||
| contentAlignment = Alignment.Center, | ||
| modifier = Modifier | ||
| .size(60.dp) | ||
| .background(MainGreen, CircleShape) | ||
| .align(Alignment.BottomEnd) // ✅ 이미지 기준으로 오른쪽 아래 정렬 | ||
| ) { | ||
| Icon( | ||
| painter = painterResource(com.teampatch.core.designsystem.R.drawable.ic_camera_profile), | ||
| contentDescription = "camera", | ||
| tint = WH | ||
| ) | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
|
|
||
| @Preview | ||
| @Composable | ||
| private fun OnboardingMakeProfileSettingsScreenPreview() { | ||
| HarmonyTheme { | ||
| OnboardingEnterProfileSettingsScreen( | ||
| onBackRequest = {}, | ||
| onEnterSpaceScreenRequest = {} | ||
| ) | ||
| } | ||
| } |
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.
Uh oh!
There was an error while loading. Please reload this page.
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.
해당 파일은 수정되지 않았는데 같이 수정된 것 같습니다
깔끔한 commit 기록이 남기기 위해서 수정된 부분 복구 부탁드려요!