Skip to content
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

[Add/#113] download image 추가 및 텍스트 수정 #115

Merged
merged 4 commits into from
Jan 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package com.going.domain.entity

data class ProfileMock(
val resultImage: Int,
val downloadImage: Int,
val profileTitle: String,
val profileSubTitle: String,
val tags: List<String>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import javax.inject.Inject

@HiltViewModel
class EnterPreferenceViewModel @Inject constructor(
private val enterPreferenceRepository: EnterPreferenceRepository
private val enterPreferenceRepository: EnterPreferenceRepository,
) : ViewModel() {

private val _enterPreferenceListState =
Expand Down Expand Up @@ -44,8 +44,8 @@ class EnterPreferenceViewModel @Inject constructor(
styleB.value ?: 0,
styleC.value ?: 0,
styleD.value ?: 0,
styleE.value ?: 0
)
styleE.value ?: 0,
),
)
.onSuccess {
_enterPreferenceListState.value = UiState.Success(it)
Expand All @@ -61,31 +61,31 @@ class EnterPreferenceViewModel @Inject constructor(
number = "01",
question = "계획은 어느정도로 세울까요?",
leftPrefer = "철저하게",
rightPrefer = "즉흥으로"
rightPrefer = "즉흥으로",
),
PreferenceData(
number = "02",
question = "장소선택의 기준은 무엇인가요?",
leftPrefer = "관광지",
rightPrefer = "로컬장소"
question = "어떤 곳을 가고 싶나요?",
leftPrefer = "명소 위주",
rightPrefer = "로컬 장소",
),
PreferenceData(
number = "03",
question = "어느 식당을 갈까요?",
question = "어떤 식당을 갈까요?",
leftPrefer = "유명 맛집",
rightPrefer = "가까운 곳"
rightPrefer = "가까운 곳",
),
PreferenceData(
number = "04",
question = "기억하고 싶은 순간에!",
leftPrefer = "사진 필수",
rightPrefer = "눈에 담기"
rightPrefer = "눈에 담기",
),
PreferenceData(
number = "05",
question = "하루 일정을 어떻게 채우나요?",
question = "하루 일정을 어떻게 구성해요?",
leftPrefer = "알차게",
rightPrefer = "여유롭게"
rightPrefer = "여유롭게",
),
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ class FinishPreferenceViewModel @Inject constructor(
val styleD = MutableLiveData(0)
val styleE = MutableLiveData(0)


fun checkStyleFromServer(tripId: Long) {
_finishInviteState.value = UiState.Loading
viewModelScope.launch {
Expand All @@ -40,8 +39,8 @@ class FinishPreferenceViewModel @Inject constructor(
styleB.value ?: 0,
styleC.value ?: 0,
styleD.value ?: 0,
styleE.value ?: 0
)
styleE.value ?: 0,
),
).onSuccess {
_finishInviteState.value = UiState.Success(it)
}.onFailure {
Expand All @@ -50,24 +49,37 @@ class FinishPreferenceViewModel @Inject constructor(
}
}


val preferenceTagList = listOf<PreferenceData>(
PreferenceData(
number = "01", question = "계획은 어느정도로 세울까요?", leftPrefer = "철저하게", rightPrefer = "즉흥으로"
number = "01",
question = "계획은 어느정도로 세울까요?",
leftPrefer = "철저하게",
rightPrefer = "즉흥으로",
),
PreferenceData(
number = "02", question = "장소선택의 기준은 무엇인가요?", leftPrefer = "관광지", rightPrefer = "로컬장소"
number = "02",
question = "어떤 곳을 가고 싶나요?",
leftPrefer = "명소 위주",
rightPrefer = "로컬 장소",
),
PreferenceData(
number = "03", question = "어느 식당을 갈까요?", leftPrefer = "유명 맛집", rightPrefer = "가까운 곳"
number = "03",
question = "어떤 식당을 갈까요?",
leftPrefer = "유명 맛집",
rightPrefer = "가까운 곳",
),
PreferenceData(
number = "04", question = "기억하고 싶은 순간에!", leftPrefer = "사진 필수", rightPrefer = "눈에 담기"
number = "04",
question = "기억하고 싶은 순간에!",
leftPrefer = "사진 필수",
rightPrefer = "눈에 담기",
),
PreferenceData(
number = "05", question = "하루 일정을 어떻게 채우나요?", leftPrefer = "알차게", rightPrefer = "여유롭게"
number = "05",
question = "하루 일정을 어떻게 구성해요?",
leftPrefer = "알차게",
rightPrefer = "여유롭게",
),
)

}

Original file line number Diff line number Diff line change
Expand Up @@ -11,32 +11,31 @@ class PreferenceTagViewModel : ViewModel() {
number = "01",
question = "계획은 어느정도로 세울까요?",
leftPrefer = "철저하게",
rightPrefer = "즉흥으로"
rightPrefer = "즉흥으로",
),
PreferenceData(
number = "02",
question = "장소선택의 기준은 무엇인가요?",
leftPrefer = "관광지",
rightPrefer = "로컬장소"
question = "어떤 곳을 가고 싶나요?",
leftPrefer = "명소 외주",
rightPrefer = "로컬 장소",
),
PreferenceData(
number = "03",
question = "어느 식당을 갈까요?",
leftPrefer = "유명 맛집",
rightPrefer = "가까운 곳"
rightPrefer = "가까운 곳",
),
PreferenceData(
number = "04",
question = "기억하고 싶은 순간에!",
leftPrefer = "사진 필수",
rightPrefer = "눈에 담기"
leftPrefer = "사진필수",
rightPrefer = "눈에 담기",
),
PreferenceData(
number = "05",
question = "하루 일정을 어떻게 채우나요?",
question = "하루 일정을 어떻게 구성해요?",
leftPrefer = "알차게",
rightPrefer = "여유롭게"
rightPrefer = "여유롭게",
),
)

}
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ class TendencyResultActivity :
private fun saveImageToGallery() {
val imageBitmap: Bitmap = BitmapFactory.decodeResource(
resources,
R.drawable.img_tendency_result_ari,
viewModel.mockTendencyResult[viewModel.tendencyId.value?:0].downloadImage,
)
val imageFileName = DOWNLOAD_IMAGE_NAME.replace("%s", viewModel.tendencyId.value.toString())
val path = DOWNLOAD_PATH
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ class TendencyResultViewModel @Inject constructor(
val mockTendencyResult: List<ProfileMock> = listOf(
ProfileMock(
resultImage = R.drawable.img_tendency_result_srp,
downloadImage = R.drawable.img_download_srp,
profileTitle = "배려심 넘치는 든든잉",
profileSubTitle = "꼼꼼하고 세심하게 여행을 준비해요",
tags = listOf(
Expand Down Expand Up @@ -69,6 +70,7 @@ class TendencyResultViewModel @Inject constructor(
),
ProfileMock(
resultImage = R.drawable.img_tendency_result_sri,
downloadImage = R.drawable.img_download_sri,
profileTitle = "뭐든지 다 좋아! 와따잉",
profileSubTitle = "어떤 여행이든, 일정이든 즐겨요",
tags = listOf(
Expand Down Expand Up @@ -99,6 +101,7 @@ class TendencyResultViewModel @Inject constructor(
),
ProfileMock(
resultImage = R.drawable.img_tendency_result_sep,
downloadImage = R.drawable.img_download_sep,
profileTitle = "계획 절대 지켜 꼼꼼잉",
profileSubTitle = "여행의 처음부터 끝까지 착실하게 계획해요",
tags = listOf(
Expand Down Expand Up @@ -129,6 +132,7 @@ class TendencyResultViewModel @Inject constructor(
),
ProfileMock(
resultImage = R.drawable.img_tendency_result_sei,
downloadImage = R.drawable.img_download_sei,
profileTitle = "하고싶은건 하는 고잉",
profileSubTitle = "하고 싶은 것만 하게 해주면, 나머지는 다 괜찮아요",
tags = listOf(
Expand Down Expand Up @@ -159,6 +163,7 @@ class TendencyResultViewModel @Inject constructor(
),
ProfileMock(
resultImage = R.drawable.img_tendency_result_arp,
downloadImage = R.drawable.img_download_arp,
profileTitle = "다정한 여행 반장 모여잉",
profileSubTitle = "즐거운 여행을 위해 모두를 챙겨요",
tags = listOf(
Expand Down Expand Up @@ -189,6 +194,7 @@ class TendencyResultViewModel @Inject constructor(
),
ProfileMock(
resultImage = R.drawable.img_tendency_result_ari,
downloadImage = R.drawable.img_download_ari,
profileTitle = "깨발랄 치어리더 아쟈잉",
profileSubTitle = "친구들과 함께 하는 것 자체가 행복해요",
tags = listOf(
Expand Down Expand Up @@ -219,6 +225,7 @@ class TendencyResultViewModel @Inject constructor(
),
ProfileMock(
resultImage = R.drawable.img_tendency_result_aep,
downloadImage = R.drawable.img_download_aep,
profileTitle = "나만 믿어 따라와 척척잉",
profileSubTitle = "모든 것을 계획하고 진행하는 프로총대러에요",
tags = listOf(
Expand Down Expand Up @@ -249,6 +256,7 @@ class TendencyResultViewModel @Inject constructor(
),
ProfileMock(
resultImage = R.drawable.img_tendency_result_aei,
downloadImage = R.drawable.img_download_aei,
profileTitle = "모험을 즐기는 별별잉",
profileSubTitle = "여행의 진정한 재미는 새로운 도전이에요",
tags = listOf(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class TendencyTestViewModel @Inject constructor(
"여행을 가게 되면 먼저 할 일은?",
"예약 가능한 비행기 표와 숙소 알아보기",
"다른 사람이 다녀온 여행 후기 찾아보기",
"가고 싶은 맛집, 명소 찾아보기",
"현지에서만 먹을 수 있는 음식 찾아보기",
"여기에서만 할 수 있는 액티비티 찾아보기",
),
TendencyTestMock(
Expand All @@ -60,9 +60,9 @@ class TendencyTestViewModel @Inject constructor(
),
TendencyTestMock(
"친구가 하루만 혼자 놀겠다 하면?",
"하고 싶은 걸 물어보고 일정을 바꾼다",
"하고 싶은 걸 물어보고 친구에게 맞춘다",
"보내주지만 속으로는 불만이 있을까 걱정한다",
"하고 싶은 게 있나 보다 생각하며 보내준다",
"'하고 싶은 게 있나 보다' 생각하며 보내준다",
"그럼 오늘은 각자 시간을 보내자고 제안한다",
),
TendencyTestMock(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import com.going.presentation.R

class ProfileViewModel : ViewModel() {
val mockProfileResult: ProfileMock = ProfileMock(
resultImage = R.drawable.img_tendency_result_aep ,
resultImage = R.drawable.img_tendency_result_aep,
downloadImage = R.drawable.img_download_aep,
profileTitle = "배려심 많은 인간 플래너",
profileSubTitle = "꼼꼼하고 세심하게 여행을 준비하는 친구",
tags = listOf(
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.