I am doing a video player application and want to add full screen feature. Currently I am using a layout like youtube's and my video is playing in a videoView
and it is completely alright.
I want to toggle the orientation of this videoView
and stretch it to make it full screen.
Here what I have tried;
((ViewManager)VideoView.getParent()).removeView(VideoView);
frameLayout.addView(VideoView);
- I have wrapped my layout with Frame Layout
- I removed my 'VideoView" and add it to the Frame Layout
I berely achieved the result but in this case video is stopping. It's like all the VideoView
became useless. When I remove it, it tries to send message to a Handler on a dead thread and stops working.
My question is,
Is there any way to change the parent of a view without removing it? or Is there a better option to make this view full screen?
Note: The type of this VideoView is Exo Media Video View, I used the library below https://github.com/brianwernick/ExoMedia