本文整理了Java中me.dm7.barcodescanner.zbar.ZBarScannerView.<init>()
方法的一些代码示例,展示了ZBarScannerView.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZBarScannerView.<init>()
方法的具体详情如下:
包路径:me.dm7.barcodescanner.zbar.ZBarScannerView
类名称:ZBarScannerView
方法名:<init>
暂无
代码示例来源: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: 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);
}
内容来源于网络,如有侵权,请联系作者删除!