From f56a93d634249d3bf51d87b3233687fa7a7c5473 Mon Sep 17 00:00:00 2001 From: JIEUNI Date: Sat, 6 Jan 2024 01:48:44 +0900 Subject: [PATCH 01/13] =?UTF-8?q?[feat]=20#22=20=EC=B9=B4=ED=85=8C?= =?UTF-8?q?=EA=B3=A0=EB=A6=AC=20=EC=9E=AC=EC=82=AC=EC=9A=A9=20=EB=B7=B0=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 --- .../res/layout/view_plan_category_type.xml | 63 +++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 app/src/main/res/layout/view_plan_category_type.xml diff --git a/app/src/main/res/layout/view_plan_category_type.xml b/app/src/main/res/layout/view_plan_category_type.xml new file mode 100644 index 00000000..5b7e3ee2 --- /dev/null +++ b/app/src/main/res/layout/view_plan_category_type.xml @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file From 3d03f1f01362cfdda5be2cf972303cf15c18bf56 Mon Sep 17 00:00:00 2001 From: JIEUNI Date: Sat, 6 Jan 2024 01:49:16 +0900 Subject: [PATCH 02/13] =?UTF-8?q?[add]=20#22=20string=20=EB=A6=AC=EC=86=8C?= =?UTF-8?q?=EC=8A=A4=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/res/values/strings.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index fbf8e8ca..668a8195 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -24,4 +24,7 @@ 단체 입장\n완료! %s에서 핑글 여정을 함께해보세요! + + + 개최할 핑글을\n선택해주세요 \ No newline at end of file From 16fe3060268013bf17dc2cb667fbc535b3484dfb Mon Sep 17 00:00:00 2001 From: JIEUNI Date: Sat, 6 Jan 2024 02:40:18 +0900 Subject: [PATCH 03/13] =?UTF-8?q?[chore]=20#22=20PlanActivity=20fragmentLi?= =?UTF-8?q?st=EC=97=90=20=EC=B9=B4=ED=85=8C=EA=B3=A0=EB=A6=AC=20=EC=84=A0?= =?UTF-8?q?=ED=83=9D=20=ED=94=84=EB=9E=98=EA=B7=B8=EB=A8=BC=ED=8A=B8=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/ui/main/plan/PlanActivity.kt | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/org/sopt/pingle/presentation/ui/main/plan/PlanActivity.kt b/app/src/main/java/org/sopt/pingle/presentation/ui/main/plan/PlanActivity.kt index d8fe71b3..641e55dc 100644 --- a/app/src/main/java/org/sopt/pingle/presentation/ui/main/plan/PlanActivity.kt +++ b/app/src/main/java/org/sopt/pingle/presentation/ui/main/plan/PlanActivity.kt @@ -27,6 +27,7 @@ class PlanActivity : BindingActivity(R.layout.activity_plan // TODO 차후에 나머지 개최 프로세스 fragment 추가 fragmentList = ArrayList() fragmentList.apply { + add(PlanCategoryFragment()) add(PlanTitleFragment()) add(PlanDateTimeFragment()) add(PlanOpenChattingFragment()) @@ -37,12 +38,12 @@ class PlanActivity : BindingActivity(R.layout.activity_plan this.adapter = adapter isUserInputEnabled = false registerOnPageChangeCallback(object : - ViewPager2.OnPageChangeCallback() { - override fun onPageSelected(position: Int) { - super.onPageSelected(position) - planViewModel.setCurrentPage(position) - } - }) + ViewPager2.OnPageChangeCallback() { + override fun onPageSelected(position: Int) { + super.onPageSelected(position) + planViewModel.setCurrentPage(position) + } + }) } } From 85672f37bcba3f6c965dc556f1a49118cdd3824f Mon Sep 17 00:00:00 2001 From: JIEUNI Date: Sat, 6 Jan 2024 02:53:05 +0900 Subject: [PATCH 04/13] =?UTF-8?q?[feat]=20#22=20BindingAdapter=20:=20textC?= =?UTF-8?q?olor=20=EC=BB=A4=EC=8A=A4=ED=84=B0=EB=A7=88=EC=9D=B4=EC=A7=95?= =?UTF-8?q?=20=ED=95=A8=EC=88=98=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/org/sopt/pingle/util/base/BindingAdapter.kt | 7 +++++++ app/src/main/res/layout/view_plan_category_type.xml | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/org/sopt/pingle/util/base/BindingAdapter.kt b/app/src/main/java/org/sopt/pingle/util/base/BindingAdapter.kt index 1ee2e426..e2a26dc7 100644 --- a/app/src/main/java/org/sopt/pingle/util/base/BindingAdapter.kt +++ b/app/src/main/java/org/sopt/pingle/util/base/BindingAdapter.kt @@ -1,6 +1,7 @@ package org.sopt.pingle.util.base import android.widget.ImageView +import android.widget.TextView import androidx.core.content.ContextCompat import androidx.databinding.BindingAdapter @@ -9,3 +10,9 @@ fun setImageResource(imageView: ImageView, resId: Int) { val drawable = ContextCompat.getDrawable(imageView.context, resId) imageView.setImageDrawable(drawable) } + +@BindingAdapter("color") +fun setTextColor(textView: TextView, resId: Int) { + val colorRes = ContextCompat.getColor(textView.context, resId) + textView.setTextColor(colorRes) +} diff --git a/app/src/main/res/layout/view_plan_category_type.xml b/app/src/main/res/layout/view_plan_category_type.xml index 5b7e3ee2..f702e16d 100644 --- a/app/src/main/res/layout/view_plan_category_type.xml +++ b/app/src/main/res/layout/view_plan_category_type.xml @@ -39,7 +39,7 @@ android:text="@{category.categoryNameRes}" tools:text="PLAY" android:textAppearance="@style/TextAppearance.Pingle.Title.Semi.20" - android:textColor="@{category.textColor}" + color="@{category.textColor}" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" /> From f75dfa1ee004fea5c8a167d9a4bde56c4abc139a Mon Sep 17 00:00:00 2001 From: JIEUNI Date: Sat, 6 Jan 2024 02:53:47 +0900 Subject: [PATCH 05/13] =?UTF-8?q?[feat]=20#22=20=EC=B9=B4=ED=85=8C?= =?UTF-8?q?=EA=B3=A0=EB=A6=AC=20=EC=84=A0=ED=83=9D=20=EB=B7=B0=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 --- .../ui/main/plan/PlanCategoryFragment.kt | 19 ++++ .../res/layout/fragment_plan_category.xml | 87 +++++++++++++++++++ 2 files changed, 106 insertions(+) create mode 100644 app/src/main/java/org/sopt/pingle/presentation/ui/main/plan/PlanCategoryFragment.kt create mode 100644 app/src/main/res/layout/fragment_plan_category.xml diff --git a/app/src/main/java/org/sopt/pingle/presentation/ui/main/plan/PlanCategoryFragment.kt b/app/src/main/java/org/sopt/pingle/presentation/ui/main/plan/PlanCategoryFragment.kt new file mode 100644 index 00000000..1f287811 --- /dev/null +++ b/app/src/main/java/org/sopt/pingle/presentation/ui/main/plan/PlanCategoryFragment.kt @@ -0,0 +1,19 @@ +package org.sopt.pingle.presentation.ui.main.plan + +import android.os.Bundle +import android.view.View +import org.sopt.pingle.R +import org.sopt.pingle.databinding.FragmentPlanCategoryBinding +import org.sopt.pingle.util.base.BindingFragment + +class PlanCategoryFragment : + BindingFragment(R.layout.fragment_plan_category) { + // TODO 뷰모델 추가 private val planViewModel by viewModels() + override fun onViewCreated(view: View, savedInstanceState: Bundle?) { + super.onViewCreated(view, savedInstanceState) + initLayout() + } + + private fun initLayout() { + } +} diff --git a/app/src/main/res/layout/fragment_plan_category.xml b/app/src/main/res/layout/fragment_plan_category.xml new file mode 100644 index 00000000..d1ef5842 --- /dev/null +++ b/app/src/main/res/layout/fragment_plan_category.xml @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file From 4b7a99732492e1ef7fafff29249910a57d6f23f8 Mon Sep 17 00:00:00 2001 From: JIEUNI Date: Sun, 7 Jan 2024 21:54:27 +0900 Subject: [PATCH 06/13] =?UTF-8?q?[add]=20#22=20=EC=B9=B4=ED=85=8C=EA=B3=A0?= =?UTF-8?q?=EB=A6=AC=20=ED=81=B4=EB=A6=AD/=ED=95=B4=EC=A0=9C=20=EC=8B=9C?= =?UTF-8?q?=20stroke=20background=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/res/drawable/background_abled_category.xml | 9 +++++++++ .../main/res/drawable/background_disabled_category.xml | 6 ++++++ 2 files changed, 15 insertions(+) create mode 100644 app/src/main/res/drawable/background_abled_category.xml create mode 100644 app/src/main/res/drawable/background_disabled_category.xml diff --git a/app/src/main/res/drawable/background_abled_category.xml b/app/src/main/res/drawable/background_abled_category.xml new file mode 100644 index 00000000..bd5ef24b --- /dev/null +++ b/app/src/main/res/drawable/background_abled_category.xml @@ -0,0 +1,9 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/background_disabled_category.xml b/app/src/main/res/drawable/background_disabled_category.xml new file mode 100644 index 00000000..36565d8e --- /dev/null +++ b/app/src/main/res/drawable/background_disabled_category.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file From dbf68053f2c9ffbf3291f8041892b6e76d1d0a3a Mon Sep 17 00:00:00 2001 From: JIEUNI Date: Sun, 7 Jan 2024 22:13:00 +0900 Subject: [PATCH 07/13] =?UTF-8?q?[add]=20#22=20=EC=B9=B4=ED=85=8C=EA=B3=A0?= =?UTF-8?q?=EB=A6=AC=20=ED=81=B4=EB=A6=AD/=ED=95=B4=EC=A0=9C=20=EC=8B=9C?= =?UTF-8?q?=20stroke=20background=20selector=20=EC=B6=94=EA=B0=80=20?= =?UTF-8?q?=EB=B0=8F=20stroke=20background=20=EB=A6=AC=EB=84=A4=EC=9D=B4?= =?UTF-8?q?=EB=B0=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...egory.xml => background_abled_plan_location_category.xml} | 0 ...ry.xml => background_disabled_plan_location_category.xml} | 0 .../res/drawable/selector_item_plan_location_category.xml | 5 +++++ 3 files changed, 5 insertions(+) rename app/src/main/res/drawable/{background_abled_category.xml => background_abled_plan_location_category.xml} (100%) rename app/src/main/res/drawable/{background_disabled_category.xml => background_disabled_plan_location_category.xml} (100%) create mode 100644 app/src/main/res/drawable/selector_item_plan_location_category.xml diff --git a/app/src/main/res/drawable/background_abled_category.xml b/app/src/main/res/drawable/background_abled_plan_location_category.xml similarity index 100% rename from app/src/main/res/drawable/background_abled_category.xml rename to app/src/main/res/drawable/background_abled_plan_location_category.xml diff --git a/app/src/main/res/drawable/background_disabled_category.xml b/app/src/main/res/drawable/background_disabled_plan_location_category.xml similarity index 100% rename from app/src/main/res/drawable/background_disabled_category.xml rename to app/src/main/res/drawable/background_disabled_plan_location_category.xml diff --git a/app/src/main/res/drawable/selector_item_plan_location_category.xml b/app/src/main/res/drawable/selector_item_plan_location_category.xml new file mode 100644 index 00000000..c99045ea --- /dev/null +++ b/app/src/main/res/drawable/selector_item_plan_location_category.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file From 0a576d0dbeac697a9749a6a34046aa360971956f Mon Sep 17 00:00:00 2001 From: JIEUNI Date: Sun, 7 Jan 2024 23:41:35 +0900 Subject: [PATCH 08/13] =?UTF-8?q?[chore]=20#22=20=EB=A8=B8=EC=A7=80=20?= =?UTF-8?q?=ED=9B=84=20=EB=A6=AC=EC=86=8C=EC=8A=A4=20color=20=EC=98=A4?= =?UTF-8?q?=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 --- .../res/drawable/background_disabled_plan_location_category.xml | 2 +- ...tegory.xml => background_enabled_plan_location_category.xml} | 2 +- .../main/res/drawable/selector_item_plan_location_category.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) rename app/src/main/res/drawable/{background_abled_plan_location_category.xml => background_enabled_plan_location_category.xml} (86%) diff --git a/app/src/main/res/drawable/background_disabled_plan_location_category.xml b/app/src/main/res/drawable/background_disabled_plan_location_category.xml index 36565d8e..d09bf503 100644 --- a/app/src/main/res/drawable/background_disabled_plan_location_category.xml +++ b/app/src/main/res/drawable/background_disabled_plan_location_category.xml @@ -1,6 +1,6 @@ - + \ No newline at end of file diff --git a/app/src/main/res/drawable/background_abled_plan_location_category.xml b/app/src/main/res/drawable/background_enabled_plan_location_category.xml similarity index 86% rename from app/src/main/res/drawable/background_abled_plan_location_category.xml rename to app/src/main/res/drawable/background_enabled_plan_location_category.xml index bd5ef24b..0867e829 100644 --- a/app/src/main/res/drawable/background_abled_plan_location_category.xml +++ b/app/src/main/res/drawable/background_enabled_plan_location_category.xml @@ -1,7 +1,7 @@ - + diff --git a/app/src/main/res/drawable/selector_item_plan_location_category.xml b/app/src/main/res/drawable/selector_item_plan_location_category.xml index c99045ea..90445a7b 100644 --- a/app/src/main/res/drawable/selector_item_plan_location_category.xml +++ b/app/src/main/res/drawable/selector_item_plan_location_category.xml @@ -1,5 +1,5 @@ - + \ No newline at end of file From abba367335fe0c4e2307f612f9142776cbb36a0a Mon Sep 17 00:00:00 2001 From: JIEUNI Date: Mon, 8 Jan 2024 00:45:03 +0900 Subject: [PATCH 09/13] =?UTF-8?q?[feat]=20#22=20BindingAdapter=20Select?= =?UTF-8?q?=EC=97=AC=EB=B6=80=20=EC=A0=80=EC=9E=A5=20=EB=A9=94=EC=86=8C?= =?UTF-8?q?=EB=93=9C=20=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/org/sopt/pingle/util/base/BindingAdapter.kt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/src/main/java/org/sopt/pingle/util/base/BindingAdapter.kt b/app/src/main/java/org/sopt/pingle/util/base/BindingAdapter.kt index e2a26dc7..31440169 100644 --- a/app/src/main/java/org/sopt/pingle/util/base/BindingAdapter.kt +++ b/app/src/main/java/org/sopt/pingle/util/base/BindingAdapter.kt @@ -1,5 +1,6 @@ package org.sopt.pingle.util.base +import android.view.View import android.widget.ImageView import android.widget.TextView import androidx.core.content.ContextCompat @@ -16,3 +17,8 @@ fun setTextColor(textView: TextView, resId: Int) { val colorRes = ContextCompat.getColor(textView.context, resId) textView.setTextColor(colorRes) } + +@BindingAdapter("selection") +fun setSelected(view: View, isSelected: Boolean) { + view.isSelected = isSelected +} From 7bdc447375d337e434c9388fd0a191978e5e46aa Mon Sep 17 00:00:00 2001 From: JIEUNI Date: Mon, 8 Jan 2024 00:51:08 +0900 Subject: [PATCH 10/13] =?UTF-8?q?[feat]=20#22=20=EC=B9=B4=ED=85=8C?= =?UTF-8?q?=EA=B3=A0=EB=A6=AC=20=ED=83=80=EC=9E=85=20=EB=8B=A8=EC=9D=BC?= =?UTF-8?q?=EC=84=A0=ED=83=9D=20=EB=A1=9C=EC=A7=81=20=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ui/main/plan/PlanCategoryFragment.kt | 21 +++++++++- .../ui/main/plan/PlanViewModel.kt | 10 +++++ .../res/layout/fragment_plan_category.xml | 21 ++++++++-- .../res/layout/view_plan_category_type.xml | 39 ++++++++++--------- 4 files changed, 67 insertions(+), 24 deletions(-) diff --git a/app/src/main/java/org/sopt/pingle/presentation/ui/main/plan/PlanCategoryFragment.kt b/app/src/main/java/org/sopt/pingle/presentation/ui/main/plan/PlanCategoryFragment.kt index 1f287811..f9208c0b 100644 --- a/app/src/main/java/org/sopt/pingle/presentation/ui/main/plan/PlanCategoryFragment.kt +++ b/app/src/main/java/org/sopt/pingle/presentation/ui/main/plan/PlanCategoryFragment.kt @@ -2,18 +2,37 @@ package org.sopt.pingle.presentation.ui.main.plan import android.os.Bundle import android.view.View +import androidx.fragment.app.viewModels import org.sopt.pingle.R import org.sopt.pingle.databinding.FragmentPlanCategoryBinding import org.sopt.pingle.util.base.BindingFragment class PlanCategoryFragment : BindingFragment(R.layout.fragment_plan_category) { - // TODO 뷰모델 추가 private val planViewModel by viewModels() + private val planViewModel by viewModels() override fun onViewCreated(view: View, savedInstanceState: Bundle?) { super.onViewCreated(view, savedInstanceState) + + binding.planViewModel = planViewModel + binding.lifecycleOwner = this + initLayout() + addListeners() } private fun initLayout() { } + + private fun addListeners() { + with(binding) { + includePlanCategoryTypePlay.root.setOnClickListener { + } + includePlanCategoryTypeStudy.root.setOnClickListener { + } + includePlanCategoryTypeMulti.root.setOnClickListener { + } + includePlanCategoryTypeOthers.root.setOnClickListener { + } + } + } } diff --git a/app/src/main/java/org/sopt/pingle/presentation/ui/main/plan/PlanViewModel.kt b/app/src/main/java/org/sopt/pingle/presentation/ui/main/plan/PlanViewModel.kt index 3425402d..132d986b 100644 --- a/app/src/main/java/org/sopt/pingle/presentation/ui/main/plan/PlanViewModel.kt +++ b/app/src/main/java/org/sopt/pingle/presentation/ui/main/plan/PlanViewModel.kt @@ -8,6 +8,7 @@ import kotlinx.coroutines.flow.StateFlow import kotlinx.coroutines.flow.asStateFlow import kotlinx.coroutines.flow.combine import kotlinx.coroutines.flow.stateIn +import org.sopt.pingle.presentation.type.CategoryType import org.sopt.pingle.presentation.type.PlanType class PlanViewModel : ViewModel() { @@ -32,6 +33,15 @@ class PlanViewModel : ViewModel() { (currentPage == 2 && planOpenChattingLink.isNotBlank()) }.stateIn(viewModelScope, SharingStarted.WhileSubscribed(), false) + + // TODO 뷰 연결 시 버튼 활성/비활성화 로직 isPlanBtnEnabled에 추가 + private val _selectedCategory = MutableStateFlow(null) + val selectedCategory get() = _selectedCategory.asStateFlow() + + fun setSelectedCategory(categoryType: CategoryType) { + _selectedCategory.value = categoryType + } + fun setCurrentPage(position: Int) { _currentPage.value = position } diff --git a/app/src/main/res/layout/fragment_plan_category.xml b/app/src/main/res/layout/fragment_plan_category.xml index d1ef5842..0bda598b 100644 --- a/app/src/main/res/layout/fragment_plan_category.xml +++ b/app/src/main/res/layout/fragment_plan_category.xml @@ -4,7 +4,11 @@ xmlns:tools="http://schemas.android.com/tools"> + + @@ -40,7 +44,9 @@ layout="@layout/view_plan_category_type" android:layout_width="wrap_content" android:layout_height="0dp" - app:category="@{planCategory.PLAY}" + selection="@{planViewModel.selectedCategory == planCategory.PLAY}" + android:onClick="@{()->planViewModel.setSelectedCategory(planCategory.PLAY)}" + app:categoryType="@{planCategory.PLAY}" app:layout_constraintStart_toStartOf="parent" /> @@ -68,7 +77,9 @@ layout="@layout/view_plan_category_type" android:layout_width="wrap_content" android:layout_height="0dp" - app:category="@{planCategory.MULTI}" + selection="@{planViewModel.selectedCategory == planCategory.MULTI}" + android:onClick="@{()->planViewModel.setSelectedCategory(planCategory.MULTI)}" + app:categoryType="@{planCategory.MULTI}" app:layout_constraintStart_toStartOf="parent" /> diff --git a/app/src/main/res/layout/view_plan_category_type.xml b/app/src/main/res/layout/view_plan_category_type.xml index f702e16d..b0cbac3f 100644 --- a/app/src/main/res/layout/view_plan_category_type.xml +++ b/app/src/main/res/layout/view_plan_category_type.xml @@ -5,25 +5,27 @@ + + - + android:background="@drawable/selector_item_plan_location_category"> - + + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@id/iv_plan_category_type" + tools:text="PLAY" /> - + + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@id/tv_plan_category_name" + tools:text="설명 텍스트 미정" /> \ No newline at end of file From 5b1856b1e1aea5b2adb3aee01b66bd2c5b65f9fe Mon Sep 17 00:00:00 2001 From: JIEUNI Date: Mon, 8 Jan 2024 00:58:32 +0900 Subject: [PATCH 11/13] =?UTF-8?q?[add]=20#22=20=EC=B9=B4=ED=85=8C=EA=B3=A0?= =?UTF-8?q?=EB=A6=AC=20=ED=83=80=EC=9E=85=20UX=EB=9D=BC=EC=9D=B4=ED=8C=85?= =?UTF-8?q?=20=EB=A6=AC=EC=86=8C=EC=8A=A4=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pingle/presentation/type/CategoryType.kt | 16 ++++++++++------ app/src/main/res/values/strings.xml | 4 ++++ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/org/sopt/pingle/presentation/type/CategoryType.kt b/app/src/main/java/org/sopt/pingle/presentation/type/CategoryType.kt index d9f38b0b..249bc08d 100644 --- a/app/src/main/java/org/sopt/pingle/presentation/type/CategoryType.kt +++ b/app/src/main/java/org/sopt/pingle/presentation/type/CategoryType.kt @@ -9,9 +9,9 @@ enum class CategoryType( @ColorRes val activatedOutLinedColor: Int, @ColorRes val backgroundChipColor: Int, @ColorRes val backgroundBadgeColor: Int, - @StringRes val categoryNameRes: Int + @StringRes val categoryNameRes: Int, + @StringRes val categoryDescriptionRes: Int, // TODO 해당 부분은 UX, icon 정해지면 추가하기 - // @StringRes val categoryDescriptionRes: Int, // @DrawableRes val categoryIconRes: Int, ) { PLAY( @@ -19,28 +19,32 @@ enum class CategoryType( activatedOutLinedColor = R.color.pingle_green, backgroundChipColor = R.color.chip_green, backgroundBadgeColor = R.color.badge_green, - categoryNameRes = R.string.category_play + categoryNameRes = R.string.category_play, + categoryDescriptionRes = R.string.category_play_detail, ), STUDY( textColor = R.color.pingle_orange, activatedOutLinedColor = R.color.pingle_orange, backgroundChipColor = R.color.chip_orange, backgroundBadgeColor = R.color.badge_orange, - categoryNameRes = R.string.category_study + categoryNameRes = R.string.category_study, + categoryDescriptionRes = R.string.category_study_detail, ), MULTI( textColor = R.color.pingle_yellow, activatedOutLinedColor = R.color.pingle_yellow, backgroundChipColor = R.color.chip_yellow, backgroundBadgeColor = R.color.badge_yellow, - categoryNameRes = R.string.category_multi + categoryNameRes = R.string.category_multi, + categoryDescriptionRes = R.string.category_multi_detail, ), OTHERS( textColor = R.color.g_01, activatedOutLinedColor = R.color.g_01, backgroundChipColor = R.color.g_10, backgroundBadgeColor = R.color.g_07, - categoryNameRes = R.string.category_others + categoryNameRes = R.string.category_others, + categoryDescriptionRes = R.string.category_others_detail, ); companion object { diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index c37cf25d..e40d5149 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -6,6 +6,10 @@ STUDY MULTI OTHERS + 노는게 제일 좋아! + 열공, 열작업 할 사람 모여라! + 놀 땐 놀고, 일할 땐 일하자! + 다른 활동이 하고 싶다면? From 831a93528cdf6cd53f346f91b9302c6dc2089471 Mon Sep 17 00:00:00 2001 From: JIEUNI Date: Mon, 8 Jan 2024 00:58:55 +0900 Subject: [PATCH 12/13] =?UTF-8?q?[chore]=20#22=20=EC=B9=B4=ED=85=8C?= =?UTF-8?q?=EA=B3=A0=EB=A6=AC=20=ED=83=80=EC=9E=85=20=EC=84=A4=EB=AA=85=20?= =?UTF-8?q?=EB=8D=B0=EC=9D=B4=ED=84=B0=EB=B0=94=EC=9D=B8=EB=94=A9=20?= =?UTF-8?q?=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/res/layout/view_plan_category_type.xml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/src/main/res/layout/view_plan_category_type.xml b/app/src/main/res/layout/view_plan_category_type.xml index b0cbac3f..9faa35c8 100644 --- a/app/src/main/res/layout/view_plan_category_type.xml +++ b/app/src/main/res/layout/view_plan_category_type.xml @@ -4,12 +4,15 @@ xmlns:tools="http://schemas.android.com/tools"> + + + @@ -45,14 +48,13 @@ app:layout_constraintTop_toBottomOf="@id/iv_plan_category_type" tools:text="PLAY" /> - - Date: Mon, 8 Jan 2024 01:27:42 +0900 Subject: [PATCH 13/13] =?UTF-8?q?[chore]=20#22=20ktlint=20=EC=A0=81?= =?UTF-8?q?=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sopt/pingle/presentation/type/CategoryType.kt | 10 +++++----- .../pingle/presentation/ui/main/plan/PlanActivity.kt | 12 ++++++------ .../presentation/ui/main/plan/PlanViewModel.kt | 1 - 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/app/src/main/java/org/sopt/pingle/presentation/type/CategoryType.kt b/app/src/main/java/org/sopt/pingle/presentation/type/CategoryType.kt index 249bc08d..4ad2c848 100644 --- a/app/src/main/java/org/sopt/pingle/presentation/type/CategoryType.kt +++ b/app/src/main/java/org/sopt/pingle/presentation/type/CategoryType.kt @@ -10,7 +10,7 @@ enum class CategoryType( @ColorRes val backgroundChipColor: Int, @ColorRes val backgroundBadgeColor: Int, @StringRes val categoryNameRes: Int, - @StringRes val categoryDescriptionRes: Int, + @StringRes val categoryDescriptionRes: Int // TODO 해당 부분은 UX, icon 정해지면 추가하기 // @DrawableRes val categoryIconRes: Int, ) { @@ -20,7 +20,7 @@ enum class CategoryType( backgroundChipColor = R.color.chip_green, backgroundBadgeColor = R.color.badge_green, categoryNameRes = R.string.category_play, - categoryDescriptionRes = R.string.category_play_detail, + categoryDescriptionRes = R.string.category_play_detail ), STUDY( textColor = R.color.pingle_orange, @@ -28,7 +28,7 @@ enum class CategoryType( backgroundChipColor = R.color.chip_orange, backgroundBadgeColor = R.color.badge_orange, categoryNameRes = R.string.category_study, - categoryDescriptionRes = R.string.category_study_detail, + categoryDescriptionRes = R.string.category_study_detail ), MULTI( textColor = R.color.pingle_yellow, @@ -36,7 +36,7 @@ enum class CategoryType( backgroundChipColor = R.color.chip_yellow, backgroundBadgeColor = R.color.badge_yellow, categoryNameRes = R.string.category_multi, - categoryDescriptionRes = R.string.category_multi_detail, + categoryDescriptionRes = R.string.category_multi_detail ), OTHERS( textColor = R.color.g_01, @@ -44,7 +44,7 @@ enum class CategoryType( backgroundChipColor = R.color.g_10, backgroundBadgeColor = R.color.g_07, categoryNameRes = R.string.category_others, - categoryDescriptionRes = R.string.category_others_detail, + categoryDescriptionRes = R.string.category_others_detail ); companion object { diff --git a/app/src/main/java/org/sopt/pingle/presentation/ui/main/plan/PlanActivity.kt b/app/src/main/java/org/sopt/pingle/presentation/ui/main/plan/PlanActivity.kt index 95017a64..995f5d9c 100644 --- a/app/src/main/java/org/sopt/pingle/presentation/ui/main/plan/PlanActivity.kt +++ b/app/src/main/java/org/sopt/pingle/presentation/ui/main/plan/PlanActivity.kt @@ -41,12 +41,12 @@ class PlanActivity : BindingActivity(R.layout.activity_plan this.adapter = adapter isUserInputEnabled = false registerOnPageChangeCallback(object : - ViewPager2.OnPageChangeCallback() { - override fun onPageSelected(position: Int) { - super.onPageSelected(position) - planViewModel.setCurrentPage(position) - } - }) + ViewPager2.OnPageChangeCallback() { + override fun onPageSelected(position: Int) { + super.onPageSelected(position) + planViewModel.setCurrentPage(position) + } + }) } } diff --git a/app/src/main/java/org/sopt/pingle/presentation/ui/main/plan/PlanViewModel.kt b/app/src/main/java/org/sopt/pingle/presentation/ui/main/plan/PlanViewModel.kt index 40b05e6c..c7140c70 100644 --- a/app/src/main/java/org/sopt/pingle/presentation/ui/main/plan/PlanViewModel.kt +++ b/app/src/main/java/org/sopt/pingle/presentation/ui/main/plan/PlanViewModel.kt @@ -45,7 +45,6 @@ class PlanViewModel : ViewModel() { private val _address = MutableStateFlow(null) val address get() = _address.asStateFlow() - // TODO 뷰 연결 시 버튼 활성/비활성화 로직 isPlanBtnEnabled에 추가 private val _selectedCategory = MutableStateFlow(null) val selectedCategory get() = _selectedCategory.asStateFlow()