From ef4688adabac09bdb656bd619ee7ac38a1363c28 Mon Sep 17 00:00:00 2001 From: crownjoe Date: Wed, 10 Jan 2024 05:10:47 +0900 Subject: [PATCH] =?UTF-8?q?[FEAT/#50]=20profile=20UI=20=EA=B8=B0=EB=8A=A5?= =?UTF-8?q?=20=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/going/domain/entity/ProfileMock.kt | 24 +++++++------- .../presentation/profile/ProfileActivity.kt | 32 +++++++++---------- .../presentation/profile/ProfileViewModel.kt | 6 ++-- .../src/main/res/layout/activity_profile.xml | 4 +-- 4 files changed, 32 insertions(+), 34 deletions(-) diff --git a/domain/src/main/kotlin/com/going/domain/entity/ProfileMock.kt b/domain/src/main/kotlin/com/going/domain/entity/ProfileMock.kt index 2e6697ca..988ecfa3 100644 --- a/domain/src/main/kotlin/com/going/domain/entity/ProfileMock.kt +++ b/domain/src/main/kotlin/com/going/domain/entity/ProfileMock.kt @@ -1,15 +1,15 @@ package com.going.domain.entity -data class ProfileMock ( - val tendencyTitle: String, - val tendencySubTitle: String, +data class ProfileMock( + val profileTitle: String, + val profileSubTitle: String, val tags: List, - val tendencyBoxInfo: List, - ) { - data class BoxInfo( - val title: String, - val first: String, - val second: String, - val third: String, - ) - } + val profileBoxInfo: List, +) { + data class BoxInfo( + val title: String, + val first: String, + val second: String, + val third: String, + ) +} diff --git a/presentation/src/main/java/com/going/presentation/profile/ProfileActivity.kt b/presentation/src/main/java/com/going/presentation/profile/ProfileActivity.kt index ea361397..d211dd67 100644 --- a/presentation/src/main/java/com/going/presentation/profile/ProfileActivity.kt +++ b/presentation/src/main/java/com/going/presentation/profile/ProfileActivity.kt @@ -11,7 +11,7 @@ import com.going.ui.base.BaseActivity class ProfileActivity : BaseActivity(R.layout.activity_profile) { - private val viewModel by viewModels() + private val profileViewModel by viewModels() override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) @@ -20,38 +20,38 @@ class ProfileActivity : private fun bindProfileInfo() { with(binding) { - viewModel?.mockProfileResult?.apply { - tvProfileType.text = tendencyTitle - tvProfileSubType.text = tendencySubTitle + profileViewModel.mockProfileResult.apply { + tvProfileType.text = profileTitle + tvProfileSubType.text = profileSubTitle tvProfileTag1.text = tags[0] tvProfileTag2.text = tags[1] tvProfileTag3.text = tags[2] - tvFirstDescriptionTitle.text = tendencyBoxInfo[0].title + tvFirstDescriptionTitle.text = profileBoxInfo[0].title tvFirstDescriptionFirstText.text = - setBulletPoint(tendencyBoxInfo[0].first) + setBulletPoint(profileBoxInfo[0].first) tvFirstDescriptionSecondText.text = - setBulletPoint(tendencyBoxInfo[0].second) + setBulletPoint(profileBoxInfo[0].second) tvFirstDescriptionThirdText.text = - setBulletPoint(tendencyBoxInfo[0].third) + setBulletPoint(profileBoxInfo[0].third) tvSecondDescriptionTitle.text = - tendencyBoxInfo[1].title + profileBoxInfo[1].title tvSecondDescriptionFirstText.text = - setBulletPoint(tendencyBoxInfo[1].first) + setBulletPoint(profileBoxInfo[1].first) tvSecondDescriptionSecondText.text = - setBulletPoint(tendencyBoxInfo[1].second) + setBulletPoint(profileBoxInfo[1].second) tvSecondDescriptionThirdText.text = - setBulletPoint(tendencyBoxInfo[1].third) + setBulletPoint(profileBoxInfo[1].third) - tvThirdDescriptionTitle.text = tendencyBoxInfo[2].title + tvThirdDescriptionTitle.text = profileBoxInfo[2].title tvThirdDescriptionFirstText.text = - setBulletPoint(tendencyBoxInfo[2].first) + setBulletPoint(profileBoxInfo[2].first) tvThirdDescriptionSecondText.text = - setBulletPoint(tendencyBoxInfo[2].second) + setBulletPoint(profileBoxInfo[2].second) tvThirdDescriptionThirdText.text = - setBulletPoint(tendencyBoxInfo[2].third) + setBulletPoint(profileBoxInfo[2].third) } } } diff --git a/presentation/src/main/java/com/going/presentation/profile/ProfileViewModel.kt b/presentation/src/main/java/com/going/presentation/profile/ProfileViewModel.kt index 64fb73ab..2b6d25af 100644 --- a/presentation/src/main/java/com/going/presentation/profile/ProfileViewModel.kt +++ b/presentation/src/main/java/com/going/presentation/profile/ProfileViewModel.kt @@ -5,14 +5,14 @@ import com.going.domain.entity.ProfileMock class ProfileViewModel : ViewModel() { val mockProfileResult: ProfileMock = ProfileMock( - tendencyTitle = "배려심 많은 인간 플래너", - tendencySubTitle = "꼼꼼하고 세심하게 여행을 준비하는 친구", + profileTitle = "배려심 많은 인간 플래너", + profileSubTitle = "꼼꼼하고 세심하게 여행을 준비하는 친구", tags = listOf( "#친구중심", "#꼼꼼함", "#세심함", ), - tendencyBoxInfo = listOf( + profileBoxInfo = listOf( ProfileMock.BoxInfo( "이런점이\n좋아요", "같이 가는 친구들을 잘 챙기고 배려해요", diff --git a/presentation/src/main/res/layout/activity_profile.xml b/presentation/src/main/res/layout/activity_profile.xml index ce958e8c..f4d16667 100644 --- a/presentation/src/main/res/layout/activity_profile.xml +++ b/presentation/src/main/res/layout/activity_profile.xml @@ -1,11 +1,9 @@ + -