I am developing the camera module for an android application. In main application when user clicks on 'take picture' button, new view with SurfaceView control is opened and camera preview is shown. When users click on dpad center, camera takes picture and save it to the disc. Pretty simple and straightforward.
Everyth开发者_开发知识库ing works fine on my device - HTC Tattoo, minsdkversion 1.6
...but when I tested application on HTC Hero minsdkversion 1.5, when camera preview is shown,some strange lines occur.
Anyone has idea what is going on?
p.s. altough preview is crashed, taking of pictures works fine
here is the picturealt text http://img163.imageshack.us/img163/4088/camerademo.jpg:
Thanx Marko
Apparently this is hero bug, in function surfaceChanged switch width and height parameters:
if (getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT)
{
parameters.setPreviewSize(h, w); //instead of w,h
}
精彩评论