Personalice la apariencia de la interfaz VideoView de Android

How can I customize the look and feel of VideoView interface in Android? I'd especially like to replace the progress bar, yellow background and media(pause/play) buttons with my own.

XML

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">

<VideoView
  android:id="@+id/surface_view"
  android:layout_width="320px"
  android:layout_height="240px"/>
</LinearLayout>

Código

public class VideoViewExample extends Activity {
   private VideoView mVideoView;

   @Override
   public void onCreate(Bundle icicle) {
     super.onCreate(icicle);
     setContentView(R.layout.main);
     mVideoView = (VideoView) findViewById(R.id.surface_view);
     mVideoView.setVideoURI(Uri.parse("android.resource://" + getPackageName() +"/"+R.raw.sm));
     mVideoView.setMediaController(new MediaController(this));
     mVideoView.requestFocus();
     mVideoView.start();
   }
}

preguntado el 28 de agosto de 11 a las 03:08

1 Respuestas

I'd especially like to replace the progress bar, yellow background and media(pause/play) buttons with my own.

That is not "the VideoView user interface". That is the MediaController. It may be possible to style the MediaController, though I just elected to replace it the last time I encountered this issue.

Respondido 28 ago 11, 12:08

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.