¡@

Home 

2014/10/16 ¤W¤È 08:25:29

android Programming Glossary: surface.rotation_90

How do I get the CURRENT orientation (ActivityInfo.SCREEN_ORIENTATION_*) of an Android device?

http://stackoverflow.com/questions/10380989/how-do-i-get-the-current-orientation-activityinfo-screen-orientation-of-an-a

rotation Surface.ROTATION_180 height width rotation Surface.ROTATION_90 rotation Surface.ROTATION_270 width height switch rotation.. ActivityInfo.SCREEN_ORIENTATION_PORTRAIT break case Surface.ROTATION_90 orientation ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE break.. ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE break case Surface.ROTATION_90 orientation ActivityInfo.SCREEN_ORIENTATION_PORTRAIT break..

Android Camera Preview Rotation

http://stackoverflow.com/questions/10385147/android-camera-preview-rotation

rotation case Surface.ROTATION_0 degrees 0 break case Surface.ROTATION_90 degrees 90 break case Surface.ROTATION_180 degrees 180 break..

EXIF orientation tag value always 0 for image taken with portrait camera app android

http://stackoverflow.com/questions/13245556/exif-orientation-tag-value-always-0-for-image-taken-with-portrait-camera-app-and

rotation case Surface.ROTATION_0 degrees 0 break case Surface.ROTATION_90 degrees 90 break case Surface.ROTATION_180 degrees 180 break..

Android Compass that can Compensate for Tilt and Pitch

http://stackoverflow.com/questions/16317599/android-compass-that-can-compensate-for-tilt-and-pitch

case Surface.ROTATION_0 screen_adjustment 0 break case Surface.ROTATION_90 screen_adjustment float Math.PI 2 break case Surface.ROTATION_180..

Rotating phone quickly 180 degrees, camera preview turns upside down

http://stackoverflow.com/questions/19532599/rotating-phone-quickly-180-degrees-camera-preview-turns-upside-down

Surface.ROTATION_0 degrees 0 Constant.result 0 break case Surface.ROTATION_90 degrees 90 Constant.result 90 break case Surface.ROTATION_180..

Camera preview on Android - strange on Samsung Galaxy S

http://stackoverflow.com/questions/3213741/camera-preview-on-android-strange-on-samsung-galaxy-s

Camera.open Surface.setOrientation Display.DEFAULT_DISPLAY Surface.ROTATION_90 Parameters p camera.getParameters p.setPictureSize IMAGE_WIDTH..

Android - Camera preview is sideways

http://stackoverflow.com/questions/3841122/android-camera-preview-is-sideways

mCamera.setDisplayOrientation 90 if display.getRotation Surface.ROTATION_90 parameters.setPreviewSize width height if display.getRotation..

How to check device natural (default) orientation on Android (i.e. get landscape for e.g., Motorola Charm or Flipout)

http://stackoverflow.com/questions/4553650/how-to-check-device-natural-default-orientation-on-android-i-e-get-landscape

Configuration.ORIENTATION_LANDSCAPE rotation Surface.ROTATION_90 rotation Surface.ROTATION_270 config.orientation Configuration.ORIENTATION_PORTRAIT..

how to detect orientation of android device?

http://stackoverflow.com/questions/5112118/how-to-detect-orientation-of-android-device

The returned value may be Surface.ROTATION_0 no rotation Surface.ROTATION_90 Surface.ROTATION_180 or Surface.ROTATION_270 . For example if.. orientation the value returned here may be either Surface.ROTATION_90 or Surface.ROTATION_270 depending on the direction it was turned... degrees clockwise and thus the returned value here will be Surface.ROTATION_90 . Keep in mind that getRotation was introduced from Android..

Screen orientation lock

http://stackoverflow.com/questions/6599770/screen-orientation-lock

