Android: Screen Orientation/Rotation for Camera Preview
I have created a camera app and I want my app to be turned in all 4 possible orientations and the to update the camera preview accordingly. for that I have used the following method I have copied from: Android - Camera preview is sideways public void updateCameraDisplay(int w, int h) { // set preview size and make any resize, rotate or // reformatting changes here Log.i("CameraPreviews", "Updating camera orientation with w=" + w + " and h=" + h); Parameters parameters = camera.getParameters(); Display display = getActivity().getWindowManager() .getDefaultDisplay(); int rotation = getActivity()
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.