 <p>Orientation attribute is per activity so you can declare the orientation for only the activity that contains the fragment so that it is in landscape and the rest of the activities will remain as they are.</p> <p>So you need set orientation in onCreateView of each fragment Plse Check below code:</p> <p>FragmentA </p> <pre><code> public class FragmentA extends Fragment { @Override public View onCreateView(LayoutInflater inflater,ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.fragment_a, container, false); changeFragmentOrientation(); return view; } } public void changeFragmentOrientation(){ getActivity().setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE); } </code></pre> <p>FragmentB</p> <pre><code>public class FragmentB extends Fragment { @Override public View onCreateView(LayoutInflater inflater,ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.fragment_b, container, false); changeFragmentOrientation(); return view; } } public void changeFragmentOrientation(){ getActivity().setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE); } </code></pre>