.getOrientation if rotation Surface.ROTATION_0 rotation Surface.ROTATION_90 if orientation Configuration.ORIENTATION_PORTRAIT setRequestedOrientation.. .getDefaultDisplay .getRotation if rotation android.view.Surface.ROTATION_90 rotation android.view.Surface.ROTATION_180 setRequestedOrientation.. android.view.Surface.ROTATION_0 rotation android.view.Surface.ROTATION_90 setRequestedOrientation ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE..

Android natural sensor orientation help

http://stackoverflow.com/questions/6605986/android-natural-sensor-orientation-help

y SensorManager.AXIS_Y switch display.getRotation case Surface.ROTATION_90 x SensorManager.AXIS_Y y SensorManager.AXIS_MINUS_X break..

Android Camera will not work. startPreview fails

http://stackoverflow.com/questions/7942378/android-camera-will-not-work-startpreview-fails

mCamera.setDisplayOrientation 90 break case Surface.ROTATION_90 previewWidth mPreviewSize.width previewHeight mPreviewSize.height..

How do I get the CURRENT orientation (ActivityInfo.SCREEN_ORIENTATION_*) of an Android device?

http://stackoverflow.com/questions/10380989/how-do-i-get-the-current-orientation-activityinfo-screen-orientation-of-an-a

natural orientation is portrait if rotation Surface.ROTATION_0 rotation Surface.ROTATION_180 height width rotation Surface.ROTATION_90 rotation Surface.ROTATION_270 width height switch rotation case Surface.ROTATION_0 orientation ActivityInfo.SCREEN_ORIENTATION_PORTRAIT.. height switch rotation case Surface.ROTATION_0 orientation ActivityInfo.SCREEN_ORIENTATION_PORTRAIT break case Surface.ROTATION_90 orientation ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE break case Surface.ROTATION_180 orientation ActivityInfo.SCREEN_ORIENTATION_REVERSE_PORTRAIT.. else switch rotation case Surface.ROTATION_0 orientation ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE break case Surface.ROTATION_90 orientation ActivityInfo.SCREEN_ORIENTATION_PORTRAIT break case Surface.ROTATION_180 orientation ActivityInfo.SCREEN_ORIENTATION_REVERSE_LANDSCAPE..

Android Camera Preview Rotation

http://stackoverflow.com/questions/10385147/android-camera-preview-rotation

.getDefaultDisplay .getRotation int degrees 0 switch rotation case Surface.ROTATION_0 degrees 0 break case Surface.ROTATION_90 degrees 90 break case Surface.ROTATION_180 degrees 180 break case Surface.ROTATION_270 degrees 270 break int result if info.facing..

EXIF orientation tag value always 0 for image taken with portrait camera app android

http://stackoverflow.com/questions/13245556/exif-orientation-tag-value-always-0-for-image-taken-with-portrait-camera-app-and

if Integer.parseInt Build.VERSION.SDK 8 int degrees 0 switch rotation case Surface.ROTATION_0 degrees 0 break case Surface.ROTATION_90 degrees 90 break case Surface.ROTATION_180 degrees 180 break case Surface.ROTATION_270 degrees 270 break int result..

Android Compass that can Compensate for Tilt and Pitch

http://stackoverflow.com/questions/16317599/android-compass-that-can-compensate-for-tilt-and-pitch

.getRotation float screen_adjustment 0 switch rotation case Surface.ROTATION_0 screen_adjustment 0 break case Surface.ROTATION_90 screen_adjustment float Math.PI 2 break case Surface.ROTATION_180 screen_adjustment float Math.PI break case Surface.ROTATION_270..

Rotating phone quickly 180 degrees, camera preview turns upside down

http://stackoverflow.com/questions/19532599/rotating-phone-quickly-180-degrees-camera-preview-turns-upside-down

.getRotation int degrees 0 switch rotation case Surface.ROTATION_0 degrees 0 Constant.result 0 break case Surface.ROTATION_90 degrees 90 Constant.result 90 break case Surface.ROTATION_180 degrees 180 Constant.result 180 break case Surface.ROTATION_270..

Camera preview on Android - strange on Samsung Galaxy S

http://stackoverflow.com/questions/3213741/camera-preview-on-android-strange-on-samsung-galaxy-s

