本文整理汇总了Java中zxing.view.ViewfinderView类的典型用法代码示例。如果您正苦于以下问题:Java ViewfinderView类的具体用法?Java ViewfinderView怎么用?Java ViewfinderView使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ViewfinderView类属于zxing.view包,在下文中一共展示了ViewfinderView类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onResume
import zxing.view.ViewfinderView; //导入依赖的package包/类
/**
* 主要对相机进行初始化工作
*/
@Override
protected void onResume() {
super.onResume();
inactivityTimer.onActivity();
viewfinderView = (ViewfinderView) findViewById(R.id.viewfinder_view);
viewfinderView.setCameraManager(cameraManager);
surfaceHolder = surfaceView.getHolder();
setScanType();
resetStatusView();
if (hasSurface) {
initCamera(surfaceHolder);
} else {
// 如果SurfaceView已经渲染完毕,会回调surfaceCreated,在surfaceCreated中调用initCamera()
surfaceHolder.addCallback(this);
}
// 加载声音配置,其实在BeemManager的构造器中也会调用该方法,即在onCreate的时候会调用一次
beepManager.updatePrefs();
// 恢复活动监控器
inactivityTimer.onResume();
}
示例2: initView
import zxing.view.ViewfinderView; //导入依赖的package包/类
public void initView(){
CameraManager.init(this);
viewfinderView = (ViewfinderView) findViewById(R.id.viewfinder_view);
hasSurface = false;
inactivityTimer = new InactivityTimer(this);
surfaceView = (SurfaceView) findViewById(R.id.preview_view);
rlScanFailed = (RelativeLayout) findViewById(R.id.rlScanFailed);
rlScanFailed.setOnClickListener(this);
rlScanFailed.setVisibility(View.GONE);
ibClose = (ImageButton) findViewById(R.id.ibClose);
ibLignt=(ImageButton)findViewById(R.id.ibLignt);
ibPhoto=(ImageButton)findViewById(R.id.ibPhoto);
ibClose.setOnClickListener(this);
ibLignt.setOnClickListener(this);
ibPhoto.setOnClickListener(this);
ibClose.setOnClickListener(this);
}
示例3: onCreate
import zxing.view.ViewfinderView; //导入依赖的package包/类
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.zxing_layout);
btnCancel=(Button) findViewById(R.id.btn_cancel);
ivReturn=(ImageView) findViewById(R.id.iv_return);
OnClickListener myClick=new OnClickListener() {
@Override
public void onClick(View arg0) {
CaptureActivity.this.finish();
}
};
btnCancel.setOnClickListener(myClick);
ivReturn.setOnClickListener(myClick);
CameraManager.init(getApplication());
viewfinderView = (ViewfinderView) findViewById(R.id.viewfinder_view);
hasSurface = false;
inactivityTimer = new InactivityTimer(this);
}
示例4: getViewfinderView
import zxing.view.ViewfinderView; //导入依赖的package包/类
/**
* 闪光灯调节器。自动检测环境光线强弱并决定是否开启闪光灯
*/
public ViewfinderView getViewfinderView() {
return viewfinderView;
}
示例5: getViewfinderView
import zxing.view.ViewfinderView; //导入依赖的package包/类
public ViewfinderView getViewfinderView() {
return viewfinderView;
}