From 7452b0884402afdb08dab35c8c1182e5a31c265e Mon Sep 17 00:00:00 2001 From: juhwankim-dev Date: Tue, 13 Dec 2022 00:36:32 +0900 Subject: [PATCH 1/3] =?UTF-8?q?ui:=20=EC=82=AC=EC=9A=A9=ED=95=A0=20?= =?UTF-8?q?=EC=95=84=EC=9D=B4=EC=BD=98,=20selector,=20=EB=AC=B8=EC=9E=90?= =?UTF-8?q?=EC=97=B4=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/res/drawable/ic_popup_close.xml | 16 ++++++++++++++++ .../main/res/drawable/ic_popup_close_pressed.xml | 16 ++++++++++++++++ .../main/res/drawable/selector_popup_close.xml | 5 +++++ .../mate/src/main/res/values/strings.xml | 3 +++ 4 files changed, 40 insertions(+) create mode 100644 presentation/mate/src/main/res/drawable/ic_popup_close.xml create mode 100644 presentation/mate/src/main/res/drawable/ic_popup_close_pressed.xml create mode 100644 presentation/mate/src/main/res/drawable/selector_popup_close.xml diff --git a/presentation/mate/src/main/res/drawable/ic_popup_close.xml b/presentation/mate/src/main/res/drawable/ic_popup_close.xml new file mode 100644 index 00000000..d1b52f82 --- /dev/null +++ b/presentation/mate/src/main/res/drawable/ic_popup_close.xml @@ -0,0 +1,16 @@ + + + + diff --git a/presentation/mate/src/main/res/drawable/ic_popup_close_pressed.xml b/presentation/mate/src/main/res/drawable/ic_popup_close_pressed.xml new file mode 100644 index 00000000..bcf30960 --- /dev/null +++ b/presentation/mate/src/main/res/drawable/ic_popup_close_pressed.xml @@ -0,0 +1,16 @@ + + + + diff --git a/presentation/mate/src/main/res/drawable/selector_popup_close.xml b/presentation/mate/src/main/res/drawable/selector_popup_close.xml new file mode 100644 index 00000000..d7ec5f81 --- /dev/null +++ b/presentation/mate/src/main/res/drawable/selector_popup_close.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/presentation/mate/src/main/res/values/strings.xml b/presentation/mate/src/main/res/values/strings.xml index c69c0c75..6aa6db1d 100644 --- a/presentation/mate/src/main/res/values/strings.xml +++ b/presentation/mate/src/main/res/values/strings.xml @@ -47,4 +47,7 @@ 이미지로 저장 스토리 공유 \@ZZAKSIM 을 태그해주시면 리포스팅 해드려요 + + + 최종 레벨 달성 From b4c60b76f7375fa30f3ee7afe9cdc24361f6e1d9 Mon Sep 17 00:00:00 2001 From: juhwankim-dev Date: Tue, 13 Dec 2022 00:36:52 +0900 Subject: [PATCH 2/3] =?UTF-8?q?ui:=20=EC=B5=9C=EC=A2=85=20=EB=A0=88?= =?UTF-8?q?=EB=B2=A8=20=EB=8B=AC=EC=84=B1=20=ED=8C=9D=EC=97=85=20=EA=B5=AC?= =?UTF-8?q?=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mate/popup/MaxLevelPopupDialogFragment.kt | 54 +++++++++++++++++++ .../fragment_max_level_popup_dialog.xml | 49 +++++++++++++++++ 2 files changed, 103 insertions(+) create mode 100644 presentation/mate/src/main/java/com/depromeet/threedays/mate/popup/MaxLevelPopupDialogFragment.kt create mode 100644 presentation/mate/src/main/res/layout/fragment_max_level_popup_dialog.xml diff --git a/presentation/mate/src/main/java/com/depromeet/threedays/mate/popup/MaxLevelPopupDialogFragment.kt b/presentation/mate/src/main/java/com/depromeet/threedays/mate/popup/MaxLevelPopupDialogFragment.kt new file mode 100644 index 00000000..8af723eb --- /dev/null +++ b/presentation/mate/src/main/java/com/depromeet/threedays/mate/popup/MaxLevelPopupDialogFragment.kt @@ -0,0 +1,54 @@ +package com.depromeet.threedays.mate.popup + +import android.graphics.Color +import android.graphics.drawable.ColorDrawable +import android.os.Bundle +import android.view.LayoutInflater +import android.view.View +import android.view.ViewGroup +import androidx.databinding.DataBindingUtil +import androidx.fragment.app.DialogFragment +import com.depromeet.threedays.core.setOnSingleClickListener +import com.depromeet.threedays.mate.R +import com.depromeet.threedays.mate.databinding.FragmentMaxLevelPopupDialogBinding + +class MaxLevelPopupDialogFragment : DialogFragment() { + private var _binding: FragmentMaxLevelPopupDialogBinding? = null + private val binding get() = _binding!! + + override fun onCreateView( + inflater: LayoutInflater, container: ViewGroup?, + savedInstanceState: Bundle? + ): View { + _binding = DataBindingUtil.inflate( + inflater, + R.layout.fragment_max_level_popup_dialog, + container, + false + ) + binding.lifecycleOwner = viewLifecycleOwner + + return binding.root + } + + override fun onViewCreated(view: View, savedInstanceState: Bundle?) { + super.onViewCreated(view, savedInstanceState) + + setLayout() + } + + private fun setLayout() { + dialog?.window?.run { + setBackgroundDrawable(ColorDrawable(Color.TRANSPARENT)) + setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT) + } + binding.ivClose.setOnSingleClickListener { + dismiss() + } + } + + override fun onDestroyView() { + super.onDestroyView() + _binding = null + } +} diff --git a/presentation/mate/src/main/res/layout/fragment_max_level_popup_dialog.xml b/presentation/mate/src/main/res/layout/fragment_max_level_popup_dialog.xml new file mode 100644 index 00000000..0e27c2f1 --- /dev/null +++ b/presentation/mate/src/main/res/layout/fragment_max_level_popup_dialog.xml @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + From 0a675eeb9d32b13913b619ac3e9337b174789dad Mon Sep 17 00:00:00 2001 From: juhwankim-dev Date: Tue, 13 Dec 2022 01:33:11 +0900 Subject: [PATCH 3/3] =?UTF-8?q?chore:=20mate=EC=97=90=20=EA=B5=AC=ED=98=84?= =?UTF-8?q?=ED=96=88=EB=8D=98=20=EB=8B=A4=EC=9D=B4=EC=96=BC=EB=A1=9C?= =?UTF-8?q?=EA=B7=B8=EB=A5=BC=20util=EB=A1=9C=20=EC=9D=B4=EB=8F=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/res/drawable/ic_popup_close.xml | 0 .../main/res/drawable/ic_popup_close_pressed.xml | 0 .../src/main/res/drawable/selector_popup_close.xml | 0 .../core/util/ThreeDaysNoButtonDialogFragment.kt | 14 ++++++++------ .../fragment_three_days_no_button_dialog.xml | 13 +++++++------ 5 files changed, 15 insertions(+), 12 deletions(-) rename {presentation/mate => core-design-system}/src/main/res/drawable/ic_popup_close.xml (100%) rename {presentation/mate => core-design-system}/src/main/res/drawable/ic_popup_close_pressed.xml (100%) rename {presentation/mate => core-design-system}/src/main/res/drawable/selector_popup_close.xml (100%) rename presentation/mate/src/main/java/com/depromeet/threedays/mate/popup/MaxLevelPopupDialogFragment.kt => core/src/main/java/com/depromeet/threedays/core/util/ThreeDaysNoButtonDialogFragment.kt (72%) rename presentation/mate/src/main/res/layout/fragment_max_level_popup_dialog.xml => core/src/main/res/layout/fragment_three_days_no_button_dialog.xml (81%) diff --git a/presentation/mate/src/main/res/drawable/ic_popup_close.xml b/core-design-system/src/main/res/drawable/ic_popup_close.xml similarity index 100% rename from presentation/mate/src/main/res/drawable/ic_popup_close.xml rename to core-design-system/src/main/res/drawable/ic_popup_close.xml diff --git a/presentation/mate/src/main/res/drawable/ic_popup_close_pressed.xml b/core-design-system/src/main/res/drawable/ic_popup_close_pressed.xml similarity index 100% rename from presentation/mate/src/main/res/drawable/ic_popup_close_pressed.xml rename to core-design-system/src/main/res/drawable/ic_popup_close_pressed.xml diff --git a/presentation/mate/src/main/res/drawable/selector_popup_close.xml b/core-design-system/src/main/res/drawable/selector_popup_close.xml similarity index 100% rename from presentation/mate/src/main/res/drawable/selector_popup_close.xml rename to core-design-system/src/main/res/drawable/selector_popup_close.xml diff --git a/presentation/mate/src/main/java/com/depromeet/threedays/mate/popup/MaxLevelPopupDialogFragment.kt b/core/src/main/java/com/depromeet/threedays/core/util/ThreeDaysNoButtonDialogFragment.kt similarity index 72% rename from presentation/mate/src/main/java/com/depromeet/threedays/mate/popup/MaxLevelPopupDialogFragment.kt rename to core/src/main/java/com/depromeet/threedays/core/util/ThreeDaysNoButtonDialogFragment.kt index 8af723eb..ddd46102 100644 --- a/presentation/mate/src/main/java/com/depromeet/threedays/mate/popup/MaxLevelPopupDialogFragment.kt +++ b/core/src/main/java/com/depromeet/threedays/core/util/ThreeDaysNoButtonDialogFragment.kt @@ -1,4 +1,4 @@ -package com.depromeet.threedays.mate.popup +package com.depromeet.threedays.core.util import android.graphics.Color import android.graphics.drawable.ColorDrawable @@ -8,12 +8,12 @@ import android.view.View import android.view.ViewGroup import androidx.databinding.DataBindingUtil import androidx.fragment.app.DialogFragment +import com.depromeet.threedays.core.R +import com.depromeet.threedays.core.databinding.FragmentThreeDaysNoButtonDialogBinding import com.depromeet.threedays.core.setOnSingleClickListener -import com.depromeet.threedays.mate.R -import com.depromeet.threedays.mate.databinding.FragmentMaxLevelPopupDialogBinding -class MaxLevelPopupDialogFragment : DialogFragment() { - private var _binding: FragmentMaxLevelPopupDialogBinding? = null +class ThreeDaysNoButtonDialogFragment(val resId: Int, val content: String) : DialogFragment() { + private var _binding: FragmentThreeDaysNoButtonDialogBinding? = null private val binding get() = _binding!! override fun onCreateView( @@ -22,7 +22,7 @@ class MaxLevelPopupDialogFragment : DialogFragment() { ): View { _binding = DataBindingUtil.inflate( inflater, - R.layout.fragment_max_level_popup_dialog, + R.layout.fragment_three_days_no_button_dialog, container, false ) @@ -42,6 +42,8 @@ class MaxLevelPopupDialogFragment : DialogFragment() { setBackgroundDrawable(ColorDrawable(Color.TRANSPARENT)) setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT) } + binding.ivIllustrator.setImageResource(resId) + binding.tvContent.text = content binding.ivClose.setOnSingleClickListener { dismiss() } diff --git a/presentation/mate/src/main/res/layout/fragment_max_level_popup_dialog.xml b/core/src/main/res/layout/fragment_three_days_no_button_dialog.xml similarity index 81% rename from presentation/mate/src/main/res/layout/fragment_max_level_popup_dialog.xml rename to core/src/main/res/layout/fragment_three_days_no_button_dialog.xml index 0e27c2f1..0f548f00 100644 --- a/presentation/mate/src/main/res/layout/fragment_max_level_popup_dialog.xml +++ b/core/src/main/res/layout/fragment_three_days_no_button_dialog.xml @@ -1,6 +1,7 @@ + xmlns:app="http://schemas.android.com/apk/res-auto" + xmlns:tools="http://schemas.android.com/tools"> @@ -21,11 +22,11 @@ app:layout_constraintTop_toTopOf="parent" /> + app:layout_constraintTop_toBottomOf="@+id/iv_illustrator" + tools:text="짝짝짝!\n박수를 받았어요"/>