Ronnie
Ronnie

Reputation: 11198

Rotating video messes up MediaControls, android

When I rotate my device, the video controls dont resize properly. I made a video of what I am talking about here: http://www.youtube.com/watch?v=FgRythmUo3A

Is there a way to "redraw" the controls?

I made this change to my manifest so I could control what happens when it rotates:

<activity android:name="Vforum" android:configChanges="orientation"></activity>

Then my java, I override the onConfigurationChanged() method:

@Override
public void onConfigurationChanged(Configuration newConfig)
{
    super.onConfigurationChanged(newConfig);
    // redraw controls
}

any ideas?

Upvotes: 2

Views: 541

Answers (2)

renam.antunes
renam.antunes

Reputation: 770

You should save the player position and recreate the player with the saved position. That's what I've done in a couple of projects and it seems to work.

Fildor's link should help you with that.

Upvotes: 1

Fildor
Fildor

Reputation: 16059

We need more Info from you here, Mike and/or Ronnie. First of all, answering mice's questions would be helpful for helpers to help :)

Maybe you should also post the layout - xml. Perhaps there is only a setting you shouldn't have made in the first place.

A little search brought this up: Android VideoView orientation change with buffered video

Maybe that one will give you some hints.

Upvotes: 1

Related Questions