MediaController

Class of android.widget · MediaController.java · Android's reference

public class MediaController extends FrameLayout

MediaController ← FrameLayout ← ViewGroup ← View

The controls of a media player: play, pause and seek. On Android they show in a window over the anchor view. The runtime has no such window, so the controller keeps its state and the app drives the player.

Nested types

Constructors

public MediaController(Context context, AttributeSet attrs) source
public MediaController(Context context, boolean useFastForward) source
public MediaController(Context context) source

Methods

public void setMediaPlayer(MediaPlayerControl player) source
public void setAnchorView(View view) empty body source
public void show() source
public void show(int timeout) source

Shows the controls; they hide after the timeout, or stay until hide() when the timeout is 0.

public boolean isShowing() source
public void hide() source
public void setPrevNextListeners(View.OnClickListener next, View.OnClickListener prev) empty body source
public boolean onTouchEvent(MotionEvent event) source
public CharSequence getAccessibilityClassName() source

Made from ScarletNX's Sail at 166ad3910f80. The framework is ScarletNX's (GPL-3.0-or-later); the parts that follow the Android Open Source Project's sources (Apache-2.0) say so in their files.