时间:2021-07-08 14:49:33 | 栏目:Android代码 | 点击:次
1、添加Camera权限
2、判断是否支持变焦
int zoomValue = params.getZoom();
Trace.Log("-----------------MAX:"+MAX+" params : "+zoomValue);
zoomValue += 5;
params.setZoom(zoomValue);
mCamera.setParameters(params);
Trace.Log("Is support Zoom " + params.isZoomSupported());
}
catch (Exception e)
{
Trace.Log("--------exception zoom");
e.printStackTrace();
}
}
else
{
Trace.Log("--------the phone not support zoom");
}
}