In my activity, I show a camera preview on the surface of the View. It works great on Nexus One and HTC Desire, but on Samsung Galaxy S I see weird lines, weird proportions and all three times. see screenshot below.
The problem seems to be similar to this: camera preview on Android - strange lines on 1.5 sdk version but none of the comments there helped. I tried to change the height, width for the camera settings, but not a very big difference.
(Lateral note: my activity is always in landscape mode, fixed. I have this fix in my manifest as screenOrientation parameters, in case it matters).
Code of my SurfaceHolderCallback (corresponding inner class in my activity):
class SurfaceHolderCallback implements SurfaceHolder.Callback { private static final int IMAGE_WIDTH = 512; private static final int IMAGE_HEIGHT = 384; private static final String ORIENTATION = "orientation"; private static final String ROTATION = "rotation"; private static final String PORTRAIT = "portrait"; private static final String LANDSCAPE = "landscape"; public void surfaceCreated(SurfaceHolder holder) { camera = Camera.open();

source share