-
Notifications
You must be signed in to change notification settings - Fork 0
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
Feature/week6 essential #17
base: develop
Are you sure you want to change the base?
Conversation
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.
이번주도 그저 배워갑니다!!
private val _isPasswordMeetCriteria: MutableLiveData<Boolean> = MutableLiveData() | ||
val isPasswordMeetCriteria: LiveData<Boolean> = _isPasswordMeetCriteria | ||
private val _isMeetCriteria: MutableLiveData<Boolean> = MutableLiveData(false) | ||
val isMeetCriteria: LiveData<Boolean> = _isMeetCriteria |
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.
하나는 초기값을 설정하고 하나는 안했는데 어떤 기준으로 선택하시는 건가요??
저는 전부다 초기값 없이 사용하는 편인데 어느게 더 좋은지 궁금합니다!
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.
저도 이부분 궁금합니다!!
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.
초기값을 설정하게 되면 화면에 들어간 순간부터 경고문이 뜨기 때문입니다!
아무것도 아닌 상태, 실패한 상태, 성공한 상태 세 가지가 필요했기 때문에 초기값 설정을 해주지 않았습니다.
그때 그때 상황에 따라 다르게 설정하는 것 같습니다 :)
android:backgroundTint="@{vm.isMeetCriteria == true ? @color/baby_blue : @color/gray}" | ||
android:clickable="@{vm.isMeetCriteria == true ? true : false}" |
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.
backgroundTint에서 3항 연산자 활용 멋지네요!!
근데 clickable은 3항연산자가 아니라 바로 vm.isMeetCriteria 써도 될것 같기도 합니다 ㅎㅎ
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.
클릭은 그냥 vm.isMeetCriteria 를 안쓰고 저렇게 하신이유가 있나욥>
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.
없습니다 ㅎ.. 바꿀게요👍🏻
군더더기 없이 깔끔한 강희언니 코드 본받고 싶습니다!! |
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.
LGTM
@@ -64,13 +64,26 @@ | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:layout_marginTop="10dp" | |||
android:backgroundTint="@{vm.isPasswordMeetCriteria != null && vm.isPasswordMeetCriteria == false ? @color/red : @color/black}" |
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.
데바마스터이신가
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.
이방법이 참 좋은데 가독성을 떨구는 부문인거 같아요 ㅠ 저도 이번 과제는 데바를 활용해야 해서 사용하였는데 평소에도 애용하시나요?
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.
이런 식으로 값 변경에 즉각즉각 바뀌는 부분엔 애용하는 것 같아요
android:backgroundTint="@{vm.isMeetCriteria == true ? @color/baby_blue : @color/gray}" | ||
android:clickable="@{vm.isMeetCriteria == true ? true : false}" |
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.
클릭은 그냥 vm.isMeetCriteria 를 안쓰고 저렇게 하신이유가 있나욥>
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.
이번 주도 수고 많으셨슴다 역시 최고 코드입니다람쥐 많이 배워 가고 눈에 담아갑니다 👍👍😎😮
android:visibility="@{vm.isPasswordMeetCriteria != null && vm.isPasswordMeetCriteria == false ? View.VISIBLE : View.INVISIBLE}" | ||
app:layout_constraintStart_toStartOf="@id/tv_sign_up_id" |
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.
이렇게 가시성 설정할 수 있군요/,... 오늘도 배워갑니다 최고 👍👍
private val _isPasswordMeetCriteria: MutableLiveData<Boolean> = MutableLiveData() | ||
val isPasswordMeetCriteria: LiveData<Boolean> = _isPasswordMeetCriteria | ||
private val _isMeetCriteria: MutableLiveData<Boolean> = MutableLiveData(false) | ||
val isMeetCriteria: LiveData<Boolean> = _isMeetCriteria |
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.
저도 이부분 궁금합니다!!
📌𝘐𝘴𝘴𝘶𝘦𝘴
📎𝘞𝘰𝘳𝘬 𝘋𝘦𝘴𝘤𝘳𝘪𝘱𝘵𝘪𝘰𝘯
📷𝘚𝘤𝘳𝘦𝘦𝘯𝘴𝘩𝘰𝘵
-.Clipchamp.mp4
💬𝘛𝘰 𝘙𝘦𝘷𝘪𝘦𝘸𝘦𝘳𝘴