Skip to content

Commit

Permalink
[FIX/#167] 키보드 및 스택 관리
Browse files Browse the repository at this point in the history
  • Loading branch information
leeeyubin committed Jul 19, 2024
1 parent 49c9424 commit 9381d70
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ fun SearchTextField(
readOnly = readOnly,
onSearchAction = {
if (text.isNotBlank()) {
keyboardController?.hide()
keyboardController?.hide()
focusManager.clearFocus()
onSearchAction()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package com.terning.feature.filtering.starthome

import androidx.compose.animation.AnimatedVisibility
import androidx.compose.animation.fadeIn
import androidx.compose.foundation.Image
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Spacer
Expand All @@ -11,7 +10,6 @@ import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
Expand All @@ -22,28 +20,21 @@ import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.platform.LocalConfiguration
import androidx.compose.ui.res.painterResource
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.Lottie
import com.airbnb.lottie.compose.LottieAnimation
import com.airbnb.lottie.compose.LottieCompositionSpec
import com.airbnb.lottie.compose.LottieConstants
import com.airbnb.lottie.compose.rememberLottieAnimatable
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.feature.R
import com.terning.feature.filtering.starthome.navigation.StartHome
import com.terning.feature.home.home.navigation.navigateHome
import com.terning.feature.onboarding.signin.navigation.SignIn
import com.terning.feature.onboarding.splash.navigation.Splash
import kotlinx.coroutines.delay

@Composable
Expand Down Expand Up @@ -91,12 +82,14 @@ fun StartHomeScreen(
style = TerningTheme.typography.button0,
paddingVertical = 20.dp,
text = R.string.start_home_next_button,
onButtonClick = { navController.navigateHome(
navOptions = NavOptions.Builder().setPopUpTo(
route = SignIn,
inclusive = true
).build()
) },
onButtonClick = {
navController.navigateHome(
navOptions = NavOptions.Builder().setPopUpTo(
route = SignIn,
inclusive = true
).build()
)
},
)
}
}
Expand All @@ -111,10 +104,14 @@ fun StartHomeLottieAnimation(
LottieAnimation(
modifier = modifier
.fillMaxWidth()
.aspectRatio((lottieComposition?.bounds?.width()?.toFloat()?:1f) / (lottieComposition?.bounds?.height()?:1))
.aspectRatio(
(lottieComposition?.bounds
?.width()
?.toFloat()
?: 1f) / (lottieComposition?.bounds?.height() ?: 1)
)
.padding(horizontal = 24.dp),
composition = lottieComposition,
iterations = LottieConstants.IterateForever
)
}

Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@ class SignUpViewModel @Inject constructor(

outOfBoundName -> _state.value = _state.value.copy(
name = trimmedName,
drawLineColor = Grey500,
helper = R.string.sign_up_helper,
helperIcon = null,
helperColor = Grey400,
drawLineColor =WarningRed,
helper = R.string.sign_up_helper_out,
helperIcon = R.drawable.ic_sign_up_error,
helperColor = WarningRed,
isButtonValid = false
)

Expand Down Expand Up @@ -114,7 +114,7 @@ class SignUpViewModel @Inject constructor(
}

companion object {
const val NAME_ERROR = "[!@#\$%^&*(),.?\":{}|<>\\[\\]\\\\/]"
const val NAME_ERROR = "[!@#\$%^&*(),.?\":{}|<>\\[\\]\\\\/\\-=+~`\\p{S}\\p{P}]"
private const val MAX_LENGTH = 12
private const val KAKA0 = "KAKAO"
}
Expand Down
1 change: 1 addition & 0 deletions feature/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
<string name="sign_up_helper">12자리 이내, 문자/숫자 가능, 특수문자/기호 입력불가</string>
<string name="sign_up_helper_error">이름에 특수문자는 입력할 수 없어요</string>
<string name="sign_up_helper_available">사용 가능한 이름이에요</string>
<string name="sign_up_helper_out">이름은 12자리 이내로 설정해 주세요</string>

<!--Search-->
<string name="search_text_field_hint">관심있는 인턴 공고 키워드를 검색해 보세요</string>
Expand Down

0 comments on commit 9381d70

Please sign in to comment.