请教各位,在Android相机(Camera)里怎么获取用户自定义调节远近焦距的参数并拿到数据,谢谢大家!
还有就是,手机在照相时有两个按钮可以调距离的远近,那是怎么实现的,是不是有个什么方法?
------解决方案--------------------
Camera.Parameters parameters = myCamera.getParameters();
parameters.setFocusMode("macro"); <---这里设置
myCamera.setParameters(parameters);
/**
* Auto-focus mode.
*/
public static final String FOCUS_MODE_AUTO = "auto";
/**
* Focus is set at infinity. Applications should not call
* [email protected] #autoFocus(AutoFocusCallback)} in this mode.
*/
public static final String FOCUS_MODE_INFINITY = "infinity";
public static final String FOCUS_MODE_MACRO = "macro";