I have VideoView
(with streaming online video) and I wanted it to continue playing while changing orientation, so I looked around at SO and found that you need to handle orientation change yourself, well ok, I added android:configChanges="orientation|keyboardHidden"
to manifest, and everything worked as intended. But. Only if you dont have different layouts for portrait and landscape orientations.
So how do I handle VideoView
in this case? I dont see a way to preserve it, because I have to set new layout in onConfigurationChanged()
. Or maybe there is another way? I thought about retaining position at video, and then seekTo()
, but how do I avoid rebuffering in this case?
Ok, they only way I found is to actually remake existing layout on configuration change, using LayoutParameters. Not really a good idea, to be honest.