How to set few fragment be landscape mode and rest should be portrait in android?

I have an application in which activity and fragment, I have declared in the manifest for activity but for fragment I want landscape mode it working but after Java code all layout also changes in landscape mode I want on few fragment layout should be landscape and rest will be in portrait mode.

public class CustomizeFragment extends Fragment implements View.OnKeyListener, View.OnClickListener, StringConstants, BundleConstants, NetConstants, AlertDFragment.AlertListener {
    private int   mAlertIdentifier;
    private String TAG = CustomizeFragment.class.getSimpleName();

public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
    View rootView = inflater.inflate(R.layout.activity_customize, container, false);
  //  getActivity().setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);


add all fragment “layout-land” folder which display in landscape and all fragment “layout-port” that display on potrait mode