-
-
Notifications
You must be signed in to change notification settings - Fork 544
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
Add Rewind & FastForward buttons to AudioNowPlayingFragment #4503
base: master
Are you sure you want to change the base?
Conversation
@@ -161,13 +161,27 @@ | |||
android:layout_height="28sp" | |||
android:src="@drawable/ic_previous" /> | |||
|
|||
<ImageButton |
Check warning
Code scanning / Android Lint
Image without contentDescription Warning
<ImageButton | ||
android:id="@+id/playPauseBtn" | ||
style="@style/Button.Icon" | ||
android:layout_width="28sp" | ||
android:layout_height="28sp" | ||
android:src="@drawable/ic_pause" /> | ||
|
||
<ImageButton |
Check warning
Code scanning / Android Lint
Image without contentDescription Warning
|
||
val prefs = get<UserSettingPreferences>(UserSettingPreferences::class.java) | ||
val amount = prefs.get<Int>(skipBackLength); | ||
playbackManager.state.seek( | ||
playbackManager.state.positionInfo.active - amount.toDuration(DurationUnit.MILLISECONDS), | ||
) |
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.
Should use the PlayerState rewind function
val prefs = get<UserSettingPreferences>(UserSettingPreferences::class.java) | ||
val amount = prefs.get<Int>(skipForwardLength); | ||
playbackManager.state.seek( | ||
playbackManager.state.positionInfo.active + amount.toDuration(DurationUnit.MILLISECONDS), | ||
) |
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.
Should use the PlayerState fastForward function
Changes
Added rewind and fast-forward buttons to to AudioNowPlayingFragment. These allow the user to seek audio content forward and backward by a predefined duration using the UI.
Issues