Lock CameraX fragment to portrait.
This commit is contained in:
parent
5f7b07147f
commit
caf1329005
1 changed files with 1 additions and 2 deletions
|
@ -131,7 +131,6 @@ public class CameraXFragment extends LoggingFragment implements CameraFragment {
|
|||
@Override
|
||||
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
|
||||
ViewGroup cameraParent = view.findViewById(R.id.camerax_camera_parent);
|
||||
requireActivity().setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR);
|
||||
|
||||
this.previewView = view.findViewById(R.id.camerax_camera);
|
||||
this.controlsContainer = view.findViewById(R.id.camerax_controls_container);
|
||||
|
@ -171,7 +170,7 @@ public class CameraXFragment extends LoggingFragment implements CameraFragment {
|
|||
super.onResume();
|
||||
|
||||
cameraController.bindToLifecycle(getViewLifecycleOwner());
|
||||
requireActivity().setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR);
|
||||
requireActivity().setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Add table
Reference in a new issue