From ec01c24148c54bbc729ecc5770cf69678e8d7532 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=B0=95=EC=A7=84=EC=84=B1?= Date: Mon, 27 Nov 2023 03:15:46 +0900 Subject: [PATCH] =?UTF-8?q?#86=20feat=20:=20Custom=20Dialog,=20CustomView?= =?UTF-8?q?=20=ED=8C=A8=ED=82=A4=EC=A7=80=20=EC=9D=B4=EB=8F=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../presentation/ui/intro/signup/DetailSignupFragment.kt | 5 +---- .../presentation/ui/intro/signup/DetailSignupViewModel.kt | 4 ++-- .../presentation/ui/main/mypage/edit/EditProfileFragment.kt | 2 +- .../presentation/util/{Validation.kt => ValidationUtil.kt} | 2 +- 4 files changed, 5 insertions(+), 8 deletions(-) rename Aos/app/src/main/java/com/avengers/nibobnebob/presentation/util/{Validation.kt => ValidationUtil.kt} (89%) diff --git a/Aos/app/src/main/java/com/avengers/nibobnebob/presentation/ui/intro/signup/DetailSignupFragment.kt b/Aos/app/src/main/java/com/avengers/nibobnebob/presentation/ui/intro/signup/DetailSignupFragment.kt index 8087c1b3..63f40a1c 100644 --- a/Aos/app/src/main/java/com/avengers/nibobnebob/presentation/ui/intro/signup/DetailSignupFragment.kt +++ b/Aos/app/src/main/java/com/avengers/nibobnebob/presentation/ui/intro/signup/DetailSignupFragment.kt @@ -2,9 +2,7 @@ package com.avengers.nibobnebob.presentation.ui.intro.signup import android.os.Bundle import android.view.View -import android.widget.TextView import androidx.core.content.ContextCompat -import androidx.databinding.BindingAdapter import androidx.fragment.app.activityViewModels import androidx.fragment.app.viewModels import androidx.navigation.NavController @@ -14,9 +12,8 @@ import com.avengers.nibobnebob.R import com.avengers.nibobnebob.databinding.FragmentDetailSignupBinding import com.avengers.nibobnebob.presentation.base.BaseFragment import com.avengers.nibobnebob.presentation.ui.intro.IntroViewModel -import com.avengers.nibobnebob.presentation.util.showCalendarDatePicker +import com.avengers.nibobnebob.presentation.customview.showCalendarDatePicker import com.google.android.material.textfield.MaterialAutoCompleteTextView -import com.google.android.material.textfield.TextInputLayout import dagger.hilt.android.AndroidEntryPoint @AndroidEntryPoint diff --git a/Aos/app/src/main/java/com/avengers/nibobnebob/presentation/ui/intro/signup/DetailSignupViewModel.kt b/Aos/app/src/main/java/com/avengers/nibobnebob/presentation/ui/intro/signup/DetailSignupViewModel.kt index 5b1feb8b..3adc0448 100644 --- a/Aos/app/src/main/java/com/avengers/nibobnebob/presentation/ui/intro/signup/DetailSignupViewModel.kt +++ b/Aos/app/src/main/java/com/avengers/nibobnebob/presentation/ui/intro/signup/DetailSignupViewModel.kt @@ -6,7 +6,7 @@ import com.avengers.nibobnebob.data.model.BaseState import com.avengers.nibobnebob.data.model.request.DetailSignupRequest import com.avengers.nibobnebob.data.repository.IntroRepository import com.avengers.nibobnebob.data.repository.ValidationRepository -import com.avengers.nibobnebob.presentation.util.Validation +import com.avengers.nibobnebob.presentation.util.ValidationUtil import dagger.hilt.android.lifecycle.HiltViewModel import kotlinx.coroutines.flow.MutableSharedFlow import kotlinx.coroutines.flow.MutableStateFlow @@ -95,7 +95,7 @@ class DetailSignupViewModel @Inject constructor( private fun observeBirth() { birth.onEach { - if (Validation.checkBirth(it) || it.isBlank()) { + if (ValidationUtil.checkBirth(it) || it.isBlank()) { _uiState.update { state -> state.copy( birthState = InputState.Empty diff --git a/Aos/app/src/main/java/com/avengers/nibobnebob/presentation/ui/main/mypage/edit/EditProfileFragment.kt b/Aos/app/src/main/java/com/avengers/nibobnebob/presentation/ui/main/mypage/edit/EditProfileFragment.kt index 311bef45..48213e5b 100644 --- a/Aos/app/src/main/java/com/avengers/nibobnebob/presentation/ui/main/mypage/edit/EditProfileFragment.kt +++ b/Aos/app/src/main/java/com/avengers/nibobnebob/presentation/ui/main/mypage/edit/EditProfileFragment.kt @@ -12,7 +12,7 @@ import com.avengers.nibobnebob.presentation.base.BaseFragment import com.avengers.nibobnebob.presentation.ui.main.MainViewModel import com.avengers.nibobnebob.presentation.ui.main.mypage.share.MyPageSharedUiEvent import com.avengers.nibobnebob.presentation.ui.main.mypage.share.MyPageSharedViewModel -import com.avengers.nibobnebob.presentation.util.showCalendarDatePicker +import com.avengers.nibobnebob.presentation.customview.showCalendarDatePicker import dagger.hilt.android.AndroidEntryPoint import kotlinx.coroutines.flow.collectLatest diff --git a/Aos/app/src/main/java/com/avengers/nibobnebob/presentation/util/Validation.kt b/Aos/app/src/main/java/com/avengers/nibobnebob/presentation/util/ValidationUtil.kt similarity index 89% rename from Aos/app/src/main/java/com/avengers/nibobnebob/presentation/util/Validation.kt rename to Aos/app/src/main/java/com/avengers/nibobnebob/presentation/util/ValidationUtil.kt index d3b52170..eb3b3f31 100644 --- a/Aos/app/src/main/java/com/avengers/nibobnebob/presentation/util/Validation.kt +++ b/Aos/app/src/main/java/com/avengers/nibobnebob/presentation/util/ValidationUtil.kt @@ -1,6 +1,6 @@ package com.avengers.nibobnebob.presentation.util -object Validation { +object ValidationUtil { private val birthRegex = Regex("""^\d{4}/\d{2}/\d{2}${'$'}""")