android Programming Glossary: previewwidth
Fitting a camera preview to a SurfaceView larger than the display http://stackoverflow.com/questions/11321251/fitting-a-camera-preview-to-a-surfaceview-larger-than-the-display getChildAt 0 final int width r l final int height b t int previewWidth width int previewHeight height if mPreviewSize null previewWidth.. width int previewHeight height if mPreviewSize null previewWidth mPreviewSize.width previewHeight mPreviewSize.height Center.. within the parent. if width previewHeight height previewWidth final int scaledChildWidth previewWidth height previewHeight..
Android Camera will not work. startPreview fails http://stackoverflow.com/questions/7942378/android-camera-will-not-work-startpreview-fails final int width right left final int height bottom top int previewWidth width int previewHeight height if mPreviewSize null Display.. switch display.getRotation case Surface.ROTATION_0 previewWidth mPreviewSize.height previewHeight mPreviewSize.width mCamera.setDisplayOrientation.. 90 break case Surface.ROTATION_90 previewWidth mPreviewSize.width previewHeight mPreviewSize.height break..
Fitting a camera preview to a SurfaceView larger than the display http://stackoverflow.com/questions/11321251/fitting-a-camera-preview-to-a-surfaceview-larger-than-the-display t int r int b if changed getChildCount 0 final View child getChildAt 0 final int width r l final int height b t int previewWidth width int previewHeight height if mPreviewSize null previewWidth mPreviewSize.width previewHeight mPreviewSize.height .. 0 final int width r l final int height b t int previewWidth width int previewHeight height if mPreviewSize null previewWidth mPreviewSize.width previewHeight mPreviewSize.height Center the child SurfaceView within the parent. if width previewHeight.. previewHeight mPreviewSize.height Center the child SurfaceView within the parent. if width previewHeight height previewWidth final int scaledChildWidth previewWidth height previewHeight child.layout width scaledChildWidth 2 0 width scaledChildWidth..
Android Camera will not work. startPreview fails http://stackoverflow.com/questions/7942378/android-camera-will-not-work-startpreview-fails int bottom if changed final View cameraView getChildAt 0 final int width right left final int height bottom top int previewWidth width int previewHeight height if mPreviewSize null Display display WindowManager mContext.getSystemService Context.WINDOW_SERVICE.. Context.WINDOW_SERVICE .getDefaultDisplay switch display.getRotation case Surface.ROTATION_0 previewWidth mPreviewSize.height previewHeight mPreviewSize.width mCamera.setDisplayOrientation 90 break case Surface.ROTATION_90.. 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..
|