From 70a1d159692779a4d76cef706fb9d37601f7520d Mon Sep 17 00:00:00 2001 From: emjayMJkim Date: Mon, 24 Jun 2024 19:41:05 +0900 Subject: [PATCH] =?UTF-8?q?#178=20[ui]=20=ED=85=8C=EB=A7=88=20=EC=84=A0?= =?UTF-8?q?=ED=83=9D=20=EB=B7=B0=20UI=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../themechoice/ChoiceThemeAdapter.kt | 4 +- .../themechoice/ChoiceThemeFragment.kt | 7 +- ...pe_gray200_fill_gray650_stroke_99_rect.xml | 8 ++ .../fragment_onboarding_choice_theme.xml | 3 + .../layout/item_onboarding_choice_theme.xml | 75 ++++++++++--------- 5 files changed, 55 insertions(+), 42 deletions(-) create mode 100644 app/src/main/res/drawable/shape_gray200_fill_gray650_stroke_99_rect.xml diff --git a/app/src/main/java/com/sopetit/softie/ui/onboarding/themechoice/ChoiceThemeAdapter.kt b/app/src/main/java/com/sopetit/softie/ui/onboarding/themechoice/ChoiceThemeAdapter.kt index 728185c3..ba798eaa 100644 --- a/app/src/main/java/com/sopetit/softie/ui/onboarding/themechoice/ChoiceThemeAdapter.kt +++ b/app/src/main/java/com/sopetit/softie/ui/onboarding/themechoice/ChoiceThemeAdapter.kt @@ -81,11 +81,11 @@ class ChoiceThemeAdapter : ) { when (selected) { true -> { - binding.ivThemeBackground.setBackgroundResource(R.drawable.shape_gray200_fill_gray500_stroke_100_circle) + binding.layoutThemeBackground.setBackgroundResource(R.drawable.shape_gray200_fill_gray650_stroke_99_rect) } false -> { - binding.ivThemeBackground.setBackgroundResource(R.drawable.shape_gray0_fill_gray200_stroke_100_circle) + binding.layoutThemeBackground.setBackgroundResource(R.drawable.shape_gray0_fill_gray200_stroke_99_rect) } } } diff --git a/app/src/main/java/com/sopetit/softie/ui/onboarding/themechoice/ChoiceThemeFragment.kt b/app/src/main/java/com/sopetit/softie/ui/onboarding/themechoice/ChoiceThemeFragment.kt index 492ed43e..4fdda4c5 100644 --- a/app/src/main/java/com/sopetit/softie/ui/onboarding/themechoice/ChoiceThemeFragment.kt +++ b/app/src/main/java/com/sopetit/softie/ui/onboarding/themechoice/ChoiceThemeFragment.kt @@ -4,7 +4,6 @@ import android.os.Bundle import android.view.View import androidx.fragment.app.viewModels import androidx.lifecycle.ViewModelProvider -import androidx.recyclerview.widget.GridLayoutManager import com.sopetit.softie.R import com.sopetit.softie.databinding.FragmentOnboardingChoiceThemeBinding import com.sopetit.softie.ui.onboarding.OnboardingActivity.Companion.MAXIMUM_THEME_SELECTION @@ -38,10 +37,8 @@ class ChoiceThemeFragment : private fun initMakeThemeAdapter() { _choiceThemeAdapter = ChoiceThemeAdapter() // themeViewModel.getThemeList() - binding.rvOnboardingChoiceTheme.apply { - layoutManager = GridLayoutManager(requireContext(), 3) - adapter = choiceThemeAdapter - } + + binding.rvOnboardingChoiceTheme.adapter = choiceThemeAdapter setThemeList() selectThemes() diff --git a/app/src/main/res/drawable/shape_gray200_fill_gray650_stroke_99_rect.xml b/app/src/main/res/drawable/shape_gray200_fill_gray650_stroke_99_rect.xml new file mode 100644 index 00000000..a474295c --- /dev/null +++ b/app/src/main/res/drawable/shape_gray200_fill_gray650_stroke_99_rect.xml @@ -0,0 +1,8 @@ + + + + + + + diff --git a/app/src/main/res/layout/fragment_onboarding_choice_theme.xml b/app/src/main/res/layout/fragment_onboarding_choice_theme.xml index 19febbb1..a3ebd3b8 100644 --- a/app/src/main/res/layout/fragment_onboarding_choice_theme.xml +++ b/app/src/main/res/layout/fragment_onboarding_choice_theme.xml @@ -29,6 +29,9 @@ android:layout_marginTop="34dp" android:layout_marginBottom="34dp" android:overScrollMode="never" + app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" + android:orientation="vertical" + android:foregroundGravity="center" app:layout_constraintBottom_toTopOf="@id/btn_onboarding_choice_theme" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" diff --git a/app/src/main/res/layout/item_onboarding_choice_theme.xml b/app/src/main/res/layout/item_onboarding_choice_theme.xml index ff715078..c94584c2 100644 --- a/app/src/main/res/layout/item_onboarding_choice_theme.xml +++ b/app/src/main/res/layout/item_onboarding_choice_theme.xml @@ -1,6 +1,7 @@ + xmlns:app="http://schemas.android.com/apk/res-auto" + xmlns:tools="http://schemas.android.com/tools"> @@ -11,42 +12,46 @@ - - - - - - + + + android:background="@drawable/shape_gray0_fill_gray200_stroke_99_rect" + android:layout_marginVertical="4dp" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintEnd_toEndOf="parent"> + + + + + +