diff --git a/README.md b/README.md index fce61f9..2906857 100644 --- a/README.md +++ b/README.md @@ -77,7 +77,7 @@ ๐Ÿ—ƒ๏ธapp โ”— ๐Ÿ“‚di -๐Ÿ—ƒ๏ธbuildSrc +๐Ÿ—ƒ๏ธbuild-logic ๐Ÿ—ƒ๏ธcore โ”ฃ ๐Ÿ“‚base diff --git a/build-logic/convention/src/main/java/kr/genti/convention/Constants.kt b/build-logic/convention/src/main/java/kr/genti/convention/Constants.kt index 350ca45..2275419 100644 --- a/build-logic/convention/src/main/java/kr/genti/convention/Constants.kt +++ b/build-logic/convention/src/main/java/kr/genti/convention/Constants.kt @@ -9,7 +9,7 @@ object Constants { const val minSdk = 28 const val targetSdk = 34 - const val versionCode = 21 + const val versionCode = 23 const val versionName = "2.1.0" const val jvmVersion = "17" diff --git a/presentation/src/main/java/kr/genti/presentation/create/SelfieFragment.kt b/presentation/src/main/java/kr/genti/presentation/create/SelfieFragment.kt index 85dee1a..7d4a0d4 100644 --- a/presentation/src/main/java/kr/genti/presentation/create/SelfieFragment.kt +++ b/presentation/src/main/java/kr/genti/presentation/create/SelfieFragment.kt @@ -21,6 +21,7 @@ import androidx.lifecycle.flowWithLifecycle import androidx.lifecycle.lifecycleScope import androidx.navigation.fragment.findNavController import coil.load +import com.android.billingclient.api.BillingClient import com.android.billingclient.api.Purchase import dagger.hilt.android.AndroidEntryPoint import kotlinx.coroutines.flow.launchIn @@ -113,7 +114,9 @@ class SelfieFragment : BaseFragment(R.layout.fragment_sel override fun onBillingFailure(responseCode: Int) { viewModel.resetValidProcessLoading() - toast(stringOf(R.string.error_msg)) + if (responseCode != BillingClient.BillingResponseCode.USER_CANCELED) { + toast(stringOf(R.string.error_msg)) + } } }, @@ -159,7 +162,6 @@ class SelfieFragment : BaseFragment(R.layout.fragment_sel EVENT_CLICK_BTN, amplitudePage, mapOf(PROPERTY_BTN to "createpic"), ) with(viewModel) { - isCompleted.value = false if (isCreatingParentPic) { startValidProcessLoading() manager.purchaseProduct() @@ -203,6 +205,9 @@ class SelfieFragment : BaseFragment(R.layout.fragment_sel if (viewModel.isCreatingParentPic) { if (viewModel.selectedNumber.value == PictureNumber.ONE) { tvSelfieTitle.text = stringOf(R.string.selfie_tv_title_parent_one) + ivExImage1.load(R.drawable.img_parent_ex_1) + ivExImage2.load(R.drawable.img_parent_ex_2) + ivExImage3.load(R.drawable.img_parent_ex_3) } else { tvSelfieTitle.text = stringOf(R.string.selfie_tv_title_parent_two) layoutExampleImage.isVisible = false @@ -306,12 +311,13 @@ class SelfieFragment : BaseFragment(R.layout.fragment_sel } private fun TextView.updateButton(isEmpty: Boolean) { - text = if (isEmpty) stringOf(R.string.selfie_tv_btn_select) - else stringOf(R.string.selfie_tv_btn_reselect) - setTextColor( - if (isEmpty) colorOf(R.color.genti_green) - else colorOf(R.color.white_60) - ) + if (isEmpty) { + text = stringOf(R.string.selfie_tv_btn_select) + setTextColor(colorOf(R.color.genti_green)) + } else { + text = stringOf(R.string.selfie_tv_btn_reselect) + setTextColor(colorOf(R.color.white_60)) + } } private fun observeGeneratingState() { @@ -348,6 +354,7 @@ class SelfieFragment : BaseFragment(R.layout.fragment_sel .setMessage(getString(R.string.pay_error_dialog_msg)) .setPositiveButton(getString(R.string.pay_error_dialog_btn)) { dialog, _ -> dialog.dismiss() } .create().show() + viewModel.resetValidProcessLoading() } override fun onDestroyView() { diff --git a/presentation/src/main/java/kr/genti/presentation/generate/finished/FinishedActivity.kt b/presentation/src/main/java/kr/genti/presentation/generate/finished/FinishedActivity.kt index 5a67830..719b731 100644 --- a/presentation/src/main/java/kr/genti/presentation/generate/finished/FinishedActivity.kt +++ b/presentation/src/main/java/kr/genti/presentation/generate/finished/FinishedActivity.kt @@ -3,6 +3,7 @@ package kr.genti.presentation.generate.finished import android.content.Context import android.content.Intent import android.os.Bundle +import android.view.View import android.view.ViewGroup import androidx.activity.OnBackPressedCallback import androidx.activity.viewModels @@ -128,10 +129,10 @@ class FinishedActivity : BaseActivity(R.layout.activity if (intent.getBooleanExtra(EXTRA_IS_PAID, false)) { with(binding) { tvFinishedTitle.text = stringOf(R.string.finished_tv_title_paid) - btnDownload.isVisible = false - ivFinishedTooltip.isVisible = false - btnShare.isVisible = false - btnSavePaid.isVisible = true + btnDownload.visibility = View.INVISIBLE + ivFinishedTooltip.visibility = View.INVISIBLE + btnShare.visibility = View.INVISIBLE + btnSavePaid.visibility = View.VISIBLE } amplitudeType = mapOf(PROPERTY_TYPE to TYPE_ORIGINAL) amplitudePage = mapOf(PROPERTY_PAGE to "picdone") diff --git a/presentation/src/main/java/kr/genti/presentation/main/CreateSelectDialog.kt b/presentation/src/main/java/kr/genti/presentation/main/CreateSelectDialog.kt index c79ab00..d038a32 100644 --- a/presentation/src/main/java/kr/genti/presentation/main/CreateSelectDialog.kt +++ b/presentation/src/main/java/kr/genti/presentation/main/CreateSelectDialog.kt @@ -1,13 +1,15 @@ package kr.genti.presentation.main +import android.annotation.SuppressLint import android.os.Bundle +import android.view.MotionEvent import android.view.View import android.view.WindowManager +import androidx.constraintlayout.widget.ConstraintLayout import androidx.lifecycle.lifecycleScope import kotlinx.coroutines.delay import kotlinx.coroutines.launch import kr.genti.core.base.BaseDialog -import kr.genti.core.extension.setOnSingleClickListener import kr.genti.presentation.R import kr.genti.presentation.create.CreateActivity import kr.genti.presentation.databinding.DialogCreateSelectBinding @@ -37,13 +39,36 @@ class CreateSelectDialog : BaseDialog(R.layout.dialog private fun initCreateBtnListeners() { with(binding) { - layoutDefaultCreate.setOnSingleClickListener { - AmplitudeManager.trackEvent("click_mypicture") - navigateToCreate(false) - } - layoutParentCreate.setOnSingleClickListener { - AmplitudeManager.trackEvent("click_parentpicture") - navigateToCreate(true) + layoutDefaultCreate.setCustomTouchListener(false) + layoutParentCreate.setCustomTouchListener(true) + } + } + + @SuppressLint("ClickableViewAccessibility") + private fun ConstraintLayout.setCustomTouchListener(isCreatingParentPic: Boolean) { + this.setOnTouchListener { view, event -> + when (event.action) { + MotionEvent.ACTION_DOWN -> { + if (isCreatingParentPic) { + this.setBackgroundResource(R.drawable.shape_gray_fill_green_line_6_rect) + binding.layoutDefaultCreate.alpha = 0.6F + } else { + this.setBackgroundResource(R.drawable.shape_gray_fill_green_line_6_rect) + binding.layoutParentCreate.alpha = 0.6F + } + view.performClick() + true + } + MotionEvent.ACTION_UP -> { + if (isCreatingParentPic) { + AmplitudeManager.trackEvent("click_parentpicture") + } else { + AmplitudeManager.trackEvent("click_mypicture") + } + navigateToCreate(isCreatingParentPic) + true + } + else -> false } } } diff --git a/presentation/src/main/res/drawable/img_parent_ex_1.png b/presentation/src/main/res/drawable/img_parent_ex_1.png new file mode 100644 index 0000000..976f861 Binary files /dev/null and b/presentation/src/main/res/drawable/img_parent_ex_1.png differ diff --git a/presentation/src/main/res/drawable/img_parent_ex_2.png b/presentation/src/main/res/drawable/img_parent_ex_2.png new file mode 100644 index 0000000..0605894 Binary files /dev/null and b/presentation/src/main/res/drawable/img_parent_ex_2.png differ diff --git a/presentation/src/main/res/drawable/img_parent_ex_3.png b/presentation/src/main/res/drawable/img_parent_ex_3.png new file mode 100644 index 0000000..c6ed43f Binary files /dev/null and b/presentation/src/main/res/drawable/img_parent_ex_3.png differ diff --git a/presentation/src/main/res/drawable/shape_gray_fill_green_line_6_rect.xml b/presentation/src/main/res/drawable/shape_gray_fill_green_line_6_rect.xml new file mode 100644 index 0000000..c440250 --- /dev/null +++ b/presentation/src/main/res/drawable/shape_gray_fill_green_line_6_rect.xml @@ -0,0 +1,8 @@ + + + + + + \ No newline at end of file diff --git a/presentation/src/main/res/layout/activity_signup.xml b/presentation/src/main/res/layout/activity_signup.xml index 8fab7ce..f6beb77 100644 --- a/presentation/src/main/res/layout/activity_signup.xml +++ b/presentation/src/main/res/layout/activity_signup.xml @@ -31,7 +31,7 @@ android:gravity="center" android:lineSpacingMultiplier="1.1" android:text="@string/signup_tv_title" - android:textSize="24sp" + android:textSize="24dp" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" /> @@ -44,6 +44,7 @@ android:gravity="center" android:text="@string/signup_tv_subtitle" android:textColor="@color/white_60" + android:textSize="14dp" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@id/tv_signup_title" /> diff --git a/presentation/src/main/res/layout/fragment_number.xml b/presentation/src/main/res/layout/fragment_number.xml index 25ddf5b..ad32e75 100644 --- a/presentation/src/main/res/layout/fragment_number.xml +++ b/presentation/src/main/res/layout/fragment_number.xml @@ -46,35 +46,42 @@ android:id="@+id/bg_number_one" android:layout_width="0dp" android:layout_height="0dp" - android:layout_marginStart="40dp" - android:layout_marginTop="25dp" - android:layout_marginEnd="4dp" android:background="@drawable/shape_green_gradation_6_rect" android:visibility="@{vm.selectedNumber == pictureNumber.ONE ? View.VISIBLE : View.INVISIBLE}" - app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintDimensionRatio="1" - app:layout_constraintEnd_toStartOf="@id/bg_number_two" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@id/tv_number_title" /> + app:layout_constraintBottom_toBottomOf="@id/btn_number_one" + app:layout_constraintEnd_toEndOf="@id/btn_number_one" + app:layout_constraintStart_toStartOf="@id/btn_number_one" + app:layout_constraintTop_toTopOf="@id/btn_number_one" /> + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toStartOf="@id/btn_number_two" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@id/tv_number_title"> + + + app:layout_constraintTop_toBottomOf="@id/iv_number_one" /> + + + app:layout_constraintBottom_toBottomOf="@id/btn_number_two" + app:layout_constraintEnd_toEndOf="@id/btn_number_two" + app:layout_constraintStart_toStartOf="@id/btn_number_two" + app:layout_constraintTop_toTopOf="@id/btn_number_two" /> + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toEndOf="@id/btn_number_one" + app:layout_constraintTop_toBottomOf="@id/tv_number_title"> + + + app:layout_constraintTop_toBottomOf="@id/iv_number_two" /> + + diff --git a/presentation/src/main/res/layout/fragment_pose.xml b/presentation/src/main/res/layout/fragment_pose.xml index b7a560d..5d52761 100644 --- a/presentation/src/main/res/layout/fragment_pose.xml +++ b/presentation/src/main/res/layout/fragment_pose.xml @@ -46,35 +46,42 @@ android:id="@+id/bg_ratio_3_2" android:layout_width="0dp" android:layout_height="0dp" - android:layout_marginStart="40dp" - android:layout_marginTop="25dp" - android:layout_marginEnd="4dp" android:background="@drawable/shape_green_gradation_6_rect" android:visibility="@{vm.selectedRatio == pictureRatio.RATIO_SERO ? View.VISIBLE : View.INVISIBLE}" - app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintDimensionRatio="1" - app:layout_constraintEnd_toStartOf="@id/bg_ratio_2_3" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@id/tv_ratio_title" /> + app:layout_constraintBottom_toBottomOf="@id/btn_ratio_3_2" + app:layout_constraintEnd_toEndOf="@id/btn_ratio_3_2" + app:layout_constraintStart_toStartOf="@id/btn_ratio_3_2" + app:layout_constraintTop_toTopOf="@id/btn_ratio_3_2" /> + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toStartOf="@id/btn_ratio_2_3" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@id/tv_ratio_title"> + + + app:layout_constraintTop_toBottomOf="@id/iv_ratio_3_2" /> + + + app:layout_constraintBottom_toBottomOf="@id/btn_ratio_2_3" + app:layout_constraintEnd_toEndOf="@id/btn_ratio_2_3" + app:layout_constraintStart_toStartOf="@id/btn_ratio_2_3" + app:layout_constraintTop_toTopOf="@id/btn_ratio_2_3" /> + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toEndOf="@id/btn_ratio_3_2" + app:layout_constraintTop_toBottomOf="@id/tv_ratio_title"> + + + + diff --git a/presentation/src/main/res/layout/fragment_selfie.xml b/presentation/src/main/res/layout/fragment_selfie.xml index 632ed15..2ccb480 100644 --- a/presentation/src/main/res/layout/fragment_selfie.xml +++ b/presentation/src/main/res/layout/fragment_selfie.xml @@ -48,7 +48,7 @@ android:gravity="center" android:text="@string/selfie_tv_guide_1" android:textColor="@color/white_60" - android:textSize="12dp" + android:textSize="13dp" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@id/tv_selfie_title" /> @@ -61,7 +61,7 @@ android:gravity="center" android:text="@string/selfie_tv_guide_2" android:textColor="@color/white_60" - android:textSize="12dp" + android:textSize="13dp" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@id/tv_selfie_guide_1" /> @@ -74,7 +74,7 @@ android:gravity="center" android:text="@string/selfie_tv_guide_3" android:textColor="@color/white_60" - android:textSize="12dp" + android:textSize="13dp" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@id/tv_selfie_guide_2" /> @@ -88,7 +88,7 @@ android:gravity="center" android:text="@string/selfie_tv_warning" android:textColor="@color/white_30" - android:textSize="12dp" + android:textSize="13dp" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@id/tv_selfie_guide_3" /> @@ -331,7 +331,7 @@ android:id="@+id/iv_added_first_image_bg_2" android:layout_width="0dp" android:layout_height="0dp" - android:layout_marginHorizontal="6dp" + android:layout_marginHorizontal="2dp" android:layout_marginTop="14dp" android:background="@drawable/shape_gray_fill_green_line_rect" android:visibility="@{vm.isFirstListCompleted ? View.VISIBLE : View.INVISIBLE}" @@ -445,7 +445,7 @@ android:id="@+id/iv_added_second_image_bg_2" android:layout_width="0dp" android:layout_height="0dp" - android:layout_marginHorizontal="6dp" + android:layout_marginHorizontal="2dp" android:layout_marginTop="14dp" android:background="@drawable/shape_gray_fill_green_line_rect" android:visibility="@{vm.isSecondListCompleted ? View.VISIBLE : View.INVISIBLE}" diff --git a/presentation/src/main/res/values/strings.xml b/presentation/src/main/res/values/strings.xml index 88a17e8..539f4b3 100644 --- a/presentation/src/main/res/values/strings.xml +++ b/presentation/src/main/res/values/strings.xml @@ -82,7 +82,7 @@ ์‚ฌ์ง„ ์ƒ์„ฑ์— ์‚ฌ์šฉํ• \n์–ผ๊ตด ์‚ฌ์ง„ 3์žฅ์„ ์„ ํƒํ•ด์ฃผ์„ธ์š”. ์ •๋ฉด์„ ํฌํ•จํ•˜์—ฌ ์‚ฌ์ง„์˜ ๊ฐ๋„๊ฐ€ ๋‹ค์–‘ํ• ์ˆ˜๋ก ์ข‹์•„์š”. ๋ชจ์ž, ์•…์„ธ์‚ฌ๋ฆฌ ๋“ฑ์œผ๋กœ ์–ผ๊ตด์ด ๊ฐ€๋ ค์ง„ ์‚ฌ์ง„์€ ์•ˆ๋ผ์š”. - ์–ผ๊ตด ํ‘œ์ •์ด ๋‹ค์–‘ํ•  ์ˆ˜๋ก ๋” ์‹ค๊ฐ๋‚˜๋Š” ์‚ฌ์ง„์„ ๋งŒ๋“ค ์ˆ˜ ์žˆ์–ด์š”. + ์–ผ๊ตด ํ‘œ์ •์ด ๋‹ค์–‘ํ• ์ˆ˜๋ก ๋” ์‹ค๊ฐ๋‚˜๋Š” ์‚ฌ์ง„์„ ๋งŒ๋“ค ์ˆ˜ ์žˆ์–ด์š”. ํ‘๋ฐฑ ์‚ฌ์ง„์ด๊ฑฐ๋‚˜, ํ™”์งˆ์ด ์ข‹์ง€ ์•Š์•„๋„ ๊ดœ์ฐฎ์•„์š”. ํƒ€์ธ์˜ ์‚ฌ์ง„์„ ๋„์šฉํ•˜๋ฉด ์„œ๋น„์Šค ์ด์šฉ์ด ์ •์ง€๋˜๊ณ ,\n๋ฒ•์ ์ธ ์ฒ˜๋ฒŒ์„ ๋ฐ›์„ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์‚ฌ์ง„ ์ƒ์„ฑ์— ์‚ฌ์šฉํ•  ๋ถ€๋ชจ๋‹˜ ์–ผ๊ตด ์‚ฌ์ง„\n3์žฅ์„ ์„ ํƒํ•ด์ฃผ์„ธ์š”