Skip to content

Commit

Permalink
[WEAV-77] 내 프로필 입력 UI - 나이 (#17)
Browse files Browse the repository at this point in the history
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
  • Loading branch information
moondev03 and coderabbitai[bot] authored Oct 13, 2024
1 parent f04b8f5 commit 048103d
Show file tree
Hide file tree
Showing 15 changed files with 566 additions and 77 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,23 @@ fun DaysNextButton(
message: String = "다음",
type: BtnType = BtnType.Tall,
isEnabled: Boolean = false,
onClick: () -> Unit
onDisabledClick: () -> Unit = {},
onEnabledClick: () -> Unit
) {
val buttonHeight = when (type) {
BtnType.Tall -> 90.dp
BtnType.Short -> 68.dp
}

Button(
onClick = onClick,
enabled = isEnabled,
onClick = {
if (isEnabled) onEnabledClick() else onDisabledClick()
},
enabled = true,
shape = RoundedCornerShape(topStart = 20.dp, topEnd = 20.dp),
colors = ButtonColors(
containerColor = DaysTheme.colors.grey500,
contentColor = DaysTheme.colors.white,
containerColor = if (isEnabled) DaysTheme.colors.grey500 else DaysTheme.colors.grey100,
contentColor = if (isEnabled) DaysTheme.colors.white else DaysTheme.colors.white,
disabledContainerColor = DaysTheme.colors.grey100,
disabledContentColor = DaysTheme.colors.white,
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package com.weave.design_system.component
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.heightIn
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.material3.ExperimentalMaterial3Api
Expand Down Expand Up @@ -31,24 +31,20 @@ fun DaysOnlyBackAppbar(
TopAppBar(
modifier = Modifier
.fillMaxWidth()
.height(54.dp),
.heightIn(min = 54.dp),
title = { Text(text = "") },
navigationIcon = {
Box(modifier = Modifier.fillMaxSize(),
contentAlignment = Alignment.CenterStart)
{
Box(
modifier = Modifier
.size(48.dp, 48.dp)
.padding(start = 6.dp, top = 8.dp)
.noRippleClickable(onBackPressed),
) {
Icon(
modifier = Modifier.size(24.dp, 24.dp),
imageVector = ImageVector.vectorResource(id = R.drawable.ic_round_arrow_back),
contentDescription = "Back"
)
}
Box(
modifier = Modifier
.size(48.dp, 48.dp)
.noRippleClickable(onBackPressed),
contentAlignment = Alignment.Center
) {
Icon(
modifier = Modifier.size(24.dp, 24.dp),
imageVector = ImageVector.vectorResource(id = R.drawable.ic_round_arrow_back),
contentDescription = "Back"
)
}
},
colors = TopAppBarDefaults.topAppBarColors().copy(
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="18dp"
android:height="19dp"
android:viewportWidth="18"
android:viewportHeight="19">
<path
android:pathData="M9,1.25C13.556,1.25 17.25,4.944 17.25,9.5C17.25,14.056 13.556,17.75 9,17.75C4.444,17.75 0.75,14.056 0.75,9.5C0.75,4.944 4.444,1.25 9,1.25ZM1.875,9.5C1.875,11.39 2.626,13.202 3.962,14.538C5.298,15.874 7.11,16.625 9,16.625C10.89,16.625 12.702,15.874 14.038,14.538C15.374,13.202 16.125,11.39 16.125,9.5C16.125,7.61 15.374,5.798 14.038,4.462C12.702,3.126 10.89,2.375 9,2.375C7.11,2.375 5.298,3.126 3.962,4.462C2.626,5.798 1.875,7.61 1.875,9.5Z"
android:fillColor="#A0A0A0"/>
<path
android:pathData="M8.186,11.574C8.19,10.998 8.246,10.532 8.354,10.176C8.466,9.819 8.621,9.531 8.819,9.313C9.017,9.094 9.284,8.88 9.62,8.671C9.908,8.492 10.137,8.267 10.305,7.995C10.477,7.723 10.563,7.409 10.563,7.052C10.563,6.757 10.494,6.499 10.356,6.276C10.223,6.048 10.04,5.875 9.807,5.754C9.579,5.629 9.323,5.567 9.039,5.567C8.78,5.567 8.537,5.623 8.309,5.734C8.08,5.841 7.889,6.011 7.734,6.242C7.583,6.474 7.497,6.766 7.475,7.119H6.3C6.321,6.592 6.453,6.135 6.694,5.747C6.939,5.359 7.264,5.063 7.669,4.858C8.078,4.653 8.53,4.55 9.026,4.55C9.555,4.55 10.023,4.659 10.427,4.878C10.832,5.096 11.144,5.4 11.364,5.788C11.588,6.176 11.7,6.615 11.7,7.105C11.7,8.091 11.274,8.853 10.421,9.393C10.145,9.567 9.928,9.748 9.768,9.935C9.613,10.122 9.497,10.345 9.42,10.604C9.346,10.862 9.306,11.186 9.297,11.574V11.641H8.186V11.574ZM7.953,13.58C7.949,13.429 7.984,13.288 8.057,13.159C8.134,13.025 8.235,12.92 8.36,12.845C8.49,12.764 8.629,12.724 8.78,12.724C8.927,12.724 9.062,12.762 9.187,12.838C9.316,12.914 9.418,13.016 9.491,13.146C9.568,13.275 9.607,13.415 9.607,13.567C9.607,13.808 9.527,14.015 9.368,14.189C9.209,14.359 9.013,14.446 8.78,14.45C8.629,14.45 8.49,14.41 8.36,14.33C8.235,14.249 8.134,14.145 8.057,14.015C7.984,13.882 7.949,13.736 7.953,13.58Z"
android:fillColor="#A0A0A0"/>
</vector>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions 3days/core/design-system/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,13 @@

<string name="my_profile_gender_sub_title">만나서 반가워요!</string>
<string name="my_profile_gender_title">당신의 성별을 무엇인가요?</string>
<string name="my_profile_gender_no_selected_message">성별을 선택해 주세요</string>

<string name="my_profile_birth_year_sub_title">좋은 %s분 소개시켜 드릴께요!</string>
<string name="my_profile_birth_year_title">당신의 나이는 무엇인가요?</string>
<string name="my_profile_birth_year_suffix">년생</string>
<string name="my_profile_birth_year_description">가입 연령 확인하기</string>
<string name="my_profile_birth_year_tooltip">%s년 기준으로 %s년생(만 20살)부터 %s년생(만 35살)까지 가입할 수 있어요</string>
<string name="my_profile_birth_year_empty_input_message">나이를 입력해 주세요</string>
<string name="my_profile_birth_year_unsupported_input_message">가입이 불가한 연령이예요</string>
</resources>
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ fun MobileSendAuthScreen(
message = stringResource(id = R.string.next_button_message),
type = if (isKeyboardVisible == Keyboard.Opened) BtnType.Short else BtnType.Tall,
isEnabled = isEnabled,
onClick = { onNextBtnClicked(phoneNumber.text) },
onEnabledClick = { onNextBtnClicked(phoneNumber.text) },
modifier = Modifier
.align(Alignment.BottomCenter)
.padding(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ fun TermsAgreementScreen(
message = stringResource(id = R.string.next_button_message),
type = if (isKeyboardVisible == Keyboard.Opened) BtnType.Short else BtnType.Tall,
isEnabled = true,
onClick = { onNextBtnClicked() },
onEnabledClick = { onNextBtnClicked() },
modifier = Modifier
.align(Alignment.BottomCenter)
.padding(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
package com.weave.my_profile

import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.ext.junit.runners.AndroidJUnit4

import androidx.test.platform.app.InstrumentationRegistry
import org.junit.Assert.assertEquals
import org.junit.Test
import org.junit.runner.RunWith

import org.junit.Assert.*

/**
* Instrumented test, which will execute on an Android device.
*
Expand Down
2 changes: 1 addition & 1 deletion 3days/feat/my-profile/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<manifest>

</manifest>
Loading

0 comments on commit 048103d

Please sign in to comment.