本文整理匯總了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;
}