-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[UI/#50] 프로필 뷰 구현 #57
Merged
Merged
Changes from 13 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
8282175
[FEAT/#50] profile 초기 커밋
crownjoe a9aecf1
Merge branch 'develop' of https://github.com/Team-Going/Going-Android…
crownjoe 30f0fb0
[FEAT/#50] profile 수정
crownjoe e7cf719
[FEAT/#50] profile 수정
crownjoe 103cc85
[FEAT/#50] profile 수정
crownjoe 80cbff6
Merge branch 'develop' of https://github.com/Team-Going/Going-Android…
crownjoe 9ee20d9
[FEAT/#50] profile UI 구현 완료
crownjoe 4bb2377
[FEAT/#50] profile UI 구현 수정
crownjoe 9656364
Merge branch 'develop' of https://github.com/Team-Going/Going-Android…
crownjoe 5c732d4
[FEAT/#50] profile UI 구현 완료
crownjoe ef4688a
[FEAT/#50] profile UI 기능 구현
crownjoe d7a0359
[FEAT/#50] profile UI 기능 수정
crownjoe 0491a46
[FEAT/#50] data class 중복
crownjoe a11b435
[FEAT/#50] 코드리뷰 반영 수정 완료
crownjoe 3d44d18
Merge branch 'develop' of https://github.com/Team-Going/Going-Android…
crownjoe 1f5a465
[FEAT/#50] manifest 수정 완료
crownjoe File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
...going/domain/entity/TendencyResultMock.kt → ...in/com/going/domain/entity/ProfileMock.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
65 changes: 65 additions & 0 deletions
65
presentation/src/main/java/com/going/presentation/profile/ProfileActivity.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
package com.going.presentation.profile | ||
|
||
import android.os.Bundle | ||
import android.text.SpannableString | ||
import android.text.Spanned | ||
import android.text.style.BulletSpan | ||
import androidx.activity.viewModels | ||
import com.going.presentation.R | ||
import com.going.presentation.databinding.ActivityProfileBinding | ||
import com.going.ui.base.BaseActivity | ||
|
||
class ProfileActivity : | ||
BaseActivity<ActivityProfileBinding>(R.layout.activity_profile) { | ||
private val profileViewModel by viewModels<ProfileViewModel>() | ||
override fun onCreate(savedInstanceState: Bundle?) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 줄바꿈을 권장합니다 ~ |
||
super.onCreate(savedInstanceState) | ||
|
||
bindProfileInfo() | ||
} | ||
|
||
private fun bindProfileInfo() { | ||
with(binding) { | ||
profileViewModel.mockProfileResult.apply { | ||
tvProfileType.text = profileTitle | ||
tvProfileSubType.text = profileSubTitle | ||
|
||
tvProfileTag1.text = tags[0] | ||
tvProfileTag2.text = tags[1] | ||
tvProfileTag3.text = tags[2] | ||
|
||
tvFirstDescriptionTitle.text = profileBoxInfo[0].title | ||
tvFirstDescriptionFirstText.text = | ||
setBulletPoint(profileBoxInfo[0].first) | ||
tvFirstDescriptionSecondText.text = | ||
setBulletPoint(profileBoxInfo[0].second) | ||
tvFirstDescriptionThirdText.text = | ||
setBulletPoint(profileBoxInfo[0].third) | ||
|
||
tvSecondDescriptionTitle.text = | ||
profileBoxInfo[1].title | ||
tvSecondDescriptionFirstText.text = | ||
setBulletPoint(profileBoxInfo[1].first) | ||
tvSecondDescriptionSecondText.text = | ||
setBulletPoint(profileBoxInfo[1].second) | ||
tvSecondDescriptionThirdText.text = | ||
setBulletPoint(profileBoxInfo[1].third) | ||
|
||
tvThirdDescriptionTitle.text = profileBoxInfo[2].title | ||
tvThirdDescriptionFirstText.text = | ||
setBulletPoint(profileBoxInfo[2].first) | ||
tvThirdDescriptionSecondText.text = | ||
setBulletPoint(profileBoxInfo[2].second) | ||
tvThirdDescriptionThirdText.text = | ||
setBulletPoint(profileBoxInfo[2].third) | ||
} | ||
} | ||
} | ||
|
||
private fun setBulletPoint(text: String): SpannableString { | ||
val string = SpannableString(text) | ||
string.setSpan(BulletSpan(10), 0, text.length - 1, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE) | ||
|
||
return string | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
presentation/src/main/java/com/going/presentation/profile/ProfileViewModel.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package com.going.presentation.profile | ||
|
||
import androidx.lifecycle.ViewModel | ||
import com.going.domain.entity.ProfileMock | ||
|
||
class ProfileViewModel : ViewModel() { | ||
val mockProfileResult: ProfileMock = ProfileMock( | ||
profileTitle = "배려심 많은 인간 플래너", | ||
profileSubTitle = "꼼꼼하고 세심하게 여행을 준비하는 친구", | ||
tags = listOf( | ||
"#친구중심", | ||
"#꼼꼼함", | ||
"#세심함", | ||
), | ||
profileBoxInfo = listOf( | ||
ProfileMock.BoxInfo( | ||
"이런점이\n좋아요", | ||
"같이 가는 친구들을 잘 챙기고 배려해요", | ||
"친구들의 의견을 잘 반영해 만족할 수 있는 일정을 계획해요", | ||
"꼼꼼하고 부지런해 맡은 일에서 실수가 적어요", | ||
), | ||
ProfileMock.BoxInfo( | ||
"이런점은\n주의해줘요", | ||
"완벽주의 성향이 강해 계획이 틀어졌을 때 예민해질 수 있어요", | ||
"싸우지 않고 여행하는 것을 중요시 해 갈등의 조짐이 보이면 많은 스트레스를 받아요", | ||
"예기치 않은 상황에서 크게 당횡해요", | ||
), | ||
ProfileMock.BoxInfo( | ||
"이런걸\n잘해요", | ||
"전반적인 여행 계획 마련", | ||
"호텔과 비행기표 예약 및 관리", | ||
"기타 행동이 필요한 것들", | ||
), | ||
), | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 8 additions & 8 deletions
16
...n/src/main/java/com/going/presentation/tendencytest/result/TendencyTestResultViewModel.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
빈줄이 많네요~