hi dear developer, I am looking way for play video in landscape mode like (youtube) when click expand to view in full screen even though current page is set up in portrait mode (set in manifest). Below here sample code that i get :
`((ViewGroup) mExoPlayerView.getParent()).removeView(mExoPlayerView);
LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
rowView = inflater.inflate(R.layout.bg_black_video, null);
mFullScreenDialog.addContentView(rowView,
new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
mFullScreenDialog.addContentView(mExoPlayerView,
new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
mFullScreenIcon.setImageDrawable(ContextCompat.getDrawable(getActivity(), R.drawable.ic_fullscreen_skrink));
mExoPlayerFullscreen = true;
getActivity().setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);`
For your information, I don't want to use dialog rather than to use root view. Please help me out to solve this problem.
The correct way to do this is to rotate the activity into landscape when the user presses the button. This is what YouTube does. You can find some information on how to do it here. Further questions about using that functionality should be sent to StackOverflow, since this is not ExoPlayer specific.
Most helpful comment
The correct way to do this is to rotate the activity into landscape when the user presses the button. This is what YouTube does. You can find some information on how to do it here. Further questions about using that functionality should be sent to StackOverflow, since this is not ExoPlayer specific.