标签:android gridview android 特效 listview menu
完整阅读软件客户端app,本项目里面还有扫描功能,搜索本地书籍,不过扫码功能通过c++层实现的。
本项目来自:https://github.com/JayFang1993/ScanBook
CaptureActivity主要是摄像头相关类,CaptureActivityHandler所有扫描消息都发到这个Handler类中
部分代码如下:
private void initCamera(SurfaceHolder surfaceHolder) {
try {
CameraManager.get().openDriver(surfaceHolder);
} catch (IOException ioe) {
return;
} catch (RuntimeException e) {
return;
}
if (handler == null) {
handler = new CaptureActivityHandler(this, decodeFormats,characterSet);
}
}
public void surfaceChanged(SurfaceHolder holder, int format, int width,
int height) {
}
public void surfaceCreated(SurfaceHolder holder) {
if (!hasSurface) {
hasSurface = true;
initCamera(holder);
}
}
public void surfaceDestroyed(SurfaceHolder holder) {
hasSurface = false;
}
标签:android gridview android 特效 listview menu
原文地址:http://10716910.blog.51cto.com/10706910/1711396