mirror of
https://github.com/androidx/media.git
synced 2025-05-10 00:59:51 +08:00
Expose current scrubber position through onScrubStart
Issue: #2910 ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=158149904
This commit is contained in:
parent
1ac8420b7f
commit
fb7cb507ea
@ -442,7 +442,7 @@ public class DefaultTimeBar extends View implements TimeBar {
|
|||||||
parent.requestDisallowInterceptTouchEvent(true);
|
parent.requestDisallowInterceptTouchEvent(true);
|
||||||
}
|
}
|
||||||
if (listener != null) {
|
if (listener != null) {
|
||||||
listener.onScrubStart(this);
|
listener.onScrubStart(this, getScrubberPosition());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -875,7 +875,7 @@ public class PlaybackControlView extends FrameLayout {
|
|||||||
OnClickListener {
|
OnClickListener {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onScrubStart(TimeBar timeBar) {
|
public void onScrubStart(TimeBar timeBar, long position) {
|
||||||
removeCallbacks(hideAction);
|
removeCallbacks(hideAction);
|
||||||
scrubbing = true;
|
scrubbing = true;
|
||||||
}
|
}
|
||||||
|
@ -95,8 +95,9 @@ public interface TimeBar {
|
|||||||
* Called when the user starts moving the scrubber.
|
* Called when the user starts moving the scrubber.
|
||||||
*
|
*
|
||||||
* @param timeBar The time bar.
|
* @param timeBar The time bar.
|
||||||
|
* @param position The position of the scrubber, in milliseconds.
|
||||||
*/
|
*/
|
||||||
void onScrubStart(TimeBar timeBar);
|
void onScrubStart(TimeBar timeBar, long position);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when the user moves the scrubber.
|
* Called when the user moves the scrubber.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user