gpt4 book ai didi

me.dm7.barcodescanner.zbar.ZBarScannerView类的使用及代码示例

转载 作者:知者 更新时间:2024-03-13 10:15:06 24 4
gpt4 key购买 nike

本文整理了Java中me.dm7.barcodescanner.zbar.ZBarScannerView类的一些代码示例,展示了ZBarScannerView类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZBarScannerView类的具体详情如下:
包路径:me.dm7.barcodescanner.zbar.ZBarScannerView
类名称:ZBarScannerView

ZBarScannerView介绍

暂无

代码示例

代码示例来源:origin: denzilferreira/aware-client

@Override
protected void onResume() {
  super.onResume();
  mScannerView.setResultHandler(this);
  mScannerView.startCamera();
}

代码示例来源:origin: denzilferreira/aware-client

@Override
protected void onPause() {
  super.onPause();
  mScannerView.stopCamera();
  mScannerView.stopCameraPreview();
}

代码示例来源:origin: pinetum/AirUnlock-for-Android

@Override
public void onResume() {
  super.onResume();
  Log.i(TAG,"OnResume");
  mScannerView.resumeCameraPreview(this);
  mScannerView.startCamera();          // Start camera on resume
}

代码示例来源:origin: pinetum/AirUnlock-for-Android

@Override
public void onCreate(Bundle state) {
  super.onCreate(state);
  Log.i(TAG,"OnCreate");
  List<BarcodeFormat> mformats = new ArrayList<BarcodeFormat>();
  mScannerView = new ZBarScannerView(this);    // Programmatically initialize the scanner view
  mformats.add(BarcodeFormat.QRCODE);
  mScannerView.setFormats(mformats);
  setContentView(mScannerView);                // Set the scanner view as the content view
  if (ContextCompat.checkSelfPermission(this,
      Manifest.permission.CAMERA)
      != PackageManager.PERMISSION_GRANTED) {
      ActivityCompat.requestPermissions(this,
          new String[]{Manifest.permission.CAMERA},
          CAMERA_PERRMISSION_REQUEST);
  }
}

代码示例来源:origin: pinetum/AirUnlock-for-Android

@Override
protected void onStart() {
  super.onStart();
  mScannerView.setResultHandler(this); // Register ourselves as a handler for scan results.
}

代码示例来源:origin: pinetum/AirUnlock-for-Android

@Override
public void onPause() {
  super.onPause();
  Log.i(TAG,"OnPause");
  mScannerView.stopCamera();           // Stop camera on pause
}

代码示例来源:origin: denzilferreira/aware-client

@Override
protected void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  mScannerView = new ZBarScannerView(this);
  LinearLayout main = new LinearLayout(this);
  main.setOrientation(LinearLayout.VERTICAL);
  ListView list = new ListView(this);
  list.setId(android.R.id.list);
  list.setVisibility(View.GONE);
  main.addView(mScannerView);
  main.addView(list);
  setContentView(main);
}

代码示例来源:origin: pinetum/AirUnlock-for-Android

if(dd.length!=3){
  Toast.makeText(this, "QR code error.", Toast.LENGTH_SHORT).show();
  mScannerView.resumeCameraPreview(this);
  return;
if(!matcher.find()){
  Toast.makeText(this, "QR code error.", Toast.LENGTH_SHORT).show();
  mScannerView.resumeCameraPreview(this);
  return;

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com