Пример #1
0
 /** Called when the activity is first created. */
 @Override
 public void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   setContentView(R.layout.zxing_camera);
   // ViewUtil.addTopView(getApplicationContext(), this, R.string.scan_card);
   CameraManager.init(getApplication());
   viewfinderView = (ViewfinderView) findViewById(R.id.viewfinder_view);
   cancelScanButton = (Button) this.findViewById(R.id.btn_cancel_scan);
   hasSurface = false;
   inactivityTimer = new InactivityTimer(this);
 }
Пример #2
0
 /** Called when the activity is first created. */
 @Override
 public void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   setContentView(R.layout.scan_main);
   // 初始化 CameraManager
   CameraManager.init(getApplication());
   viewfinderView = (ViewfinderView) findViewById(R.id.viewfinder_view);
   txtResult = (TextView) findViewById(R.id.txtResult);
   hasSurface = false;
   inactivityTimer = new InactivityTimer(this);
 }