From 6336fe1545379bec8e9b6bbffc218fe9ee04009a Mon Sep 17 00:00:00 2001 From: Dongmin Date: Fri, 1 Mar 2024 14:13:48 +0900 Subject: [PATCH 01/20] =?UTF-8?q?[ADD/#220]=20delete=20btn=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- presentation/src/main/res/drawable/ic_delete.xml | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 presentation/src/main/res/drawable/ic_delete.xml diff --git a/presentation/src/main/res/drawable/ic_delete.xml b/presentation/src/main/res/drawable/ic_delete.xml new file mode 100644 index 00000000..f6db5bb4 --- /dev/null +++ b/presentation/src/main/res/drawable/ic_delete.xml @@ -0,0 +1,13 @@ + + + + From ec39b2fb4134d0181a54f1f257e9aca3314ef7a8 Mon Sep 17 00:00:00 2001 From: Dongmin Date: Fri, 1 Mar 2024 14:14:01 +0900 Subject: [PATCH 02/20] =?UTF-8?q?[ADD/#220]=20delete=20btn=20=EC=97=B0?= =?UTF-8?q?=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/res/layout/view_emoji_counter_edittext.xml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/presentation/src/main/res/layout/view_emoji_counter_edittext.xml b/presentation/src/main/res/layout/view_emoji_counter_edittext.xml index ab69238f..f92ab255 100644 --- a/presentation/src/main/res/layout/view_emoji_counter_edittext.xml +++ b/presentation/src/main/res/layout/view_emoji_counter_edittext.xml @@ -21,6 +21,7 @@ android:layout_height="wrap_content" android:layout_marginTop="6dp" android:background="@drawable/shape_rect_4_gray200_line" + android:paddingEnd="30dp" android:gravity="top" android:includeFontPadding="false" android:inputType="textMultiLine" @@ -31,6 +32,16 @@ app:layout_constraintStart_toStartOf="@id/tv_emoji_counter_et_title" app:layout_constraintTop_toBottomOf="@id/tv_emoji_counter_et_title" /> + + Date: Fri, 1 Mar 2024 14:15:23 +0900 Subject: [PATCH 03/20] =?UTF-8?q?[FEAT/#220]=20delete=20btn=20=ED=81=B4?= =?UTF-8?q?=EB=A6=AD=EC=8B=9C=20=ED=85=8D=EC=8A=A4=ED=8A=B8=20=EC=A0=9C?= =?UTF-8?q?=EA=B1=B0=20=EA=B8=B0=EB=8A=A5=20=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../designsystem/edittext/EmojiCounterEditText.kt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/presentation/src/main/java/com/going/presentation/designsystem/edittext/EmojiCounterEditText.kt b/presentation/src/main/java/com/going/presentation/designsystem/edittext/EmojiCounterEditText.kt index 6f31894f..7e2f9428 100644 --- a/presentation/src/main/java/com/going/presentation/designsystem/edittext/EmojiCounterEditText.kt +++ b/presentation/src/main/java/com/going/presentation/designsystem/edittext/EmojiCounterEditText.kt @@ -54,6 +54,8 @@ class EmojiCounterEditText(context: Context, attrs: AttributeSet) : var state: EditTextState = EditTextState.EMPTY set(value) { field = value + + binding.btnDeleteText.isVisible = value != EditTextState.EMPTY editTextStateMap[field]?.let { setEditTextState(it) } } @@ -65,6 +67,7 @@ class EmojiCounterEditText(context: Context, attrs: AttributeSet) : true, ) + initDeleteBtnClickListener() setBindingContent(typedArray) typedArray.recycle() @@ -72,8 +75,15 @@ class EmojiCounterEditText(context: Context, attrs: AttributeSet) : checkTextAvailable() } + private fun initDeleteBtnClickListener() = with(binding) { + btnDeleteText.setOnClickListener { + etEmojiCounterEtContent.text = null + } + } + private fun setBindingContent(typedArray: TypedArray) { with(binding) { + btnDeleteText.isVisible = state != EditTextState.EMPTY tvEmojiCounterEtTitle.text = typedArray.getString(R.styleable.EmojiCounterEditText_title) etEmojiCounterEtContent.hint = From 5c3e5021570deb69690af8eb8238ee5be17137e7 Mon Sep 17 00:00:00 2001 From: Dongmin Date: Fri, 1 Mar 2024 14:17:44 +0900 Subject: [PATCH 04/20] =?UTF-8?q?[FEAT/#220]=20=EC=9C=A0=ED=98=95=EA=B2=80?= =?UTF-8?q?=EC=82=AC=20=EA=B1=B4=EB=84=88=EB=9B=B0=EA=B8=B0=20string=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- presentation/src/main/res/values/strings.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/presentation/src/main/res/values/strings.xml b/presentation/src/main/res/values/strings.xml index 373492ce..7b32e0e5 100644 --- a/presentation/src/main/res/values/strings.xml +++ b/presentation/src/main/res/values/strings.xml @@ -44,6 +44,7 @@ 여행을 할 때 우리는 어떤 모습일까? 9개의 질문으로\n나를 대신할 여행 캐릭터를 찾아보세요 테스트 시작하기 + 테스트 건너뛰기 나의 여행 캐릭터는? From 677489d7a8c3534991bad15cece1084244296821 Mon Sep 17 00:00:00 2001 From: Dongmin Date: Fri, 1 Mar 2024 14:27:41 +0900 Subject: [PATCH 05/20] =?UTF-8?q?[FEAT/#220]=20=EC=9C=A0=ED=98=95=EA=B2=80?= =?UTF-8?q?=EC=82=AC=20=EA=B1=B4=EB=84=88=EB=9B=B0=EA=B8=B0=20string=20?= =?UTF-8?q?=EB=B0=91=EC=A4=84=20=EC=B6=94=EA=B0=80=20=EB=B0=8F=20=ED=8E=98?= =?UTF-8?q?=EC=9D=B4=EC=A7=80=20=EC=97=B0=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/res/layout/activity_tendency_splash.xml | 12 ++++++++++++ presentation/src/main/res/values/strings.xml | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/presentation/src/main/res/layout/activity_tendency_splash.xml b/presentation/src/main/res/layout/activity_tendency_splash.xml index 701eb0d8..2855bf70 100644 --- a/presentation/src/main/res/layout/activity_tendency_splash.xml +++ b/presentation/src/main/res/layout/activity_tendency_splash.xml @@ -53,6 +53,18 @@ app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@id/tv_tendency_splash_title" /> + + 여행을 할 때 우리는 어떤 모습일까? 9개의 질문으로\n나를 대신할 여행 캐릭터를 찾아보세요 테스트 시작하기 - 테스트 건너뛰기 + 테스트 건너뛰기 나의 여행 캐릭터는? From 353318ac4c3aba758217da4da8f0ff168d816ac0 Mon Sep 17 00:00:00 2001 From: Dongmin Date: Fri, 1 Mar 2024 14:30:50 +0900 Subject: [PATCH 06/20] =?UTF-8?q?[FEAT/#220]=20=EC=9C=A0=ED=98=95=EA=B2=80?= =?UTF-8?q?=EC=82=AC=20=EA=B1=B4=EB=84=88=EB=9B=B0=EA=B8=B0=20=ED=8E=98?= =?UTF-8?q?=EC=9D=B4=EC=A7=80=20=EC=9D=B4=EB=8F=99=20=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tendency/splash/TendencySplashActivity.kt | 15 ++++++++++----- .../main/res/layout/activity_tendency_splash.xml | 2 +- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/presentation/src/main/java/com/going/presentation/tendency/splash/TendencySplashActivity.kt b/presentation/src/main/java/com/going/presentation/tendency/splash/TendencySplashActivity.kt index 5ec81890..0be8bd4a 100644 --- a/presentation/src/main/java/com/going/presentation/tendency/splash/TendencySplashActivity.kt +++ b/presentation/src/main/java/com/going/presentation/tendency/splash/TendencySplashActivity.kt @@ -1,12 +1,12 @@ package com.going.presentation.tendency.splash -import android.content.Intent import android.os.Bundle import com.going.presentation.R +import com.going.presentation.dashboard.DashBoardActivity import com.going.presentation.databinding.ActivityTendencySplashBinding import com.going.presentation.tendency.ttest.TendencyTestActivity import com.going.presentation.util.initOnBackPressedListener -import com.going.presentation.util.navigateToScreen +import com.going.presentation.util.navigateToScreenClear import com.going.ui.base.BaseActivity import com.going.ui.extension.setOnSingleClickListener @@ -16,13 +16,18 @@ class TendencySplashActivity : override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) + initSkipBtnClickListener() initStartBtnClickListener() initOnBackPressedListener(binding.root) } - private fun initStartBtnClickListener() { + private fun initSkipBtnClickListener() = + binding.btnTendencySplashSkip.setOnSingleClickListener { + navigateToScreenClear() + } + + private fun initStartBtnClickListener() = binding.btnTendencySplashStart.setOnSingleClickListener { - navigateToScreen(listOf(Intent.FLAG_ACTIVITY_CLEAR_TOP)) + navigateToScreenClear() } - } } diff --git a/presentation/src/main/res/layout/activity_tendency_splash.xml b/presentation/src/main/res/layout/activity_tendency_splash.xml index 2855bf70..c92e0b0d 100644 --- a/presentation/src/main/res/layout/activity_tendency_splash.xml +++ b/presentation/src/main/res/layout/activity_tendency_splash.xml @@ -54,7 +54,7 @@ app:layout_constraintTop_toBottomOf="@id/tv_tendency_splash_title" /> Date: Fri, 1 Mar 2024 15:25:41 +0900 Subject: [PATCH 07/20] =?UTF-8?q?[FEAT/#220]=20=ED=9A=8C=EC=9B=90=EA=B0=80?= =?UTF-8?q?=EC=9E=85=20divider=20=EC=83=89=EC=83=81=20=EB=B3=80=EA=B2=BD?= =?UTF-8?q?=20=EB=B0=8F=20=EA=B5=AC=EC=A1=B0=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/res/layout/activity_sign_up.xml | 35 ++++++++++++++----- 1 file changed, 27 insertions(+), 8 deletions(-) diff --git a/presentation/src/main/res/layout/activity_sign_up.xml b/presentation/src/main/res/layout/activity_sign_up.xml index e6d6d42e..39e1ef39 100644 --- a/presentation/src/main/res/layout/activity_sign_up.xml +++ b/presentation/src/main/res/layout/activity_sign_up.xml @@ -13,20 +13,39 @@ android:layout_width="match_parent" android:layout_height="match_parent"> - + app:layout_constraintTop_toTopOf="parent"> + + + + + + Date: Fri, 1 Mar 2024 16:02:26 +0900 Subject: [PATCH 08/20] =?UTF-8?q?[FEAT/#220]=20circleImageView=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- buildSrc/src/main/kotlin/Dependencies.kt | 1 + buildSrc/src/main/kotlin/Versions.kt | 1 + presentation/build.gradle.kts | 1 + 3 files changed, 3 insertions(+) diff --git a/buildSrc/src/main/kotlin/Dependencies.kt b/buildSrc/src/main/kotlin/Dependencies.kt index b0d5aa16..bda85bcb 100644 --- a/buildSrc/src/main/kotlin/Dependencies.kt +++ b/buildSrc/src/main/kotlin/Dependencies.kt @@ -79,6 +79,7 @@ object ThirdPartyDependencies { const val amplitude = "com.amplitude:android-sdk:${Versions.amplitudeVersion}" const val flexbox = "com.google.android.flexbox:flexbox:${Versions.flexboxVersion}" + const val circleImageView = "de.hdodenhof:circleimageview:${Versions.circleImageViewVersion}" } object ClassPathPlugins { diff --git a/buildSrc/src/main/kotlin/Versions.kt b/buildSrc/src/main/kotlin/Versions.kt index cee26c3c..1812a6e7 100644 --- a/buildSrc/src/main/kotlin/Versions.kt +++ b/buildSrc/src/main/kotlin/Versions.kt @@ -42,6 +42,7 @@ object Versions { const val espressoVersion = "3.3.0" const val androidTestVersion = "1.1.2" const val flexboxVersion = "3.0.0" + const val circleImageViewVersion = "3.1.0" val javaVersion = JavaVersion.VERSION_17 const val jvmVersion = "17" diff --git a/presentation/build.gradle.kts b/presentation/build.gradle.kts index 44a2df83..d6597839 100644 --- a/presentation/build.gradle.kts +++ b/presentation/build.gradle.kts @@ -84,6 +84,7 @@ dependencies { implementation(circularProgressBar) implementation(circleIndicator) implementation(flexbox) + implementation(circleImageView) } KakaoDependencies.run { From 486bcc80528127e128d7f9ee81a13f3b6c0835b2 Mon Sep 17 00:00:00 2001 From: Dongmin Date: Fri, 1 Mar 2024 16:13:33 +0900 Subject: [PATCH 09/20] =?UTF-8?q?[FEAT/#220]=20=ED=94=84=EB=A1=9C=ED=95=84?= =?UTF-8?q?=20=EC=88=98=EC=A0=95=20=EB=B2=84=ED=8A=BC=20=EA=B5=AC=ED=98=84?= =?UTF-8?q?=20=EB=B0=8F=20=EA=B4=80=EB=A0=A8=20=EC=BB=B4=ED=8F=AC=EB=84=8C?= =?UTF-8?q?=ED=8A=B8=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../shape_rect_4_gray50_fill_gray100_line.xml | 9 ++++ .../src/main/res/layout/activity_profile.xml | 49 ++++++++++++------- presentation/src/main/res/values/strings.xml | 1 + 3 files changed, 42 insertions(+), 17 deletions(-) create mode 100644 presentation/src/main/res/drawable/shape_rect_4_gray50_fill_gray100_line.xml diff --git a/presentation/src/main/res/drawable/shape_rect_4_gray50_fill_gray100_line.xml b/presentation/src/main/res/drawable/shape_rect_4_gray50_fill_gray100_line.xml new file mode 100644 index 00000000..49ff0b19 --- /dev/null +++ b/presentation/src/main/res/drawable/shape_rect_4_gray50_fill_gray100_line.xml @@ -0,0 +1,9 @@ + + + + + + + \ No newline at end of file diff --git a/presentation/src/main/res/layout/activity_profile.xml b/presentation/src/main/res/layout/activity_profile.xml index 297653d1..a3f95058 100644 --- a/presentation/src/main/res/layout/activity_profile.xml +++ b/presentation/src/main/res/layout/activity_profile.xml @@ -68,28 +68,30 @@ android:layout_width="match_parent" android:layout_height="match_parent"> - + + - + app:layout_constraintTop_toBottomOf="@id/iv_profile" /> diff --git a/presentation/src/main/res/values/strings.xml b/presentation/src/main/res/values/strings.xml index d0f310df..ef788904 100644 --- a/presentation/src/main/res/values/strings.xml +++ b/presentation/src/main/res/values/strings.xml @@ -172,6 +172,7 @@ 나는 두릅이 좋다. 다시 해볼래요 존재하지 않는 여행입니다. + 프로필 수정 이미지가 저장되었어요\n친구들에게 공유해보세요! 이미지를 저장할 수 없습니다\n안드로이드 버전을 확인해주세요 From 2701460840e207792675662e42e4fc0bb28d8c28 Mon Sep 17 00:00:00 2001 From: Dongmin Date: Fri, 1 Mar 2024 16:21:39 +0900 Subject: [PATCH 10/20] =?UTF-8?q?[FEAT/#220]=20profile=20=EB=B7=B0=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=20=EC=99=84=EB=A3=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- presentation/src/main/res/layout/activity_profile.xml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/presentation/src/main/res/layout/activity_profile.xml b/presentation/src/main/res/layout/activity_profile.xml index a3f95058..0245fe31 100644 --- a/presentation/src/main/res/layout/activity_profile.xml +++ b/presentation/src/main/res/layout/activity_profile.xml @@ -131,6 +131,15 @@ app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@id/iv_profile" /> + + + app:layout_constraintTop_toBottomOf="@id/iv_profile_big" /> Date: Fri, 1 Mar 2024 16:25:59 +0900 Subject: [PATCH 11/20] =?UTF-8?q?[FEAT/#220]=20=ED=94=84=EB=A1=9C=ED=95=84?= =?UTF-8?q?=20=EC=88=98=EC=A0=95=20=EB=B2=84=ED=8A=BC=20=ED=81=B4=EB=A6=AD?= =?UTF-8?q?=EB=A6=AC=EC=8A=A4=EB=84=88=20=EC=97=B0=EA=B2=B0=20=EB=B0=8F=20?= =?UTF-8?q?=EC=BA=90=EB=A6=AD=ED=84=B0=20=EC=9D=B4=EB=AF=B8=EC=A7=80=20?= =?UTF-8?q?=EC=97=B0=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../presentation/profile/ProfileActivity.kt | 28 +++++++++++-------- .../src/main/res/layout/activity_profile.xml | 6 ++-- 2 files changed, 20 insertions(+), 14 deletions(-) diff --git a/presentation/src/main/java/com/going/presentation/profile/ProfileActivity.kt b/presentation/src/main/java/com/going/presentation/profile/ProfileActivity.kt index a1900c3d..4965df62 100644 --- a/presentation/src/main/java/com/going/presentation/profile/ProfileActivity.kt +++ b/presentation/src/main/java/com/going/presentation/profile/ProfileActivity.kt @@ -1,7 +1,6 @@ package com.going.presentation.profile import android.Manifest -import android.content.Intent import android.content.pm.PackageManager import android.os.Bundle import androidx.activity.viewModels @@ -17,13 +16,11 @@ import com.going.presentation.tendency.result.TendencyResultActivity.Companion.P import com.going.presentation.tendency.result.UserTendencyResultList import com.going.presentation.tendency.splash.TendencySplashActivity import com.going.presentation.util.downloadImage -import com.going.presentation.util.navigateToScreen import com.going.presentation.util.navigateToScreenClear import com.going.ui.base.BaseActivity -import com.going.ui.state.UiState -import com.going.ui.extension.setBulletPoint import com.going.ui.extension.setOnSingleClickListener import com.going.ui.extension.toast +import com.going.ui.state.UiState import dagger.hilt.android.AndroidEntryPoint import kotlinx.coroutines.flow.launchIn import kotlinx.coroutines.flow.onEach @@ -38,9 +35,10 @@ class ProfileActivity : getUserInfo() observeUserInfoState() - initRestartBtnClickListener() initBackBtnClickListener() initSaveImgBtnClickListener() + + initRestartBtnClickListener() } private fun getUserInfo() { @@ -75,6 +73,8 @@ class ProfileActivity : tvProfileType.text = profileTitle tvProfileSubType.text = profileSubTitle + ivProfileBig.load(resultImage) + tvProfileTag1.text = getString(R.string.tag, tags[0]) tvProfileTag2.text = getString(R.string.tag, tags[1]) tvProfileTag3.text = getString(R.string.tag, tags[2]) @@ -108,9 +108,9 @@ class ProfileActivity : } } - private fun initRestartBtnClickListener() { - binding.tvProfileRestart.setOnSingleClickListener { - navigateToScreenClear() + private fun initBackBtnClickListener() { + binding.btnProfileBack.setOnSingleClickListener { + finish() } } @@ -120,9 +120,15 @@ class ProfileActivity : } } - private fun initBackBtnClickListener() { - binding.btnProfileBack.setOnSingleClickListener { - finish() + private fun initProfileEditBtnClickListener() { + binding.btnProfileEdit.setOnSingleClickListener { + // 페이지 이동 함수 구현 예정 + } + } + + private fun initRestartBtnClickListener() { + binding.btnProfileRestart.setOnSingleClickListener { + navigateToScreenClear() } } diff --git a/presentation/src/main/res/layout/activity_profile.xml b/presentation/src/main/res/layout/activity_profile.xml index 0245fe31..c4e3574c 100644 --- a/presentation/src/main/res/layout/activity_profile.xml +++ b/presentation/src/main/res/layout/activity_profile.xml @@ -107,7 +107,7 @@ tools:text="@string/profile_tv_one_line" /> + app:layout_constraintTop_toBottomOf="@id/btn_profile_restart" /> From a62475d6f41e7d74ee842427af28dd4d0b967184 Mon Sep 17 00:00:00 2001 From: Dongmin Date: Fri, 1 Mar 2024 17:39:32 +0900 Subject: [PATCH 12/20] =?UTF-8?q?[FEAT/#220]=20ProfileEditActivity=20?= =?UTF-8?q?=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/AndroidManifest.xml | 6 ++ .../profile/ProfileEditActivity.kt | 64 ++++++++++++++ .../main/res/layout/activity_profile_edit.xml | 87 +++++++++++++++++++ 3 files changed, 157 insertions(+) create mode 100644 presentation/src/main/java/com/going/presentation/profile/ProfileEditActivity.kt create mode 100644 presentation/src/main/res/layout/activity_profile_edit.xml diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 20896b86..eefb7d64 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -149,6 +149,12 @@ android:exported="false" android:screenOrientation="portrait" /> + + + (R.layout.activity_profile_edit) { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + + setEtNameArguments() + setEtInfoArguments() + getUserInfo() + initBackBtnClickListener() + } + + private fun setEtNameArguments() { + with(binding.etProfileEditNickname) { + setMaxLen(3) + overWarning = getString(R.string.name_over_error) + blankWarning = getString(R.string.name_blank_error) + } + } + + private fun setEtInfoArguments() { + with(binding.etProfileEditInfo) { + setMaxLen(20) + overWarning = getString(R.string.info_over_error) + } + } + + private fun getUserInfo() { + binding.etProfileEditNickname.editText.setText(intent.getStringExtra(NICKNAME)) + binding.etProfileEditInfo.editText.setText(intent.getStringExtra(INFO)) + } + + private fun initBackBtnClickListener() { + binding.btnProfileEditBack.setOnSingleClickListener { + finish() + } + } + + companion object { + const val NICKNAME = "NICKNAME" + const val INFO = "INFO" + + @JvmStatic + fun createIntent( + context: Context, + nickName: String, + info: String, + ): Intent = Intent(context, ProfileEditActivity::class.java).apply { + putExtra(NICKNAME, nickName) + putExtra(INFO, info) + } + } +} \ No newline at end of file diff --git a/presentation/src/main/res/layout/activity_profile_edit.xml b/presentation/src/main/res/layout/activity_profile_edit.xml new file mode 100644 index 00000000..1b223d08 --- /dev/null +++ b/presentation/src/main/res/layout/activity_profile_edit.xml @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file From 00a4c386d11892c6256b499e08cd3749450eff79 Mon Sep 17 00:00:00 2001 From: Dongmin Date: Fri, 1 Mar 2024 17:39:51 +0900 Subject: [PATCH 13/20] =?UTF-8?q?[FEAT/#220]=20ProfileEditActivity?= =?UTF-8?q?=EC=99=80=20ProfileActivity=20=EC=97=B0=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/going/presentation/profile/ProfileActivity.kt | 10 ++++++++-- presentation/src/main/res/layout/activity_profile.xml | 6 +++--- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/presentation/src/main/java/com/going/presentation/profile/ProfileActivity.kt b/presentation/src/main/java/com/going/presentation/profile/ProfileActivity.kt index 4965df62..104cca0d 100644 --- a/presentation/src/main/java/com/going/presentation/profile/ProfileActivity.kt +++ b/presentation/src/main/java/com/going/presentation/profile/ProfileActivity.kt @@ -37,7 +37,7 @@ class ProfileActivity : observeUserInfoState() initBackBtnClickListener() initSaveImgBtnClickListener() - + initProfileEditBtnClickListener() initRestartBtnClickListener() } @@ -122,7 +122,13 @@ class ProfileActivity : private fun initProfileEditBtnClickListener() { binding.btnProfileEdit.setOnSingleClickListener { - // 페이지 이동 함수 구현 예정 + ProfileEditActivity.createIntent( + this, + binding.tvProfileName.text.toString(), + binding.tvProfileType.text.toString() + ).apply { + startActivity(this) + } } } diff --git a/presentation/src/main/res/layout/activity_profile.xml b/presentation/src/main/res/layout/activity_profile.xml index c4e3574c..a67ea5d2 100644 --- a/presentation/src/main/res/layout/activity_profile.xml +++ b/presentation/src/main/res/layout/activity_profile.xml @@ -13,7 +13,7 @@ android:background="@color/white_000"> + app:layout_constraintTop_toBottomOf="@id/tb_profile"> Date: Fri, 1 Mar 2024 17:42:18 +0900 Subject: [PATCH 14/20] =?UTF-8?q?[FIX/#220]=20Intent=20=EA=B0=92=20?= =?UTF-8?q?=EC=98=A4=EB=A5=98=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/going/presentation/profile/ProfileActivity.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/presentation/src/main/java/com/going/presentation/profile/ProfileActivity.kt b/presentation/src/main/java/com/going/presentation/profile/ProfileActivity.kt index 104cca0d..a454ad36 100644 --- a/presentation/src/main/java/com/going/presentation/profile/ProfileActivity.kt +++ b/presentation/src/main/java/com/going/presentation/profile/ProfileActivity.kt @@ -125,7 +125,7 @@ class ProfileActivity : ProfileEditActivity.createIntent( this, binding.tvProfileName.text.toString(), - binding.tvProfileType.text.toString() + binding.tvProfileOneLine.text.toString() ).apply { startActivity(this) } From 96c250dc41d528d3ae42d249c27bdd2a76fe879b Mon Sep 17 00:00:00 2001 From: Dongmin Date: Fri, 1 Mar 2024 17:47:14 +0900 Subject: [PATCH 15/20] =?UTF-8?q?[REFACTOR/#220]=20Profile=20=ED=8F=B4?= =?UTF-8?q?=EB=8D=94=EB=A7=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/AndroidManifest.xml | 4 +-- .../profile/{ => edit}/ProfileEditActivity.kt | 9 ++++-- .../profile/edit/ProfileEditViewModel.kt | 28 +++++++++++++++++++ .../profile/{ => my}/ProfileActivity.kt | 3 +- .../profile/{ => my}/ProfileViewModel.kt | 2 +- .../presentation/setting/SettingActivity.kt | 4 +-- .../todo/mytodo/MyTodoFragment.kt | 2 +- 7 files changed, 42 insertions(+), 10 deletions(-) rename presentation/src/main/java/com/going/presentation/profile/{ => edit}/ProfileEditActivity.kt (88%) create mode 100644 presentation/src/main/java/com/going/presentation/profile/edit/ProfileEditViewModel.kt rename presentation/src/main/java/com/going/presentation/profile/{ => my}/ProfileActivity.kt (98%) rename presentation/src/main/java/com/going/presentation/profile/{ => my}/ProfileViewModel.kt (96%) diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index eefb7d64..758a04ff 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -145,12 +145,12 @@ android:screenOrientation="portrait" /> diff --git a/presentation/src/main/java/com/going/presentation/profile/ProfileEditActivity.kt b/presentation/src/main/java/com/going/presentation/profile/edit/ProfileEditActivity.kt similarity index 88% rename from presentation/src/main/java/com/going/presentation/profile/ProfileEditActivity.kt rename to presentation/src/main/java/com/going/presentation/profile/edit/ProfileEditActivity.kt index 7eaa394f..f9571b20 100644 --- a/presentation/src/main/java/com/going/presentation/profile/ProfileEditActivity.kt +++ b/presentation/src/main/java/com/going/presentation/profile/edit/ProfileEditActivity.kt @@ -1,8 +1,9 @@ -package com.going.presentation.profile +package com.going.presentation.profile.edit import android.content.Context import android.content.Intent import android.os.Bundle +import androidx.activity.viewModels import com.going.presentation.R import com.going.presentation.databinding.ActivityProfileEditBinding import com.going.ui.base.BaseActivity @@ -12,6 +13,8 @@ import dagger.hilt.android.AndroidEntryPoint @AndroidEntryPoint class ProfileEditActivity : BaseActivity(R.layout.activity_profile_edit) { + private val viewModel by viewModels() + override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) @@ -23,7 +26,7 @@ class ProfileEditActivity : private fun setEtNameArguments() { with(binding.etProfileEditNickname) { - setMaxLen(3) + setMaxLen(viewModel.getMaxNameLen()) overWarning = getString(R.string.name_over_error) blankWarning = getString(R.string.name_blank_error) } @@ -31,7 +34,7 @@ class ProfileEditActivity : private fun setEtInfoArguments() { with(binding.etProfileEditInfo) { - setMaxLen(20) + setMaxLen(viewModel.getMaxInfoLen()) overWarning = getString(R.string.info_over_error) } } diff --git a/presentation/src/main/java/com/going/presentation/profile/edit/ProfileEditViewModel.kt b/presentation/src/main/java/com/going/presentation/profile/edit/ProfileEditViewModel.kt new file mode 100644 index 00000000..b6ef9fe7 --- /dev/null +++ b/presentation/src/main/java/com/going/presentation/profile/edit/ProfileEditViewModel.kt @@ -0,0 +1,28 @@ +package com.going.presentation.profile.edit + +import androidx.lifecycle.ViewModel +import androidx.lifecycle.viewModelScope +import com.going.domain.entity.request.UserProfileRequestModel +import com.going.domain.repository.ProfileRepository +import com.going.presentation.onboarding.signup.SignUpViewModel +import com.going.ui.state.UiState +import dagger.hilt.android.lifecycle.HiltViewModel +import kotlinx.coroutines.flow.MutableStateFlow +import kotlinx.coroutines.flow.StateFlow +import kotlinx.coroutines.launch +import javax.inject.Inject + +@HiltViewModel +class ProfileEditViewModel @Inject constructor( + private val profileRepository: ProfileRepository, +) : ViewModel() { + + private val _userInfoState = MutableStateFlow>(UiState.Empty) + val userInfoState: StateFlow> = _userInfoState + + val profileId = MutableStateFlow(0) + + fun getMaxNameLen() = SignUpViewModel.MAX_NAME_LEN + + fun getMaxInfoLen() = SignUpViewModel.MAX_INFO_LEN +} diff --git a/presentation/src/main/java/com/going/presentation/profile/ProfileActivity.kt b/presentation/src/main/java/com/going/presentation/profile/my/ProfileActivity.kt similarity index 98% rename from presentation/src/main/java/com/going/presentation/profile/ProfileActivity.kt rename to presentation/src/main/java/com/going/presentation/profile/my/ProfileActivity.kt index a454ad36..5d7e5b1e 100644 --- a/presentation/src/main/java/com/going/presentation/profile/ProfileActivity.kt +++ b/presentation/src/main/java/com/going/presentation/profile/my/ProfileActivity.kt @@ -1,4 +1,4 @@ -package com.going.presentation.profile +package com.going.presentation.profile.my import android.Manifest import android.content.pm.PackageManager @@ -12,6 +12,7 @@ import coil.transform.CircleCropTransformation import com.going.presentation.R import com.going.presentation.databinding.ActivityProfileBinding import com.going.presentation.designsystem.textview.ChartTextView +import com.going.presentation.profile.edit.ProfileEditActivity import com.going.presentation.tendency.result.TendencyResultActivity.Companion.PERMISSION_REQUEST_CODE import com.going.presentation.tendency.result.UserTendencyResultList import com.going.presentation.tendency.splash.TendencySplashActivity diff --git a/presentation/src/main/java/com/going/presentation/profile/ProfileViewModel.kt b/presentation/src/main/java/com/going/presentation/profile/my/ProfileViewModel.kt similarity index 96% rename from presentation/src/main/java/com/going/presentation/profile/ProfileViewModel.kt rename to presentation/src/main/java/com/going/presentation/profile/my/ProfileViewModel.kt index 37f00dd1..dd390654 100644 --- a/presentation/src/main/java/com/going/presentation/profile/ProfileViewModel.kt +++ b/presentation/src/main/java/com/going/presentation/profile/my/ProfileViewModel.kt @@ -1,4 +1,4 @@ -package com.going.presentation.profile +package com.going.presentation.profile.my import androidx.lifecycle.ViewModel import androidx.lifecycle.viewModelScope diff --git a/presentation/src/main/java/com/going/presentation/setting/SettingActivity.kt b/presentation/src/main/java/com/going/presentation/setting/SettingActivity.kt index e135d880..2808f3cc 100644 --- a/presentation/src/main/java/com/going/presentation/setting/SettingActivity.kt +++ b/presentation/src/main/java/com/going/presentation/setting/SettingActivity.kt @@ -6,8 +6,8 @@ import android.os.Bundle import androidx.activity.viewModels import com.going.presentation.R import com.going.presentation.databinding.ActivitySettingBinding -import com.going.presentation.profile.ProfileActivity -import com.going.presentation.profile.ProfileViewModel +import com.going.presentation.profile.my.ProfileActivity +import com.going.presentation.profile.my.ProfileViewModel import com.going.presentation.util.openWebView import com.going.presentation.util.navigateToScreen import com.going.ui.base.BaseActivity diff --git a/presentation/src/main/java/com/going/presentation/todo/mytodo/MyTodoFragment.kt b/presentation/src/main/java/com/going/presentation/todo/mytodo/MyTodoFragment.kt index ebc35d16..51fb07e1 100644 --- a/presentation/src/main/java/com/going/presentation/todo/mytodo/MyTodoFragment.kt +++ b/presentation/src/main/java/com/going/presentation/todo/mytodo/MyTodoFragment.kt @@ -16,7 +16,7 @@ import androidx.lifecycle.lifecycleScope import androidx.viewpager2.widget.ViewPager2 import com.going.presentation.R import com.going.presentation.databinding.FragmentMyTodoBinding -import com.going.presentation.profile.ProfileActivity +import com.going.presentation.profile.my.ProfileActivity import com.going.presentation.todo.TodoActivity.Companion.EXTRA_TRIP_ID import com.going.presentation.todo.create.TodoCreateActivity import com.going.presentation.todo.mytodo.todolist.MyTodoViewPagerAdapter From 213956a4c21eaa416a5700bfcdc546d9ccf85cd0 Mon Sep 17 00:00:00 2001 From: Dongmin Date: Fri, 1 Mar 2024 17:51:01 +0900 Subject: [PATCH 16/20] =?UTF-8?q?[CHORE/#220]=20=EB=AF=B8=EC=82=AC?= =?UTF-8?q?=EC=9A=A9=20viewModel=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/going/presentation/setting/SettingActivity.kt | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/presentation/src/main/java/com/going/presentation/setting/SettingActivity.kt b/presentation/src/main/java/com/going/presentation/setting/SettingActivity.kt index 2808f3cc..9db92953 100644 --- a/presentation/src/main/java/com/going/presentation/setting/SettingActivity.kt +++ b/presentation/src/main/java/com/going/presentation/setting/SettingActivity.kt @@ -3,21 +3,17 @@ package com.going.presentation.setting import android.content.Intent import android.net.Uri import android.os.Bundle -import androidx.activity.viewModels import com.going.presentation.R import com.going.presentation.databinding.ActivitySettingBinding import com.going.presentation.profile.my.ProfileActivity -import com.going.presentation.profile.my.ProfileViewModel -import com.going.presentation.util.openWebView import com.going.presentation.util.navigateToScreen +import com.going.presentation.util.openWebView import com.going.ui.base.BaseActivity import com.going.ui.extension.setOnSingleClickListener import dagger.hilt.android.AndroidEntryPoint @AndroidEntryPoint class SettingActivity : BaseActivity(R.layout.activity_setting) { - private val profileViewModel by viewModels() - private var quitDialog: SettingQuitDialogFragment? = null private var logoutDialog: SettingLogoutDialogFragment? = null From d431d8754a580d42c2cf860039c2bd042cd69974 Mon Sep 17 00:00:00 2001 From: Dongmin Date: Fri, 1 Mar 2024 21:11:04 +0900 Subject: [PATCH 17/20] =?UTF-8?q?[CHORE/#220]=20=EB=84=A4=EC=9D=B4?= =?UTF-8?q?=EB=B0=8D=20=EB=B3=80=EA=B2=BD=20=EB=B0=8F=20enable=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/res/layout/activity_profile_edit.xml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/presentation/src/main/res/layout/activity_profile_edit.xml b/presentation/src/main/res/layout/activity_profile_edit.xml index 1b223d08..b3a2a52f 100644 --- a/presentation/src/main/res/layout/activity_profile_edit.xml +++ b/presentation/src/main/res/layout/activity_profile_edit.xml @@ -3,7 +3,9 @@ xmlns:app="http://schemas.android.com/apk/res-auto"> - + Date: Fri, 1 Mar 2024 21:11:26 +0900 Subject: [PATCH 18/20] =?UTF-8?q?[FEAT/#220]=20=EC=A0=95=EB=B3=B4=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD=EC=8B=9C=EC=97=90=EB=A7=8C=20=EB=B2=84?= =?UTF-8?q?=ED=8A=BC=20=ED=99=9C=EC=84=B1=ED=99=94=EB=90=98=EB=8A=94=20?= =?UTF-8?q?=EA=B8=B0=EB=8A=A5=20=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../profile/edit/ProfileEditActivity.kt | 36 ++++++++++++- .../profile/edit/ProfileEditViewModel.kt | 50 +++++++++++++------ 2 files changed, 70 insertions(+), 16 deletions(-) diff --git a/presentation/src/main/java/com/going/presentation/profile/edit/ProfileEditActivity.kt b/presentation/src/main/java/com/going/presentation/profile/edit/ProfileEditActivity.kt index f9571b20..cdc1f6cf 100644 --- a/presentation/src/main/java/com/going/presentation/profile/edit/ProfileEditActivity.kt +++ b/presentation/src/main/java/com/going/presentation/profile/edit/ProfileEditActivity.kt @@ -4,11 +4,16 @@ import android.content.Context import android.content.Intent import android.os.Bundle import androidx.activity.viewModels +import androidx.core.widget.doAfterTextChanged +import androidx.lifecycle.flowWithLifecycle +import androidx.lifecycle.lifecycleScope import com.going.presentation.R import com.going.presentation.databinding.ActivityProfileEditBinding import com.going.ui.base.BaseActivity import com.going.ui.extension.setOnSingleClickListener import dagger.hilt.android.AndroidEntryPoint +import kotlinx.coroutines.flow.launchIn +import kotlinx.coroutines.flow.onEach @AndroidEntryPoint class ProfileEditActivity : @@ -21,6 +26,9 @@ class ProfileEditActivity : setEtNameArguments() setEtInfoArguments() getUserInfo() + observeNameTextChanged() + observeInfoTextChanged() + observeIsValueChanged() initBackBtnClickListener() } @@ -39,9 +47,33 @@ class ProfileEditActivity : } } + private fun observeNameTextChanged() { + binding.etProfileEditNickname.editText.doAfterTextChanged { name -> + viewModel.checkIsNameChanged(name.toString()) + } + } + + private fun observeInfoTextChanged() { + binding.etProfileEditInfo.editText.doAfterTextChanged { info -> + viewModel.checkIsInfoChanged(info.toString()) + } + } + private fun getUserInfo() { - binding.etProfileEditNickname.editText.setText(intent.getStringExtra(NICKNAME)) - binding.etProfileEditInfo.editText.setText(intent.getStringExtra(INFO)) + val name = intent.getStringExtra(NICKNAME) + val info = intent.getStringExtra(INFO) + + with(binding) { + etProfileEditNickname.editText.setText(name) + etProfileEditInfo.editText.setText(info) + } + viewModel.setDefaultValues(name.orEmpty(), info.orEmpty()) + } + + private fun observeIsValueChanged() { + viewModel.isValueChanged.flowWithLifecycle(lifecycle).onEach { state -> + binding.btnProfileEditFinish.isEnabled = state + }.launchIn(lifecycleScope) } private fun initBackBtnClickListener() { diff --git a/presentation/src/main/java/com/going/presentation/profile/edit/ProfileEditViewModel.kt b/presentation/src/main/java/com/going/presentation/profile/edit/ProfileEditViewModel.kt index b6ef9fe7..42b5bee7 100644 --- a/presentation/src/main/java/com/going/presentation/profile/edit/ProfileEditViewModel.kt +++ b/presentation/src/main/java/com/going/presentation/profile/edit/ProfileEditViewModel.kt @@ -1,26 +1,48 @@ package com.going.presentation.profile.edit import androidx.lifecycle.ViewModel -import androidx.lifecycle.viewModelScope -import com.going.domain.entity.request.UserProfileRequestModel -import com.going.domain.repository.ProfileRepository import com.going.presentation.onboarding.signup.SignUpViewModel -import com.going.ui.state.UiState -import dagger.hilt.android.lifecycle.HiltViewModel import kotlinx.coroutines.flow.MutableStateFlow import kotlinx.coroutines.flow.StateFlow -import kotlinx.coroutines.launch -import javax.inject.Inject -@HiltViewModel -class ProfileEditViewModel @Inject constructor( - private val profileRepository: ProfileRepository, -) : ViewModel() { +class ProfileEditViewModel : ViewModel() { + private val _isValueChanged = MutableStateFlow(false) + val isValueChanged: StateFlow = _isValueChanged - private val _userInfoState = MutableStateFlow>(UiState.Empty) - val userInfoState: StateFlow> = _userInfoState + private var isNameChanged = false + private var isInfoChanged = false - val profileId = MutableStateFlow(0) + private lateinit var nowName: String + private lateinit var nowInfo: String + private lateinit var defaultName: String + private lateinit var defaultInfo: String + + fun setDefaultValues(name: String, info: String) { + nowName = name + nowInfo = info + + defaultName = name + defaultInfo = info + } + + fun checkIsNameChanged(name: String) { + nowName = name + isNameChanged = name != defaultName + + checkIsValueChanged() + } + + fun checkIsInfoChanged(info: String) { + nowInfo = info + isInfoChanged = info != defaultInfo + + checkIsValueChanged() + } + + private fun checkIsValueChanged() { + _isValueChanged.value = + nowName.length <= getMaxNameLen() && nowInfo.length <= getMaxInfoLen() && (isInfoChanged || isNameChanged) + } fun getMaxNameLen() = SignUpViewModel.MAX_NAME_LEN From a965f82f57600ab05bdfdbbcc366930f69c82172 Mon Sep 17 00:00:00 2001 From: Dongmin Date: Fri, 1 Mar 2024 22:26:48 +0900 Subject: [PATCH 19/20] =?UTF-8?q?[CHORE/#220]=20=EB=B3=80=EC=88=98=20priva?= =?UTF-8?q?te=20=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../going/presentation/profile/edit/ProfileEditActivity.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/presentation/src/main/java/com/going/presentation/profile/edit/ProfileEditActivity.kt b/presentation/src/main/java/com/going/presentation/profile/edit/ProfileEditActivity.kt index cdc1f6cf..8d18bbe8 100644 --- a/presentation/src/main/java/com/going/presentation/profile/edit/ProfileEditActivity.kt +++ b/presentation/src/main/java/com/going/presentation/profile/edit/ProfileEditActivity.kt @@ -83,8 +83,8 @@ class ProfileEditActivity : } companion object { - const val NICKNAME = "NICKNAME" - const val INFO = "INFO" + private const val NICKNAME = "NICKNAME" + private const val INFO = "INFO" @JvmStatic fun createIntent( From 079a8aaf8d7107c970109eae60991118eb379b71 Mon Sep 17 00:00:00 2001 From: Dongmin Date: Fri, 1 Mar 2024 22:28:03 +0900 Subject: [PATCH 20/20] =?UTF-8?q?[CHORE/#220]=20clickListener=20->=20?= =?UTF-8?q?=EC=8B=B1=EA=B8=80=ED=81=B4=EB=A6=AD=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../presentation/designsystem/edittext/EmojiCounterEditText.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/presentation/src/main/java/com/going/presentation/designsystem/edittext/EmojiCounterEditText.kt b/presentation/src/main/java/com/going/presentation/designsystem/edittext/EmojiCounterEditText.kt index 7e2f9428..b92de88b 100644 --- a/presentation/src/main/java/com/going/presentation/designsystem/edittext/EmojiCounterEditText.kt +++ b/presentation/src/main/java/com/going/presentation/designsystem/edittext/EmojiCounterEditText.kt @@ -12,6 +12,7 @@ import com.going.presentation.R import com.going.presentation.databinding.ViewEmojiCounterEdittextBinding import com.going.ui.extension.colorOf import com.going.ui.extension.getGraphemeLength +import com.going.ui.extension.setOnSingleClickListener class EmojiCounterEditText(context: Context, attrs: AttributeSet) : ConstraintLayout(context, attrs) { @@ -76,7 +77,7 @@ class EmojiCounterEditText(context: Context, attrs: AttributeSet) : } private fun initDeleteBtnClickListener() = with(binding) { - btnDeleteText.setOnClickListener { + btnDeleteText.setOnSingleClickListener { etEmojiCounterEtContent.text = null } }