public interface

TimeBar.OnScrubListener

 androidx.media3.ui.TimeBar.OnScrubListener

Overview

Listener for scrubbing events.

Summary

Methods
public voidonScrubMove(TimeBar timeBar, long position)

Called when the user moves the scrubber.

public voidonScrubStart(TimeBar timeBar, long position)

Called when the user starts moving the scrubber.

public voidonScrubStop(TimeBar timeBar, long position, boolean canceled)

Called when the user stops moving the scrubber.

Methods

public void onScrubStart(TimeBar timeBar, long position)

Called when the user starts moving the scrubber.

Parameters:

timeBar: The time bar.
position: The scrub position in milliseconds.

public void onScrubMove(TimeBar timeBar, long position)

Called when the user moves the scrubber.

Parameters:

timeBar: The time bar.
position: The scrub position in milliseconds.

public void onScrubStop(TimeBar timeBar, long position, boolean canceled)

Called when the user stops moving the scrubber.

Parameters:

timeBar: The time bar.
position: The scrub position in milliseconds.
canceled: Whether scrubbing was canceled.