-
Notifications
You must be signed in to change notification settings - Fork 0
[Misson] 5주차 미션 수행 #48
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: Nick/main
Are you sure you want to change the base?
Conversation
yangjiae12
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.
수고하셨습니다!
| runOnUiThread { | ||
| binding.songSeekbarSb.progress = ((mills/playTime)*100).toInt() | ||
| binding.songSeekbarSb.progress = ((mills/playTime)*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.
지난 번에 Progress 계산에서 오류가 났다고 말씀해 주셨는데, 코드를 보니까 SeekBar의 Max값이 10000이어서 그런 것 같습니다! 현재 Progress를 계산할 때 밀리초를 초로 나눈 다음 100을 곱했는데 이렇게 되면 60초 노래 기준으로 최종 계산 값이 100000이라서 Max값을 10000으로 했을 때는 노래가 6초만 재생되어도 Seekbar가 끝났던 것으로 보이네요~
보정 계수가 직관적이지 않으니까 아예 playTime을 밀리초로 통일해서 코드를 더 명확하게 개선해도 좋을 것 같아요~
📌 PR 제목
✅ 변경 사항
📷 영상 및 스크린샷
🔗 알게 된 사항
📝 질문 사항