I am using the API 2.1 and my debug shows a max zoom value of 15. The code here does not make the camera zoom. How do I get the camera to zoom?
camera = Came
Your samples about zooming is work, thanks a lot.
This is my code :
zooming = (ZoomControls) findViewById(R.id.zooming);
zooming.setOnZoomInClickListener(new OnClickListener() {
public void onClick(View v) {
Camera.Parameters p = mCamera.getParameters();
int maxZoom = p.getMaxZoom();
if (p.isZoomSupported()) {
zoom += 10;
if (zoom > maxZoom) {
zoom -= 10;
}
p.setZoom(zoom);
}
mCamera.setParameters(p);
try {
mCamera.setPreviewDisplay(mSurfaceHolder);
} catch (Exception e) { }
mCamera.startPreview();
}
});
I hope your application is working too.