开发者

How to set Zoom in Camera of HTC Sensation?

public void setZoomIn(){
    try{
        params = camera.getParameters();
        zoomValue +=5;
        params.setZoom(zoomValue);
        camera.setParameters(params);
        Log.d(TAG, "Is support Zoom " + params.isZoomSupported());
    }catch (Exception e) {
        e.printStackTrace();
    }
}

Hi all, the code above successfully set zoom on Camera of Samsung, LG Phone. However, it crashes with HTC Sensation. In HTC Sensation, the default camera application run zoom function开发者_如何学Go wonderfully. I don't know why? Please help me. Thank you so much.


Should you not be checking for the zoom support before you set it?

And in addition check the max zoom limit that the device supports by using 'getMaxZoom()'. This value should act as the upper limit for your set call.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