From d59fa2a4600436d1eaec1d93ba2cd6b5bfa12826 Mon Sep 17 00:00:00 2001 From: DOGDDUDDY Date: Sun, 24 Sep 2023 20:56:59 +0900 Subject: [PATCH 01/21] =?UTF-8?q?[fix/mypage=5Fdesign]:=20JMT-249=20Alert?= =?UTF-8?q?=20Contet=20=EC=A4=84=EA=B0=84=EA=B2=A9=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/org/gdsc/presentation/view/custom/JmtAlert.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/presentation/src/main/java/org/gdsc/presentation/view/custom/JmtAlert.kt b/presentation/src/main/java/org/gdsc/presentation/view/custom/JmtAlert.kt index 54a8ebb1..978248c0 100644 --- a/presentation/src/main/java/org/gdsc/presentation/view/custom/JmtAlert.kt +++ b/presentation/src/main/java/org/gdsc/presentation/view/custom/JmtAlert.kt @@ -67,6 +67,7 @@ class JmtAlert(private val context: Context) { TextView(context).apply { gravity = Gravity.CENTER text = content + setLineSpacing(0f, 1.2f) }.let { binding.dialogContentLay.removeAllViewsInLayout() binding.dialogContentLay.isVisible = true From c7420745ff4ea23926c06d99594a174b66215072 Mon Sep 17 00:00:00 2001 From: DOGDDUDDY Date: Sun, 24 Sep 2023 21:01:01 +0900 Subject: [PATCH 02/21] =?UTF-8?q?[fix/mypage=5Fdesign]:=20JMT-251=20?= =?UTF-8?q?=EB=B2=84=ED=8A=BC=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Outline border 두께 수정 - 버튼 Height 고정 대신 상하 Padding 으로 대체 - 버튼 그림자 제거 --- .../java/org/gdsc/presentation/view/custom/JmtAlert.kt | 8 ++++++-- .../res/drawable/jmt_button_outline_background_main.xml | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/presentation/src/main/java/org/gdsc/presentation/view/custom/JmtAlert.kt b/presentation/src/main/java/org/gdsc/presentation/view/custom/JmtAlert.kt index 978248c0..5e523353 100644 --- a/presentation/src/main/java/org/gdsc/presentation/view/custom/JmtAlert.kt +++ b/presentation/src/main/java/org/gdsc/presentation/view/custom/JmtAlert.kt @@ -110,9 +110,11 @@ class JmtAlert(private val context: Context) { fun leftButton(text: String, _fillType: Int = FILL_FILL, autoDismiss: Boolean = true, onClick: (View) -> Unit = {}) { leftButton = AppCompatButton(context).apply { this.text = text + this.textSize = 14f this.layoutParams = LinearLayout.LayoutParams(0, LinearLayout.LayoutParams.WRAP_CONTENT, 1f).apply { - height = 48.toDp + setPadding(10, 16, 10, 16) } + this.stateListAnimator = null this.background = when(_fillType) { FILL_FILL -> ContextCompat.getDrawable(context, R.drawable.jmt_button_background_main) FILL_OUTLINE -> ContextCompat.getDrawable(context, R.drawable.jmt_button_outline_background_main) @@ -133,10 +135,12 @@ class JmtAlert(private val context: Context) { fun rightButton(text: String, _fillType: Int = FILL_FILL, autoDismiss: Boolean = true, onClick: (View) -> Unit = {}) { rightButton = AppCompatButton(context).apply { this.text = text + this.textSize = 14f this.layoutParams = LinearLayout.LayoutParams(0, LinearLayout.LayoutParams.WRAP_CONTENT, 1f).apply { leftMargin = 12.toDp - height = 48.toDp + setPadding(10, 16, 10, 16) } + this.stateListAnimator = null this.background = when(_fillType) { FILL_FILL -> ContextCompat.getDrawable(context, R.drawable.jmt_button_background_main) FILL_OUTLINE -> ContextCompat.getDrawable(context, R.drawable.jmt_button_outline_background_main) diff --git a/presentation/src/main/res/drawable/jmt_button_outline_background_main.xml b/presentation/src/main/res/drawable/jmt_button_outline_background_main.xml index ad0d6dac..c36b318f 100644 --- a/presentation/src/main/res/drawable/jmt_button_outline_background_main.xml +++ b/presentation/src/main/res/drawable/jmt_button_outline_background_main.xml @@ -12,7 +12,7 @@ + android:width="1dp"/> From 03d515f8f0054add5d2e17aa9be0d03977f9fc8e Mon Sep 17 00:00:00 2001 From: DOGDDUDDY Date: Sun, 24 Sep 2023 21:23:21 +0900 Subject: [PATCH 03/21] =?UTF-8?q?[fix/mypage=5Fdesign]:=20JMT-248=20?= =?UTF-8?q?=ED=88=B4=EB=B0=94=20=EB=B3=B4=EB=8D=94=20=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/layout/fragment_settings.xml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/presentation/src/main/res/layout/fragment_settings.xml b/presentation/src/main/res/layout/fragment_settings.xml index 5eca4a50..e1e6f179 100644 --- a/presentation/src/main/res/layout/fragment_settings.xml +++ b/presentation/src/main/res/layout/fragment_settings.xml @@ -195,6 +195,9 @@ tools:visibility="visible"/> - - + \ No newline at end of file From 1e77a9b940a78386a501bf32939d79e426639a37 Mon Sep 17 00:00:00 2001 From: DOGDDUDDY Date: Sun, 24 Sep 2023 21:25:36 +0900 Subject: [PATCH 04/21] =?UTF-8?q?[fix/mypage=5Fdesign]:=20JMT-247=20?= =?UTF-8?q?=EA=B3=84=EC=A0=95=20=EA=B4=80=EB=A6=AC=20divider=20=EB=91=90?= =?UTF-8?q?=EA=BB=98=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/res/layout/fragment_account_management.xml | 4 ++-- presentation/src/main/res/values/dimens.xml | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/presentation/src/main/res/layout/fragment_account_management.xml b/presentation/src/main/res/layout/fragment_account_management.xml index 757224ab..57d5836d 100644 --- a/presentation/src/main/res/layout/fragment_account_management.xml +++ b/presentation/src/main/res/layout/fragment_account_management.xml @@ -21,7 +21,7 @@ @@ -62,7 +62,7 @@ diff --git a/presentation/src/main/res/values/dimens.xml b/presentation/src/main/res/values/dimens.xml index 0b16f633..83d7e2ab 100644 --- a/presentation/src/main/res/values/dimens.xml +++ b/presentation/src/main/res/values/dimens.xml @@ -1,6 +1,7 @@ 1dp + 2dp 8dp 20dp From a7c7991a942d5ebd4075ca58ab000ed1f5aed758 Mon Sep 17 00:00:00 2001 From: DOGDDUDDY Date: Sun, 24 Sep 2023 21:26:16 +0900 Subject: [PATCH 05/21] =?UTF-8?q?[fix/mypage=5Fdesign]:=20JMT-246=20?= =?UTF-8?q?=ED=9A=8C=EC=9B=90=ED=83=88=ED=87=B4=20=EC=84=A4=EB=AA=85=20?= =?UTF-8?q?=EB=AC=B8=EA=B5=AC=20=EC=88=A8=EA=B9=80=EC=B2=98=EB=A6=AC=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- presentation/src/main/res/layout/fragment_account_management.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/presentation/src/main/res/layout/fragment_account_management.xml b/presentation/src/main/res/layout/fragment_account_management.xml index 57d5836d..a28afc4c 100644 --- a/presentation/src/main/res/layout/fragment_account_management.xml +++ b/presentation/src/main/res/layout/fragment_account_management.xml @@ -52,7 +52,6 @@ android:layout_marginTop="2dp" android:text="계정을 영구적으로 삭제합니다." android:textColor="@color/grey300" - android:visibility="gone" app:layout_constraintStart_toStartOf="@+id/tv_sign_out" app:layout_constraintTop_toBottomOf="@+id/tv_sign_out" tools:visibility="visible"/> From 53a82908f75b4fd9f755966ac98efc011cc12991 Mon Sep 17 00:00:00 2001 From: DOGDDUDDY Date: Sun, 24 Sep 2023 21:54:23 +0900 Subject: [PATCH 06/21] =?UTF-8?q?[fix/mypage=5Fdesign]:=20JMT-242=20?= =?UTF-8?q?=EC=82=AC=EC=9A=A9=EC=9E=90=20=EC=9D=B4=EB=A6=84=20=EC=88=98?= =?UTF-8?q?=EC=A0=95=20=EB=B2=84=ED=8A=BC=20=EB=AC=B8=EA=B5=AC=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- presentation/src/main/res/layout/fragment_edit_user_name.xml | 2 +- presentation/src/main/res/values/strings.xml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/presentation/src/main/res/layout/fragment_edit_user_name.xml b/presentation/src/main/res/layout/fragment_edit_user_name.xml index ca7da3bd..3f8e3440 100644 --- a/presentation/src/main/res/layout/fragment_edit_user_name.xml +++ b/presentation/src/main/res/layout/fragment_edit_user_name.xml @@ -67,7 +67,7 @@ app:layout_constraintBottom_toBottomOf="parent"> 확인 다음 + 변경하기 전체 From 4bb1f8c1ae3db9caeb123f18295de6012635b07a Mon Sep 17 00:00:00 2001 From: DOGDDUDDY Date: Sun, 24 Sep 2023 21:59:48 +0900 Subject: [PATCH 07/21] =?UTF-8?q?[fix/mypage=5Fdesign]:=20JMT-239=20?= =?UTF-8?q?=EC=A0=95=EB=B3=B4=20=EC=88=98=EC=A0=95=20=ED=8E=98=EC=9D=B4?= =?UTF-8?q?=EC=A7=80=20=EB=84=A4=EB=B9=84=EB=B0=94=20=EB=85=B8=EC=B6=9C=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/org/gdsc/presentation/view/MainActivity.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/presentation/src/main/java/org/gdsc/presentation/view/MainActivity.kt b/presentation/src/main/java/org/gdsc/presentation/view/MainActivity.kt index 9c58bd9f..4478dea9 100644 --- a/presentation/src/main/java/org/gdsc/presentation/view/MainActivity.kt +++ b/presentation/src/main/java/org/gdsc/presentation/view/MainActivity.kt @@ -69,7 +69,7 @@ class MainActivity : BaseActivity() { navController.addOnDestinationChangedListener { controller, destination, arguments -> // bottomNavigationView Control - if (destination.id == R.id.home_fragment || destination.id == R.id.my_page_fragment) + if (destination.id == R.id.home_fragment || destination.id == R.id.my_page_fragment || destination.id == R.id.settings_fragment) slideUpBottomNavigationView() else slideDownBottomNavigationView() From 9350d0509ad6fd125e3f5afc9038abd99d5ff48e Mon Sep 17 00:00:00 2001 From: DOGDDUDDY Date: Sun, 24 Sep 2023 22:20:34 +0900 Subject: [PATCH 08/21] =?UTF-8?q?[fix/mypage=5Fdesign]:=20SnackBar=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 볼드체 제거 - 화면에 유동적으로 반영되도록 크기 고정 수정 --- presentation/src/main/res/layout/jmt_snackbar.xml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/presentation/src/main/res/layout/jmt_snackbar.xml b/presentation/src/main/res/layout/jmt_snackbar.xml index 52651738..c323a850 100644 --- a/presentation/src/main/res/layout/jmt_snackbar.xml +++ b/presentation/src/main/res/layout/jmt_snackbar.xml @@ -3,10 +3,11 @@ android:id="@+id/snackbar_container" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" - android:layout_width="335dp" - android:layout_height="56dp" + android:layout_width="match_parent" + android:layout_height="wrap_content" android:layout_gravity="center" - android:elevation="2dp" + android:layout_marginHorizontal="@dimen/default_spacing" + app:cardElevation="2dp" android:layout_marginBottom="1dp" app:cardCornerRadius="8dp"> @@ -16,8 +17,9 @@ android:layout_height="wrap_content" android:layout_gravity="center" android:drawablePadding="10dp" + android:layout_marginVertical="@dimen/layout_margin_spacing" android:gravity="center_vertical|center_horizontal" - android:textAppearance="@style/text_large_bold" + android:textAppearance="@style/text_large_medium" android:textColor="@color/main600" tools:text="회원가입이 완료되었어요!"/> From 5e85f9e76080fac44527a957af7c368dafc99149 Mon Sep 17 00:00:00 2001 From: DOGDDUDDY Date: Mon, 25 Sep 2023 13:59:14 +0900 Subject: [PATCH 09/21] =?UTF-8?q?[fix/mypage=5Fdesign]:=20JMT-240=20?= =?UTF-8?q?=EB=B2=84=EC=A0=84=20=EC=A0=95=EB=B3=B4=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../presentation/view/mypage/SettingsFragment.kt | 7 +++++++ .../src/main/res/layout/fragment_settings.xml | 12 ++++++------ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/presentation/src/main/java/org/gdsc/presentation/view/mypage/SettingsFragment.kt b/presentation/src/main/java/org/gdsc/presentation/view/mypage/SettingsFragment.kt index dd2e2c7c..07e6891d 100644 --- a/presentation/src/main/java/org/gdsc/presentation/view/mypage/SettingsFragment.kt +++ b/presentation/src/main/java/org/gdsc/presentation/view/mypage/SettingsFragment.kt @@ -13,6 +13,7 @@ import androidx.fragment.app.viewModels import androidx.navigation.fragment.findNavController import com.bumptech.glide.Glide import com.google.android.material.snackbar.Snackbar +import com.naver.maps.map.BuildConfig import dagger.hilt.android.AndroidEntryPoint import okhttp3.MediaType import okhttp3.MultipartBody @@ -64,6 +65,7 @@ class SettingsFragment: BaseFragment() { initUserInfo() setToolbarTitle() observeState() + initVersion() binding.profileImageButton.setOnClickListener { BottomSheetDialog(requireContext()) @@ -101,6 +103,11 @@ class SettingsFragment: BaseFragment() { } } + // 업데이트는 플레이스토어에 출시 이후에 추가해주기 + private fun initVersion() { + binding.tvVersionInfo.text = BuildConfig.VERSION_NAME + " v" + } + private fun initUserInfo() { repeatWhenUiStarted { viewModel.getUserInfo() diff --git a/presentation/src/main/res/layout/fragment_settings.xml b/presentation/src/main/res/layout/fragment_settings.xml index e1e6f179..2f0910fb 100644 --- a/presentation/src/main/res/layout/fragment_settings.xml +++ b/presentation/src/main/res/layout/fragment_settings.xml @@ -160,7 +160,7 @@ app:layout_constraintTop_toBottomOf="@+id/privacyPolicyDivider"> From 482aef81f06251ba21970b306dcc9c9011a37bbb Mon Sep 17 00:00:00 2001 From: DOGDDUDDY Date: Mon, 25 Sep 2023 14:04:43 +0900 Subject: [PATCH 10/21] =?UTF-8?q?[fix/mypage=5Fdesign]:=20JMT-235=20?= =?UTF-8?q?=EB=A7=88=EC=9D=B4=ED=8E=98=EC=9D=B4=EC=A7=80=20=EC=84=B8?= =?UTF-8?q?=ED=8C=85=20=EB=B2=84=ED=8A=BC=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- presentation/src/main/res/layout/fragment_my_page.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/presentation/src/main/res/layout/fragment_my_page.xml b/presentation/src/main/res/layout/fragment_my_page.xml index d699fd61..1d340e3f 100644 --- a/presentation/src/main/res/layout/fragment_my_page.xml +++ b/presentation/src/main/res/layout/fragment_my_page.xml @@ -40,10 +40,10 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/more_icon" - app:layout_constraintStart_toEndOf="@id/nick_name" - app:layout_constraintTop_toTopOf="@id/nick_name" + android:layout_marginStart="@dimen/layout_margin_spacing" app:layout_constraintBottom_toBottomOf="@id/nick_name" - /> + app:layout_constraintStart_toEndOf="@id/nick_name" + app:layout_constraintTop_toTopOf="@id/nick_name" /> Date: Mon, 25 Sep 2023 14:08:07 +0900 Subject: [PATCH 11/21] =?UTF-8?q?[fix/mypage=5Fdesign]:=20JMT-234=20?= =?UTF-8?q?=ED=83=AD=EB=B0=94=20=EB=A6=AC=ED=94=8C=20=ED=9A=A8=EA=B3=BC=20?= =?UTF-8?q?=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- presentation/src/main/res/layout/fragment_my_page.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/presentation/src/main/res/layout/fragment_my_page.xml b/presentation/src/main/res/layout/fragment_my_page.xml index 1d340e3f..cada8b0c 100644 --- a/presentation/src/main/res/layout/fragment_my_page.xml +++ b/presentation/src/main/res/layout/fragment_my_page.xml @@ -90,6 +90,7 @@ app:tabTextColor="@color/grey300" app:tabIndicatorColor="@color/grey900" app:tabSelectedTextColor="@color/grey900" + app:tabRippleColor="@null" app:tabTextAppearance="@style/text_medium_bold"/> From 8a50a467dc3671d6c78761ba0a21a2e962260102 Mon Sep 17 00:00:00 2001 From: DOGDDUDDY Date: Mon, 25 Sep 2023 14:49:21 +0900 Subject: [PATCH 12/21] =?UTF-8?q?[fix/mypage=5Fdesign]:=20JMT-232=20?= =?UTF-8?q?=EB=A7=88=EC=9D=B4=ED=8E=98=EC=9D=B4=EC=A7=80=20=ED=83=AD=20?= =?UTF-8?q?=EC=96=B8=EB=8D=94=EB=9D=BC=EC=9D=B8=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/tab_underline.xml | 15 +++++++++++++++ .../src/main/res/layout/fragment_my_page.xml | 1 + 2 files changed, 16 insertions(+) create mode 100644 presentation/src/main/res/drawable/tab_underline.xml diff --git a/presentation/src/main/res/drawable/tab_underline.xml b/presentation/src/main/res/drawable/tab_underline.xml new file mode 100644 index 00000000..3c0ad0d1 --- /dev/null +++ b/presentation/src/main/res/drawable/tab_underline.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/presentation/src/main/res/layout/fragment_my_page.xml b/presentation/src/main/res/layout/fragment_my_page.xml index cada8b0c..a6a4c3ee 100644 --- a/presentation/src/main/res/layout/fragment_my_page.xml +++ b/presentation/src/main/res/layout/fragment_my_page.xml @@ -90,6 +90,7 @@ app:tabTextColor="@color/grey300" app:tabIndicatorColor="@color/grey900" app:tabSelectedTextColor="@color/grey900" + app:tabBackground="@drawable/tab_underline" app:tabRippleColor="@null" app:tabTextAppearance="@style/text_medium_bold"/> From 8ca9bb2a0fea027fb91509039645dadad362b77e Mon Sep 17 00:00:00 2001 From: DOGDDUDDY Date: Mon, 25 Sep 2023 14:52:27 +0900 Subject: [PATCH 13/21] =?UTF-8?q?[fix/mypage=5Fdesign]:=20JMT-243=20?= =?UTF-8?q?=EC=9E=85=EB=A0=A5=20=EC=88=98=20=EC=A0=9C=ED=95=9C=20=ED=92=80?= =?UTF-8?q?=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- presentation/src/main/res/layout/fragment_edit_user_name.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/presentation/src/main/res/layout/fragment_edit_user_name.xml b/presentation/src/main/res/layout/fragment_edit_user_name.xml index 3f8e3440..ed7b14d3 100644 --- a/presentation/src/main/res/layout/fragment_edit_user_name.xml +++ b/presentation/src/main/res/layout/fragment_edit_user_name.xml @@ -25,7 +25,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginHorizontal="20dp" - android:maxLength="10" + android:lines="1" android:backgroundTint="@color/grey400" android:drawableRight="@drawable/ic_cancel" app:layout_constraintTop_toBottomOf="@+id/ask_nickname_text"/> From eee65bf566dffca8a33171759b75143e20ee3f8d Mon Sep 17 00:00:00 2001 From: DOGDDUDDY Date: Mon, 25 Sep 2023 15:11:35 +0900 Subject: [PATCH 14/21] =?UTF-8?q?[fix/mypage=5Fdesign]:=20JMT-233=20?= =?UTF-8?q?=EB=93=B1=EB=A1=9D=ED=95=9C=20=EB=A7=9B=EC=A7=91=20=ED=95=84?= =?UTF-8?q?=ED=84=B0=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/org/gdsc/data/datasource/RestaurantDataSourceImpl.kt | 1 - domain/src/main/java/org/gdsc/domain/FoodCategory.kt | 2 +- domain/src/main/java/org/gdsc/domain/SortType.kt | 3 +-- .../view/mypage/viewmodel/LikedRestaurantViewModel.kt | 2 +- .../gdsc/presentation/view/mypage/viewmodel/MyPageViewModel.kt | 2 +- 5 files changed, 4 insertions(+), 6 deletions(-) diff --git a/data/src/main/java/org/gdsc/data/datasource/RestaurantDataSourceImpl.kt b/data/src/main/java/org/gdsc/data/datasource/RestaurantDataSourceImpl.kt index eef0e377..580cc6f8 100644 --- a/data/src/main/java/org/gdsc/data/datasource/RestaurantDataSourceImpl.kt +++ b/data/src/main/java/org/gdsc/data/datasource/RestaurantDataSourceImpl.kt @@ -127,7 +127,6 @@ class RestaurantDataSourceImpl @Inject constructor( ) { with(db.restaurantDao()) { when (sortType) { - SortType.INIT -> getRegisteredRestaurants(userId, categoryFilter, isCanDrinkLiquor) SortType.DISTANCE -> getRegisteredRestaurantsSortedDistance(userId, categoryFilter, isCanDrinkLiquor) SortType.RECENCY -> getRegisteredRestaurantsSortedRecent(userId, categoryFilter, isCanDrinkLiquor) SortType.LIKED -> getRegisteredRestaurants(userId, categoryFilter, isCanDrinkLiquor) diff --git a/domain/src/main/java/org/gdsc/domain/FoodCategory.kt b/domain/src/main/java/org/gdsc/domain/FoodCategory.kt index 0af8b1a7..3aa13971 100644 --- a/domain/src/main/java/org/gdsc/domain/FoodCategory.kt +++ b/domain/src/main/java/org/gdsc/domain/FoodCategory.kt @@ -8,7 +8,7 @@ enum class FoodCategory(val id: Long, val text: String, val key:String) { CAFE(5L, "카페", "CAFE"), BAR(6L, "주점", "BAR"), ETC(7L, "기타", "ETC"), - INIT(-1L, "(필수) 어떤 종류의 식당인가요?", ""); + INIT(-1L, "종류", ""); companion object { fun getAllText(): List { diff --git a/domain/src/main/java/org/gdsc/domain/SortType.kt b/domain/src/main/java/org/gdsc/domain/SortType.kt index f79dd579..dac6f5d6 100644 --- a/domain/src/main/java/org/gdsc/domain/SortType.kt +++ b/domain/src/main/java/org/gdsc/domain/SortType.kt @@ -3,8 +3,7 @@ package org.gdsc.domain enum class SortType(val text: String) { DISTANCE("가까운 순"), LIKED("좋아요 순"), - RECENCY("최신 순"), - INIT("정렬"); + RECENCY("최신 순"); companion object { diff --git a/presentation/src/main/java/org/gdsc/presentation/view/mypage/viewmodel/LikedRestaurantViewModel.kt b/presentation/src/main/java/org/gdsc/presentation/view/mypage/viewmodel/LikedRestaurantViewModel.kt index 8b73d7e8..f9736ef1 100644 --- a/presentation/src/main/java/org/gdsc/presentation/view/mypage/viewmodel/LikedRestaurantViewModel.kt +++ b/presentation/src/main/java/org/gdsc/presentation/view/mypage/viewmodel/LikedRestaurantViewModel.kt @@ -13,7 +13,7 @@ import javax.inject.Inject class LikedRestaurantViewModel @Inject constructor() : ViewModel() { - private var _sortTypeState = MutableStateFlow(SortType.INIT) + private var _sortTypeState = MutableStateFlow(SortType.DISTANCE) val sortTypeState: StateFlow get() = _sortTypeState diff --git a/presentation/src/main/java/org/gdsc/presentation/view/mypage/viewmodel/MyPageViewModel.kt b/presentation/src/main/java/org/gdsc/presentation/view/mypage/viewmodel/MyPageViewModel.kt index c29c6bf0..f9286182 100644 --- a/presentation/src/main/java/org/gdsc/presentation/view/mypage/viewmodel/MyPageViewModel.kt +++ b/presentation/src/main/java/org/gdsc/presentation/view/mypage/viewmodel/MyPageViewModel.kt @@ -76,7 +76,7 @@ class MyPageViewModel @Inject constructor( - private var _sortTypeState = MutableStateFlow(SortType.INIT) + private var _sortTypeState = MutableStateFlow(SortType.DISTANCE) val sortTypeState: StateFlow get() = _sortTypeState From aed39efc12a8bc66eeb7e8f6b67147279815b85b Mon Sep 17 00:00:00 2001 From: DOGDDUDDY Date: Tue, 26 Sep 2023 14:46:05 +0900 Subject: [PATCH 15/21] =?UTF-8?q?[fix/confirm=5Frestaurant=5Fdesign]:=20JM?= =?UTF-8?q?T-236=20=EC=A2=8B=EC=95=84=ED=95=9C=20=EB=A7=9B=EC=A7=91=20?= =?UTF-8?q?=EC=88=A8=EA=B9=80=20=EC=B2=98=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../view/mypage/LikedRestaurantFragment.kt | 2 + .../res/layout/fragment_liked_restaurant.xml | 110 +++++++++++------- 2 files changed, 68 insertions(+), 44 deletions(-) diff --git a/presentation/src/main/java/org/gdsc/presentation/view/mypage/LikedRestaurantFragment.kt b/presentation/src/main/java/org/gdsc/presentation/view/mypage/LikedRestaurantFragment.kt index 5747ee47..fc7af1c4 100644 --- a/presentation/src/main/java/org/gdsc/presentation/view/mypage/LikedRestaurantFragment.kt +++ b/presentation/src/main/java/org/gdsc/presentation/view/mypage/LikedRestaurantFragment.kt @@ -5,6 +5,7 @@ import androidx.fragment.app.Fragment import android.view.LayoutInflater import android.view.View import android.view.ViewGroup +import androidx.core.view.isVisible import androidx.fragment.app.viewModels import androidx.lifecycle.lifecycleScope import dagger.hilt.android.AndroidEntryPoint @@ -38,6 +39,7 @@ class LikedRestaurantFragment : Fragment() { observeState() setSpinners() + binding.notYetLayout.root.isVisible = true } private fun setSpinners() { diff --git a/presentation/src/main/res/layout/fragment_liked_restaurant.xml b/presentation/src/main/res/layout/fragment_liked_restaurant.xml index c9aa149f..dcee9d3d 100644 --- a/presentation/src/main/res/layout/fragment_liked_restaurant.xml +++ b/presentation/src/main/res/layout/fragment_liked_restaurant.xml @@ -1,56 +1,78 @@ - - + android:layout_height="wrap_content" + android:stateListAnimator="@null" + android:visibility="gone" + app:layout_constraintTop_toTopOf="parent"> - - - - - - - - + android:background="@color/white" + app:layout_scrollFlags="scroll|enterAlways"> + + + + + + + + + + + + + + + + + - + - \ No newline at end of file + \ No newline at end of file From 60df438f959c76a96e100c54ed69452b411697a4 Mon Sep 17 00:00:00 2001 From: DOGDDUDDY Date: Tue, 26 Sep 2023 15:39:22 +0900 Subject: [PATCH 16/21] =?UTF-8?q?[fix/mypage=5Fdesign]:=20XML=20=EB=AF=B8?= =?UTF-8?q?=EB=A6=AC=EB=B3=B4=EA=B8=B0=20=EC=95=88=20=EB=90=98=EB=8A=94=20?= =?UTF-8?q?=EB=AC=B8=EC=A0=9C=20=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- presentation/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/presentation/build.gradle b/presentation/build.gradle index 5d6b0bd5..df6f8358 100644 --- a/presentation/build.gradle +++ b/presentation/build.gradle @@ -105,7 +105,7 @@ dependencies { implementation 'androidx.core:core-ktx:1.9.0' implementation 'androidx.appcompat:appcompat:1.6.1' - implementation 'com.google.android.material:material:1.8.0' + implementation 'com.google.android.material:material:1.9.0' implementation 'androidx.constraintlayout:constraintlayout:2.1.4' testImplementation 'junit:junit:4.13.2' androidTestImplementation 'androidx.test.ext:junit:1.1.5' From 1cb4c79163dc15cf8bc5807c3e23d0f8c40705f3 Mon Sep 17 00:00:00 2001 From: DOGDDUDDY Date: Wed, 27 Sep 2023 15:39:15 +0900 Subject: [PATCH 17/21] =?UTF-8?q?[fix/confirm=5Frestaurant=5Fdesign]:=20JM?= =?UTF-8?q?T-244=20EditText=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - x 버튼 Clear 동작 - EditText 밑줄 start에 맞추기 (padding 들어간것 처럼 width 보다 조금 작게 나왔었음) => ClassicEditText 라는 커스텀뷰 만들었슴다. 기본 동작은 TextInputEditText에 기반하고, 밑줄 그리는 draw와 Clear 버튼만 추가 되었습니다. --- .../view/custom/ClassicEditText.kt | 101 ++++++++++++++++++ .../res/layout/fragment_edit_user_name.xml | 14 ++- presentation/src/main/res/values/dimens.xml | 2 + 3 files changed, 109 insertions(+), 8 deletions(-) create mode 100644 presentation/src/main/java/org/gdsc/presentation/view/custom/ClassicEditText.kt diff --git a/presentation/src/main/java/org/gdsc/presentation/view/custom/ClassicEditText.kt b/presentation/src/main/java/org/gdsc/presentation/view/custom/ClassicEditText.kt new file mode 100644 index 00000000..72a7959d --- /dev/null +++ b/presentation/src/main/java/org/gdsc/presentation/view/custom/ClassicEditText.kt @@ -0,0 +1,101 @@ +package org.gdsc.presentation.view.custom + +import android.content.Context +import android.graphics.Canvas +import android.graphics.Paint +import android.graphics.Rect +import android.graphics.drawable.Drawable +import android.text.Editable +import android.text.InputType.TYPE_CLASS_TEXT +import android.text.TextWatcher +import android.util.AttributeSet +import android.util.Log +import android.view.MotionEvent +import android.widget.EditText +import androidx.core.content.ContextCompat +import androidx.core.graphics.drawable.DrawableCompat +import com.google.android.material.textfield.TextInputEditText +import org.gdsc.presentation.R + +class ClassicEditText(context: Context, attrs: AttributeSet) : TextInputEditText(context, attrs) { + private val underlinePaint = Paint() + private var clearIcon: Drawable? = null + private var showClearIcon = false + + init { + inputType = TYPE_CLASS_TEXT + setLines(1) + + underlinePaint.color = ContextCompat.getColor(context, R.color.grey400) + underlinePaint.strokeWidth = 4f + + minHeight = height + + // EditText 기본 배경 지우기 + background = null + setPadding(0, paddingTop, paddingRight, paddingBottom) + + // Clear 아이콘 초기화 + val drawable = ContextCompat.getDrawable(context, R.drawable.ic_cancel) + clearIcon = DrawableCompat.wrap(drawable!!) + clearIcon!!.setBounds(0, 0, clearIcon!!.intrinsicWidth, clearIcon!!.intrinsicHeight) + val padding = resources.getDimensionPixelSize(R.dimen.drawable_icon_spacing) + setCompoundDrawablePadding(padding) + + // Clear 아이콘 보이기/숨기기 설정 + addTextChangedListener(object : TextWatcher { + override fun beforeTextChanged(s: CharSequence?, start: Int, count: Int, after: Int) {} + + override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) { + setClearIconVisible(s?.isNotEmpty() == true) + } + + override fun afterTextChanged(s: Editable?) {} + }) + } + + private fun setClearIconVisible(visible: Boolean) { + showClearIcon = visible + setCompoundDrawablesWithIntrinsicBounds( + null, + null, + if (visible) clearIcon else null, + null + ) + } + + override fun onDraw(canvas: Canvas) { + super.onDraw(canvas) + + val startY = height + val scrollX = scrollX + + canvas.drawLine( + scrollX.toFloat(), + startY.toFloat() - paddingBottom, + (scrollX + width).toFloat(), + startY.toFloat() - paddingBottom, + underlinePaint + ) + } + + override fun onFocusChanged(focused: Boolean, direction: Int, previouslyFocusedRect: Rect?) { + super.onFocusChanged(focused, direction, previouslyFocusedRect) + + // 포커스가 없을 때 Clear 아이콘 숨기기 + if (!focused) { + setClearIconVisible(false) + } + } + + override fun onTouchEvent(event: MotionEvent): Boolean { + // Clear 아이콘 클릭 이벤트 + if (event.action == MotionEvent.ACTION_DOWN) { + if (showClearIcon && event.x >= width - paddingRight - clearIcon!!.intrinsicWidth) { + setText("") + return true + } + } + return super.onTouchEvent(event) + } +} diff --git a/presentation/src/main/res/layout/fragment_edit_user_name.xml b/presentation/src/main/res/layout/fragment_edit_user_name.xml index ed7b14d3..2805337b 100644 --- a/presentation/src/main/res/layout/fragment_edit_user_name.xml +++ b/presentation/src/main/res/layout/fragment_edit_user_name.xml @@ -19,15 +19,12 @@ android:layout_height="wrap_content" app:layout_constraintTop_toTopOf="parent"/> - + diff --git a/presentation/src/main/res/values/dimens.xml b/presentation/src/main/res/values/dimens.xml index 83d7e2ab..d552d6f0 100644 --- a/presentation/src/main/res/values/dimens.xml +++ b/presentation/src/main/res/values/dimens.xml @@ -10,6 +10,8 @@ 12dp 16dp + 4dp + 32dp 36dp 335dp From d8004210609c5ed281ac3fd57f556c528fd025de Mon Sep 17 00:00:00 2001 From: DOGDDUDDY Date: Wed, 27 Sep 2023 16:55:03 +0900 Subject: [PATCH 18/21] =?UTF-8?q?[fix/mypage=5Fdesign]:=20JMT-243=20?= =?UTF-8?q?=EC=9E=85=EB=A0=A5=20=EC=88=98=20=EC=A0=9C=ED=95=9C=20=EB=A1=A4?= =?UTF-8?q?=EB=B0=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 정책상 10자 제한이 맞다고 합니다. --- presentation/src/main/res/layout/fragment_edit_user_name.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/presentation/src/main/res/layout/fragment_edit_user_name.xml b/presentation/src/main/res/layout/fragment_edit_user_name.xml index 2805337b..2ae6912f 100644 --- a/presentation/src/main/res/layout/fragment_edit_user_name.xml +++ b/presentation/src/main/res/layout/fragment_edit_user_name.xml @@ -25,6 +25,7 @@ android:layout_height="wrap_content" style="@style/text_large_medium" android:layout_marginHorizontal="@dimen/default_spacing" + android:maxLength="10" app:layout_constraintTop_toBottomOf="@+id/ask_nickname_text"/> Date: Thu, 28 Sep 2023 02:58:47 +0900 Subject: [PATCH 19/21] =?UTF-8?q?[fix/mypage=5Fdesign]:=20JMT-233=20?= =?UTF-8?q?=EB=93=B1=EB=A1=9D=ED=95=9C=20=EB=A7=9B=EC=A7=91=20=ED=95=84?= =?UTF-8?q?=ED=84=B0=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- domain/src/main/java/org/gdsc/domain/FoodCategory.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/domain/src/main/java/org/gdsc/domain/FoodCategory.kt b/domain/src/main/java/org/gdsc/domain/FoodCategory.kt index 2b795afe..1ec2598d 100644 --- a/domain/src/main/java/org/gdsc/domain/FoodCategory.kt +++ b/domain/src/main/java/org/gdsc/domain/FoodCategory.kt @@ -9,7 +9,7 @@ enum class FoodCategory(val id: Long, val text: String, val key:String) { CAFE(6L, "카페", "CAFE"), BAR(7L, "주점", "BAR"), ETC(8L, "기타", "ETC"), - INIT(-1L, "(필수) 어떤 종류의 식당인가요?", ""); + INIT(-1L, "종류", ""); companion object { fun getAllText(): List { From 0b856ab01791307d72e04c6925d7b99c633a9b1d Mon Sep 17 00:00:00 2001 From: DOGDDUDDY Date: Thu, 28 Sep 2023 02:59:14 +0900 Subject: [PATCH 20/21] =?UTF-8?q?[fix/mypage=5Fdesign]:=20JMT-251=20?= =?UTF-8?q?=EB=B2=84=ED=8A=BC=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/org/gdsc/presentation/view/custom/JmtAlert.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/presentation/src/main/java/org/gdsc/presentation/view/custom/JmtAlert.kt b/presentation/src/main/java/org/gdsc/presentation/view/custom/JmtAlert.kt index 52ba1d8c..2079de57 100644 --- a/presentation/src/main/java/org/gdsc/presentation/view/custom/JmtAlert.kt +++ b/presentation/src/main/java/org/gdsc/presentation/view/custom/JmtAlert.kt @@ -126,6 +126,7 @@ class JmtAlert(private val context: Context) { ) { leftButton = AppCompatButton(context).apply { this.text = text + this.stateListAnimator = null this.layoutParams = LinearLayout.LayoutParams(0, LinearLayout.LayoutParams.WRAP_CONTENT, 1f).apply { height = 48.toDp From d32a38e2cecc72d40417241098a05a92bf8b29b2 Mon Sep 17 00:00:00 2001 From: DOGDDUDDY Date: Thu, 28 Sep 2023 03:23:12 +0900 Subject: [PATCH 21/21] =?UTF-8?q?[fix/mypage=5Fdesign]:=20JMT-252=20Empty?= =?UTF-8?q?=20=EB=A0=88=EC=9D=B4=EC=95=84=EC=9B=83=20=ED=91=9C=EC=8B=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mypage/RegisteredRestaurantFragment.kt | 6 ++-- .../layout/fragment_registered_restaurant.xml | 33 +++++++++++++++++-- presentation/src/main/res/values/strings.xml | 1 + 3 files changed, 34 insertions(+), 6 deletions(-) diff --git a/presentation/src/main/java/org/gdsc/presentation/view/mypage/RegisteredRestaurantFragment.kt b/presentation/src/main/java/org/gdsc/presentation/view/mypage/RegisteredRestaurantFragment.kt index e7ff619a..e6192167 100644 --- a/presentation/src/main/java/org/gdsc/presentation/view/mypage/RegisteredRestaurantFragment.kt +++ b/presentation/src/main/java/org/gdsc/presentation/view/mypage/RegisteredRestaurantFragment.kt @@ -52,13 +52,13 @@ class RegisteredRestaurantFragment : Fragment() { myRestaurantAdapter.addLoadStateListener { combinedLoadStates -> if (combinedLoadStates.append.endOfPaginationReached) { - binding.notYetLayout.root.isVisible = myRestaurantAdapter.itemCount == 0 + binding.emptyLayout.isVisible = myRestaurantAdapter.itemCount == 0 } else { - binding.notYetLayout.root.isVisible = false + binding.emptyLayout.isVisible = false } if(combinedLoadStates.refresh is LoadState.Error) { - binding.notYetLayout.root.isVisible = true + binding.emptyLayout.isVisible = true } } diff --git a/presentation/src/main/res/layout/fragment_registered_restaurant.xml b/presentation/src/main/res/layout/fragment_registered_restaurant.xml index 3d8ed176..554af6c2 100644 --- a/presentation/src/main/res/layout/fragment_registered_restaurant.xml +++ b/presentation/src/main/res/layout/fragment_registered_restaurant.xml @@ -77,8 +77,35 @@ android:nestedScrollingEnabled="true" app:layout_behavior="@string/appbar_scrolling_view_behavior"/> - + + + + + + \ No newline at end of file diff --git a/presentation/src/main/res/values/strings.xml b/presentation/src/main/res/values/strings.xml index ec120c74..279343ed 100644 --- a/presentation/src/main/res/values/strings.xml +++ b/presentation/src/main/res/values/strings.xml @@ -71,6 +71,7 @@ 앗, 서비스 준비 중이에요!\n   조금만 기다려주세요. + 등록한 맛집이 없어요 존마탱 캐릭터 이미지 추천 해주고 싶은\n 맛집을 검색해주세요! 검색 결과가 없어요.\n올바른 식당명인지 확인해주세요.