-
Notifications
You must be signed in to change notification settings - Fork 12
[김영찬_Android] 11주차 과제 제출 #80
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
base: main
Are you sure you want to change the base?
Conversation
jusang3057
left a comment
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 lapList = mutableListOf<LapItem>() | ||
|
|
||
| class LapViewHolder(View: View) : RecyclerView.ViewHolder(View) { |
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.
네이밍 컨밴션 지켜주세요(View: View -> view: View)
|
|
||
| fun clearLaps() { | ||
| lapList.clear() | ||
| notifyDataSetChanged() |
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.
notifyItemRangeRemoved()를 사용하시면 좋습니다.
| startPauseButton = findViewById(R.id.button_start_pause) | ||
| stopButton = findViewById(R.id.button_stop) | ||
| lapButton = findViewById(R.id.button_lap) | ||
| lapRecyclerView = findViewById(R.id.lap_recyclerview) |
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.
view binding 사용하시면 간편하게 할 수 있습니다 👍
| private fun nowTime(ms: Long): String { | ||
| val minutes = (ms / 60000).toInt() | ||
| val seconds = ((ms % 60000) / 1000).toInt() | ||
| val millseconds = ((ms % 1000) / 10).toInt() |
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.
milliseconds 오타인듯 합니다.
| isRunning = true | ||
| startPauseButton.text = getString(R.string.text_pause) | ||
|
|
||
| timeJob = coroutineScope.launch { |
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.
lifecycleScope도 확인해보시면 좋을 것 같습니다 👍
No description provided.