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

#160[fix] 곰 미선택시 버튼 비활성화 #161

Merged
merged 2 commits into from
Feb 7, 2024

Conversation

stellar-halo
Copy link
Contributor

📑 Work Description

  • 곰 미선택시 버튼 비활성화
  • NONE을 이용한 분기처리가 자꾸만 안되어서 boolean값으로 하나 만들어줬습니다.. 정말 왜죠..

🛠️ Issue

📷 Screenshot

btn_unclickable.mp4

💬 To Reviewers

새 변수를 만들어주고 싶지 않은데, NONE인 경우만 자꾸 삼항 연산자가 안먹네요!!!!!!!!!!!!!!!!!! 이유 아시는 분 커피 한 잔

@stellar-halo stellar-halo added UI ui 관련 작업 강희🐬 강희가 작업함! fix Fix(디자인 등) labels Feb 7, 2024
@stellar-halo stellar-halo self-assigned this Feb 7, 2024
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.

다른 곰돌이 다 되는데 왜 none만 안먹지..

@@ -100,9 +100,9 @@
android:layout_marginHorizontal="20dp"
android:layout_marginBottom="34dp"
style="?android:attr/borderlessButtonStyle"
android:background="@{viewModel.selectedBearType != @string/none ? @drawable/shape_main1_fill_12_rect : @drawable/shape_gray200_fill_12_rect}"
android:clickable="@{viewModel.selectedBearType != @string/none ? true : false}"
Copy link
Member

Choose a reason for hiding this comment

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

getString 써보자고 쓰려다가 후다닥 지웠습니다 ^^ ㅎ.ㅎ

Copy link
Member

@emjayMJkim emjayMJkim left a comment

Choose a reason for hiding this comment

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

지금처럼 변수 하나 생성하는 것도 괜찮긴 하지만, 변수 생성 없이 하고 싶으시면 "NONE"으로 바꿔서 한번 해보시는 것도 좋을 것 같습니당

Comment on lines -103 to -104
android:background="@{viewModel.selectedBearType != @string/none ? @drawable/shape_main1_fill_12_rect : @drawable/shape_gray200_fill_12_rect}"
android:clickable="@{viewModel.selectedBearType != @string/none ? true : false}"
Copy link
Member

Choose a reason for hiding this comment

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

이 부분을 !viewModel.selectedBearType.equals(@string/none)로 바꾸면 될 것 같습니다..!

@@ -6,7 +6,6 @@
<string name="red">RED</string>
<string name="white">WHITE</string>
<string name="gray">GRAY</string>
<string name="none"></string>
Copy link
Member

Choose a reason for hiding this comment

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

이 부분 빈 값 말고 NONE으로 넣어주시구요!!

Comment on lines 15 to 22
private val _selectedBearType: MutableLiveData<String> = MutableLiveData(NONE)
val selectedBearType: LiveData<String> get() = _selectedBearType
private val _isBearSelected: MutableLiveData<Boolean> = MutableLiveData(false)
val isBearSelected: LiveData<Boolean> get() = _isBearSelected

fun selectBearType(dollType: String) {
val isSameBearSelected = _selectedBearType.value == dollType

if (isSameBearSelected) _selectedBearType.value = NONE
else _selectedBearType.value = dollType
Copy link
Member

Choose a reason for hiding this comment

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

NONE으로 되어 있는 부분들 "NONE"으로 한번 바꿔서 해보실래요..?

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.

NONE, NonNull, "" 이런 빈값 처리하는건 항상 물음표네요..

@stellar-halo stellar-halo merged commit 3cf8117 into develop Feb 7, 2024
1 check passed
@stellar-halo stellar-halo deleted the feature/#160-fix-bear-non-select-btn-unclick branch February 7, 2024 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Fix(디자인 등) UI ui 관련 작업 강희🐬 강희가 작업함!
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[fix] 곰 선택 화면에서 곰 미선택시 버튼 비활성화
4 participants