diff options
author | Jonas Burian <jonas.burian@protonmail.com> | 2021-05-09 11:04:31 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-09 11:04:31 +0200 |
commit | 508cea67d1d5a0fd051a1636e402f31f1c7fc39a (patch) | |
tree | 05b1f8db66c8a3afb092158a9ac8bab3e8121122 /app/src/main/java/de/danoeh/antennapod/view | |
parent | 3c808c13930cade8079ef3aa1c83d8321035bfd2 (diff) | |
download | AntennaPod-508cea67d1d5a0fd051a1636e402f31f1c7fc39a.zip |
Fix chapter seekbar issues (#5142)
Buffering indicator drawn incorrectly
Not refreshing divider positions with duration change
Diffstat (limited to 'app/src/main/java/de/danoeh/antennapod/view')
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/view/ChapterSeekBar.java | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/view/ChapterSeekBar.java b/app/src/main/java/de/danoeh/antennapod/view/ChapterSeekBar.java index e14b000a7..ba7acb847 100644 --- a/app/src/main/java/de/danoeh/antennapod/view/ChapterSeekBar.java +++ b/app/src/main/java/de/danoeh/antennapod/view/ChapterSeekBar.java @@ -118,6 +118,14 @@ public class ChapterSeekBar extends androidx.appcompat.widget.AppCompatSeekBar { canvas.drawRect(left, top, right, bottom, paintBackground); + if (progressSecondary > 0 && progressSecondary < width) { + if (right < progressSecondary) { + canvas.drawRect(left, top, right, bottom, paintBackground); + } else if (progressSecondary > left) { + canvas.drawRect(left, top, progressSecondary, bottom, paintBackground); + } + } + if (right < progressPrimary) { currChapter = i + 1; canvas.drawRect(left, top, right, bottom, paintProgressPrimary); @@ -125,9 +133,6 @@ public class ChapterSeekBar extends androidx.appcompat.widget.AppCompatSeekBar { canvas.drawRect(leftCurr, topExpanded, rightCurr, bottomExpanded, paintBackground); canvas.drawRect(leftCurr, topExpanded, progressPrimary, bottomExpanded, paintProgressPrimary); } else { - if (progressSecondary > leftCurr) { - canvas.drawRect(leftCurr, top, progressSecondary, bottom, paintBackground); - } canvas.drawRect(leftCurr, top, progressPrimary, bottom, paintProgressPrimary); } } |