SurfaceView display size is half for portrait
I have created simple android application to test the camera functionality. When I set the display orientation to 'portrait', it open the ca开发者_C百科mera in half of the screen on version 2.1. my requirement is to open the camera on full screen.
Intent i8 = new Intent("android.media.action.IMAGE_CAPTURE");
activity.startActivity(i8);
Android 2.1 supports a Camera SurfaceView for landscape mode ONLY.
If you want to use in portrait mode, you will have to either:
(a) Rotate your icons and set up the UI in landscape mode (so that the UI looks as if it was set up for portrait mode) keeping the display orientation as landscape.
or
(b) Use portrait mode in Android 2.2, and then use setDisplayOrientation to correct the display. This function is available in Android 2.2 and above only.
精彩评论