-
Notifications
You must be signed in to change notification settings - Fork 25
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
[둘리] 뷰 챌린지 미션 1단계 제출합니다. #14
Conversation
개인적으로 색상을 CRUD 할 것이 아니라면, 이미 enum 상수로 정해져 있는 색상 목록을 Repository에서 가져오는 것은 불필요하다고 느껴집니다. 현재 색상을 ViewModel에서 관리하고 있지만 꼭 그럴 필요도 없을 것 같습니다! 그럼 선택된 색상을 어떻게 관리하냐 라는 의문이 생기실 수도 있는데, 결론적으로 getAllColors() 메서드로 색상 목록을 가져오는 것이 어색하지 않다는 것입니다. |
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.
안녕하세요 둘리!
레벨1 페어가 엊그제같은데 정말 시간이 빠르네요 🥲
몇 가지 코멘트를 남겨놓았으니 확인 부탁드려요 : )
app/src/main/java/woowacourse/paint/ColorSpaceItemDecoration.kt
Outdated
Show resolved
Hide resolved
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.
리뷰 반영하느라 고생하셨습니다 둘리!
크게 변경될 코드가 없다고 느껴져서 바로 Approve하겠습니다.
작은 코멘트를 남겨놓았으니 확인해주세요 🙂
colors.firstOrNull { it.isPicked }?.color ?: PaletteColor.RED | ||
} | ||
|
||
private val _width = MutableLiveData(0f) |
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.
Activity의 minWidth와 ViewModel의 width에 불일치가 있을 수 있습니다.
ex) Activity의 minWidth는 10으로 바꾸고 ViewModel은 깜빡하고 그대로 유지하는 경우
val selectedColor: LiveData<PaletteColor> | ||
get() = Transformations.map(_colors) { colors -> | ||
colors.firstOrNull { it.isPicked }?.color ?: PaletteColor.RED |
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 _colors = | ||
MutableLiveData( |
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.
없습니다! 수정과정에 띄어진 것 같네용
안녕하세요, 부나~! 레벨1 페어 이후로 처음인 것 같네요.
다른 크루들과 다를 수 있는 점이 있다면 버튼을 눌러야만 색상, 두께 변경 UI가 보인다는 것입니다.
저는 색상을 누를 때, 두께를 변경할 때 바로 바뀐 paint가 적용되었으면 해서 이 두 버튼을 어떻게 할까 하다가 show/hide용으로 두었어요.
CanvasView는 lines라는 MutableList를 가지고 있습니다. Line은 path와 Paint를 가지고 있어요.
여러 line을 가지고 있다가 onDraw 시점에 모두 그려버리도록 했습니다.
어려운 코드는 아마 없을 것 같아요.
다만 고민인 부분이 몇가지 있는데요!
리뷰 하실 때 위 두 가지 질문에 대한 답변도 함께 부탁드립니다.
리뷰 잘 부탁드려요!!!!👍