-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Chapter dividers for the progress bar #4915
Chapter dividers for the progress bar #4915
Conversation
Nice! I think the gaps between chapters might be just a wee bit smaller. What d'you think? And another thought: should we implement support for chapters from the Podcast Index namespace, podcasters may have 'gaps' between chapters (e.g. excluding in-between jingles from the chapter time annotations. Would that potentially pose a problem for displaying this? (Or am I getting ahead of myself here?) |
I would say let's just take the starting time of each chapter and assume that it completely fills the time to the next chapter (just like the current chapter support) |
I agree 👍 |
app/src/main/java/de/danoeh/antennapod/fragment/AudioPlayerFragment.java
Outdated
Show resolved
Hide resolved
app/src/main/java/de/danoeh/antennapod/view/ChapterSeekBar.java
Outdated
Show resolved
Hide resolved
app/src/main/java/de/danoeh/antennapod/fragment/AudioPlayerFragment.java
Outdated
Show resolved
Hide resolved
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.
Works great :) Noticed a little problem related to rotation (see inline comment).
I looked at an episode that uses a huge number of short chapters. The progress bar looks kind of broken with so many gaps. Maybe it would be good to draw the background bar manually instead of using the progress drawable. That way, we can highlight the currently active chapter while dragging (like on YouTube). I think this makes it more clear that the gaps are intentional. Would you be up for doing that?
Looking at it on my real device, I think that the gaps could be a little bit smaller.
Additional idea: Out-of-scope for this PR but I think it would be pretty amazing to show the chapter title in that popup box while dragging the seek bar.
app/src/main/java/de/danoeh/antennapod/view/ChapterSeekBar.java
Outdated
Show resolved
Hide resolved
Sure! But it could take a while (I'm a bit busy right now)
Made it smaller. I think if it is even smaller, it could be too small for someone.
Thought about that too. Would be pretty nice :D |
Made a first implementation of it. I need to do a bit more testing (and maybe change the colors and some other things), but I think it should be all right. Something I thought about while doing this: What about having a small delay, something of a snap whenever you get to a chapter mark while dragging. This could be a solution for the UI problems in #4898 (and would somehow deprecate it). I'll continue to work on #4898 soon, when this is resolved. |
Nice work! I will have a closer look soon. I think this change should go into AntennaPod 2.3.x (together with #4898). Version 2.2.x already has some nice new features and now that the 2.1.3 bugfix is released, we can start the 2.2.x beta releases soon.
Not sure if that will work for average episodes. Some of the podcasts I am listening to use a huge number of chapters. Navigating with the snappy slider could get pretty fiddly/annoying there. |
Looks good to me. Ready for merging? |
I'm ready :D |
Nice! This change will be released in AntennaPod 2.3.x 2.2.x beta releases will start soon. |
While playing around with #5075, I found 3 issues with the chapters in the SeekBar.
|
Thanks for sharing! I'll look into it as soon as possible. |
This pull request has been mentioned on AntennaPod Forum. There might be relevant details there: https://forum.antennapod.org/t/antennapod-2-3-0-release-notes/1047/1 |
The chapter dividers proposed by @ByteHamster in #4898.
To make things easier, I've introduced a new class called
ChapterSeekBar
, inheriting fromAppCompatSeekBar
, in which the elements (progress bar, chapter dividers and thumb) are drawn in the correct order. Unfortunately, I had to disable the drop shadow by the thumb as it gets drawn under the progress bar. I found no way to change this for now.Screenshot