Skip to content

Conversation

@kkyoungchan
Copy link

No description provided.

Copy link

@jusang3057 jusang3057 left a 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) {

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()

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)

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()

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 {

Choose a reason for hiding this comment

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

lifecycleScope도 확인해보시면 좋을 것 같습니다 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants