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

#7 [ui] 온보딩 - 테마 선택 뷰 #12

Merged
merged 13 commits into from
Jan 9, 2024

Conversation

emjayMJkim
Copy link
Member

📑 Work Description

  • 온보딩 activity 생성
  • 테마 선택 뷰 ui 구현

🛠️ Issue

📷 Screenshot

ui.onboarding-theme.choice.webm

💬 To Reviewers

테마 3개 이상 선택 시 버튼 활성화 로직은 다음 pr에 반영하겠습니다

@emjayMJkim emjayMJkim self-assigned this Jan 9, 2024
@emjayMJkim emjayMJkim added UI ui 관련 작업 민정🦊 민정이가 작업함! labels Jan 9, 2024
Copy link
Contributor

@stellar-halo stellar-halo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생했어요! 덕분에 이 부분 편하게 하겠네요!!

Comment on lines +1 to +3
package com.sopetit.softie.domain.entity

data class Theme(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍👍

Comment on lines 42 to 45
viewModel.bearNameChoiceView.observe(this) {
if (it) {
changeFragment(SetBearNameFragment())
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

viewModel.bearNameChoiceView.observe(this) { bearNameChoiceView -> 
            if (bearNameChoiceView) {
                changeFragment(SetBearNameFragment())
            }
}

이런 건 어떤가요?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이렇게 하는 게 더 가독성이 높아질 것 같네요!!

Comment on lines +33 to +35
fun changeThemeChoiceView() {
_themeChoiceView.value = true
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

다른 view 값들에 대해서는 false 처리를 안해도 나중에 문제가 안될지,,!!

  • 온보딩 과정 중에는 뒤로가기 버튼을 막아야 되겠죠..?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

저도 고민을 좀 했는데.. 일단은 지금 온보딩 과정 중에 뒤로가기 로직이 없는 상태라서 그냥 true로만 설정했습니다...! 나중에 유저 로직이 바뀌게 되면 코드 수정하겠습니당

Comment on lines 43 to 44
5,
8,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

매직 넘버 말고 companion로 빼주실 수 있을까요?!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

네엡!! 이걸 pr 올리고 발견했네요..

Comment on lines +12 to +16
Theme(
1,
"하루의 시작",
"",
""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

꼼꼼한 가짜 데이터,,,

Comment on lines 50 to 52
android:layout_marginTop="28dp"
android:src="@{viewModel.themeChoiceView ? @drawable/shape_main1_fill_99_rect : @drawable/shape_gray100_fill_99_rect}"
app:layout_constraintTop_toTopOf="parent"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Top_toTopOf="@id/iv_onboarding_top_bar_second"
으로 걸면 marginTop을 안해도 되니 적용해보시는 건 어떤가요

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

제가 아무 생각 없이 복사 붙여넣기 하고 코드를 안 고쳤군요.. 감사합니다!!

app:layout_constraintEnd_toEndOf="@id/iv_onboarding_choice_theme_speech_background" />

<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rcv_onboarding_choice_theme"
Copy link
Contributor

@stellar-halo stellar-halo Jan 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"@+id/rv_onboarding_choice_theme"
로 바꿔주세요!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

네엡!!

Comment on lines +36 to +37
<!-- onboarding -->
<color name="onboarding_speech">#FF259560</color>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

아앗,,제가 빼먹었군요

Copy link
Member

@minemi00 minemi00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

배울점이 많은 코드네요 보고 고쳐야겠습니다 수고하셨서요!

android:layout_height="6dp"
android:layout_marginTop="28dp"
android:layout_marginStart="20dp"
android:src="@{viewModel.bearChoiceView ? @drawable/shape_main1_fill_99_rect : @drawable/shape_gray100_fill_99_rect}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

데이터바인딩 활용 잘한다!

app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/iv_onboarding_choice_theme_title_bear"
app:layout_constraintBottom_toTopOf="@id/btn_onboarding_choice_theme"
tools:listitem="@layout/item_onboarding_choice_theme" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

리사이클러뷰 아이템 개수를 굳이 설정 안해도 되는군요

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

저 같은 경우에는 그리드 레이아웃으로 12개로 아이템이 정해져 있습니다!

android:layout_width="40dp"
android:layout_height="40dp"
android:src="@drawable/ic_theme_1"
app:layout_constraintTop_toTopOf="@id/iv_theme_background"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

아 부모를 백그라운드로 설정하면 안에다가 이미지뷰 들어가지,,, 바꿔야겠다

Copy link
Collaborator

@pump9918 pump9918 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

글자 인덱싱하는 법 잘 알아갑니다~
개인적으로 글자가 유연하게 길어지거나 줄어들 때 상대 위치로도 인덱싱 가능한지 궁금하네요

android:layout_height="6dp"
android:layout_marginTop="28dp"
android:layout_marginEnd="20dp"
android:src="@{viewModel.routineChoiceView ? @drawable/shape_main1_fill_99_rect : @drawable/shape_gray100_fill_99_rect}"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

리드님이 좋아하는 삼항연산자...

android:layout_marginVertical="14dp"
android:text="@string/onboarding_choice_theme_speech"
android:textColor="@color/gray700"
android:textAppearance="@style/bubble16"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style:"@~" 와 같이 적는거보다 textAppearance가 더 일반적인 사용법인가요?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

더 일반적이기 보다는 제 습관입니다..!!

binding.viewModel = viewModel

binding.tvOnboardingChoiceThemeSpeech.text =
SpannableStringBuilder(getString(R.string.onboarding_choice_theme_speech)).apply {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

setSpan이 멘트의 특정부분만 인덱싱해서 색을 바꾸는 부분인가요?
잘 배워갑니다...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

네! 이렇게 하면 textview를 여러개 만들 필요가 없습니당

@m1njae
Copy link

m1njae commented Jan 9, 2024

민정쌤 좀 치시네요 고생하셨습니다!

@emjayMJkim emjayMJkim merged commit 22d97ac into develop Jan 9, 2024
1 check passed
@emjayMJkim emjayMJkim deleted the feature/#7-onboarding-choice-routine branch January 9, 2024 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
UI ui 관련 작업 민정🦊 민정이가 작업함!
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[ui] onBoarding - 루틴 선택
5 participants