¡@

Home 

2014/10/16 ¤W¤È 08:11:24

android Programming Glossary: constant.result

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

data data Bitmap bitmapPicture BitmapFactory.decodeByteArray data 0 data.length bfo Matrix matrix new Matrix if Constant.result 180 matrix.postRotate 270 if Constant.result 270 matrix.postRotate 180 int height bitmapPicture.getHeight int width.. data 0 data.length bfo Matrix matrix new Matrix if Constant.result 180 matrix.postRotate 270 if Constant.result 270 matrix.postRotate 180 int height bitmapPicture.getHeight int width bitmapPicture.getWidth Bitmap scaledBitmap Bitmap.createScaledBitmap.. .getDefaultDisplay .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..