Reputation: 1335
I am looking for any sugestion how to change Fragment from portrait orientation to landscape.
My application is always in portrait mode, I need change only one fragment.
Upvotes: 0
Views: 65
Reputation: 3338
Use this line in the fragments you want to change and it should do the trick
getActivity().setRequestedOrientation(
ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
Upvotes: 0
Reputation: 1289
You can specify orientation for the activity holding the fragment in manifest
android:screenOrientation="landscape"
Upvotes: 1