Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

redraw MediaController controls

Is their a way to redraw the MediaController controls when rotating the device? I am already overriding the onConfigurationChanged() method. I just don't know of the method to redraw the controls.

The reason for me wanting to do this is when I rotate, the controls dont resize to the screen width until they disappear and come back (tap the video again).

like image 459
Ronnie Avatar asked Feb 27 '26 22:02

Ronnie


1 Answers

What I would try (having no experience with MediaController, admittedly) is something like this:

MediaController mController = (MediaController)findViewById(R.id.mController);
mController.invalidate();
//next line may not be necessary
mController.show(some integer value here);

You might just be able to call mController.show() and it redraw it.

like image 52
Kevin Coppock Avatar answered Mar 02 '26 13:03

Kevin Coppock



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!