Conversation
yangjiae12
approved these changes
Nov 4, 2025
| runOnUiThread { | ||
| binding.songSeekbarSb.progress = ((mills/playTime)*100).toInt() | ||
| binding.songSeekbarSb.progress = ((mills/playTime)*10).toInt() | ||
| } |
Member
There was a problem hiding this comment.
지난 번에 Progress 계산에서 오류가 났다고 말씀해 주셨는데, 코드를 보니까 SeekBar의 Max값이 10000이어서 그런 것 같습니다! 현재 Progress를 계산할 때 밀리초를 초로 나눈 다음 100을 곱했는데 이렇게 되면 60초 노래 기준으로 최종 계산 값이 100000이라서 Max값을 10000으로 했을 때는 노래가 6초만 재생되어도 Seekbar가 끝났던 것으로 보이네요~
보정 계수가 직관적이지 않으니까 아예 playTime을 밀리초로 통일해서 코드를 더 명확하게 개선해도 좋을 것 같아요~
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.
📌 PR 제목
✅ 변경 사항
📷 영상 및 스크린샷
🔗 알게 된 사항
📝 질문 사항