1

Am I missing something? Once I play a video using videoview, I cannot see the current time of the video on the media controller. (Running app on a ICS device, there is no time; however on a Honeycomb device there is time)

Code:

    @Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    VideoView videoView = (VideoView) findViewById(R.id.videoView);
    // Use a media controller so that you can scroll the video contents
    // and also to pause, start the video.
    MediaController mediaController = new MediaController(this);
    mediaController.setAnchorView(videoView);
    videoView.setMediaController(mediaController);
    videoView
            .setVideoURI(Uri
                    .parse("rtsp://v6.cache5.c.youtube.com/CiILENy73wIaGQmCZld_oqDeJhMYDSANFEgGUgZ2aWRlb3MM/0/0/0/video.3gp"));
    videoView.start();

}

Actually I noticed the time is there but it's so dim and I cannot see it. Is there any way that I can change the theme of the media controller?

Saeid Farivar
  • 1,667
  • 24
  • 43

1 Answers1

2

The answer is kind of general to all of the controllers such a mediacontroller, dialog, toast, etc. you can use ContextThemeWrapper:

instead of: MediaController mediaController = new MediaController(this);

you can use: MediaController mediaController = new MediaController(new ContextThemeWrapper(this,R.style.CustomTheme));

Saeid Farivar
  • 1,667
  • 24
  • 43