[UI/#31] OurTodo / 완료, 미완료 투두리스트 구현#32
Merged
Marchbreeze merged 10 commits intodevelopfrom Jan 7, 2024
Merged
Conversation
…into ui/#31-our-todo-list
crownjoe
reviewed
Jan 7, 2024
Contributor
crownjoe
left a comment
There was a problem hiding this comment.
벌써 완료, 미완료 투두리스트를 구현한 그는 그냥 빛........
이제 오빠가 마지막에 두줄 띄고 괄호 닫는 습관까지 알았으니
다음부터 더 야무지게 보겠습니다
멋쥡니다
|
|
||
| val mockUncompleteTodoList: List<TodoModel> = listOf( | ||
| TodoModel(0,"숙소 예약하기", "2024-01-12", listOf("김상호", "박동민")), | ||
| TodoModel(1,"기차 왕복 예약하기", "2024-01-14", listOf("조세연")), |
leeeyubin
approved these changes
Jan 7, 2024
Member
leeeyubin
left a comment
There was a problem hiding this comment.
저도 비슷한 기능 구현 중이었는데 도움 많이 되었습니다! 수고하셨어용
Comment on lines
+9
to
+11
| class TodoNameAdapter( | ||
| private val isCompleted: Boolean | ||
| ) : ListAdapter<String, TodoNameViewHolder>(diffUtil) { |
Member
There was a problem hiding this comment.
리스트 뷰 안에 리스트 뷰가 들어간 형태였군여,, 구현 수고하셨어요!
Comment on lines
+28
to
+32
| private fun setRecyclerView() { | ||
| _adapter = OurTodoListAdapter(false) | ||
| binding.rvOurTodoUncomplete.adapter = adapter | ||
| adapter.submitList(viewModel.mockUncompleteTodoList) | ||
| } |
Member
There was a problem hiding this comment.
완료, 미완료 프래그먼트에 대한 어댑터를 각각 연결해준 거군요!
Comment on lines
+13
to
+14
| private val redColor = ContextCompat.getColor(binding.root.context, R.color.red_500) | ||
| private val grayColor = ContextCompat.getColor(binding.root.context, R.color.gray_400) |
Member
Author
There was a problem hiding this comment.
getColor를 사용하는 과정에서 필요한,,,기능!
Comment on lines
+28
to
+30
| TodoModel(7,"커피 사기", "2024-01-15", listOf("이유빈")) | ||
| ) | ||
|
|
chattymin
approved these changes
Jan 7, 2024
Comment on lines
24
to
25
Member
There was a problem hiding this comment.
보기에는 이 코드가 더 이쁘지만 두번 검사하는 것 보다는 한번만 검사하는 코드가 더 좋지 않을까 싶습니다!
if (item == "김상호"){
tvTodoName.setTextColor(redColor)
tvTodoName.isSelected = true
} else tvTodoName.setTextColor(grayColor)
Comment on lines
+28
to
+30
| TodoModel(7,"커피 사기", "2024-01-15", listOf("이유빈")) | ||
| ) | ||
|
|
Comment on lines
22
to
26
Member
There was a problem hiding this comment.
이게 더 중복이 적어 가독성이 좋아 보이는 것 같습니다!!
tvOurTodoItemDate.setTextColor(ContextCompat.getColor(binding.root.context,
if(isCompleted){
R.color.gray_200
} else {
R.color.gray_300
}
))
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
⛳️ Work Description
📸 Screenshot
KakaoTalk_Video_2024-01-08-00-05-44.mp4
📢 To Reviewers