public void surfaceCreated SurfaceHolder holder camera Camera.open Surface.setOrientation Display.DEFAULT_DISPLAY Surface.ROTATION_90 Parameters p camera.getParameters p.setPictureSize IMAGE_WIDTH IMAGE_HEIGHT p.set ORIENTATION PORTRAIT p.set ROTATION 90..

Android - Camera preview is sideways

http://stackoverflow.com/questions/3841122/android-camera-preview-is-sideways

Surface.ROTATION_0 parameters.setPreviewSize height width mCamera.setDisplayOrientation 90 if display.getRotation Surface.ROTATION_90 parameters.setPreviewSize width height if display.getRotation Surface.ROTATION_180 parameters.setPreviewSize height..

How to check device natural (default) orientation on Android (i.e. get landscape for e.g., Motorola Charm or Flipout)

http://stackoverflow.com/questions/4553650/how-to-check-device-natural-default-orientation-on-android-i-e-get-landscape

Surface.ROTATION_0 rotation Surface.ROTATION_180 config.orientation Configuration.ORIENTATION_LANDSCAPE rotation Surface.ROTATION_90 rotation Surface.ROTATION_270 config.orientation Configuration.ORIENTATION_PORTRAIT return Configuration.ORIENTATION_LANDSCAPE..

how to detect orientation of android device?

http://stackoverflow.com/questions/5112118/how-to-detect-orientation-of-android-device

the rotation of the screen from its natural orientation. The returned value may be Surface.ROTATION_0 no rotation Surface.ROTATION_90 Surface.ROTATION_180 or Surface.ROTATION_270 . For example if a device has a naturally tall screen and the user has turned.. screen and the user has turned it on its side to go into a landscape orientation the value returned here may be either Surface.ROTATION_90 or Surface.ROTATION_270 depending on the direction it was turned. The angle is the rotation of the drawn graphics on the.. clockwise to compensate rendering will be rotated by 90 degrees clockwise and thus the returned value here will be Surface.ROTATION_90 . Keep in mind that getRotation was introduced from Android 2.2. Use getOrientation if your target are older devices. share..

Screen orientation lock

http://stackoverflow.com/questions/6599770/screen-orientation-lock

final int rotation getWindowManager .getDefaultDisplay .getOrientation if rotation Surface.ROTATION_0 rotation Surface.ROTATION_90 if orientation Configuration.ORIENTATION_PORTRAIT setRequestedOrientation ActivityInfo.SCREEN_ORIENTATION_PORTRAIT else.. else int rotation getWindowManager .getDefaultDisplay .getRotation if rotation android.view.Surface.ROTATION_90 rotation android.view.Surface.ROTATION_180 setRequestedOrientation ActivityInfo.SCREEN_ORIENTATION_REVERSE_PORTRAIT else.. getWindowManager .getDefaultDisplay .getRotation if rotation android.view.Surface.ROTATION_0 rotation android.view.Surface.ROTATION_90 setRequestedOrientation ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE else setRequestedOrientation ActivityInfo.SCREEN_ORIENTATION_REVERSE_LANDSCAPE..

Android natural sensor orientation help

http://stackoverflow.com/questions/6605986/android-natural-sensor-orientation-help

display wm.getDefaultDisplay int x SensorManager.AXIS_X int y SensorManager.AXIS_Y switch display.getRotation case Surface.ROTATION_90 x SensorManager.AXIS_Y y SensorManager.AXIS_MINUS_X break case Surface.ROTATION_180 y SensorManager.AXIS_MINUS_Y break..

Android Camera will not work. startPreview fails

http://stackoverflow.com/questions/7942378/android-camera-will-not-work-startpreview-fails

previewWidth mPreviewSize.height previewHeight mPreviewSize.width mCamera.setDisplayOrientation 90 break case Surface.ROTATION_90 previewWidth mPreviewSize.width previewHeight mPreviewSize.height break case Surface.ROTATION_180 previewWidth mPreviewSize.height..