本文整理汇总了Java中com.google.zxing.CaptureActivity类的典型用法代码示例。如果您正苦于以下问题:Java CaptureActivity类的具体用法?Java CaptureActivity怎么用?Java CaptureActivity使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
CaptureActivity类属于com.google.zxing包,在下文中一共展示了CaptureActivity类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: DecodeThread
import com.google.zxing.CaptureActivity; //导入依赖的package包/类
DecodeThread(CaptureActivity activity,
Vector<BarcodeFormat> decodeFormats,
String characterSet,
ResultPointCallback resultPointCallback) {
this.activity = activity;
handlerInitLatch = new CountDownLatch(1);
hints = new Hashtable<DecodeHintType, Object>(3);
if (decodeFormats == null || decodeFormats.isEmpty()) {
decodeFormats = new Vector<BarcodeFormat>();
decodeFormats.addAll(DecodeFormatManager.ONE_D_FORMATS);
decodeFormats.addAll(DecodeFormatManager.QR_CODE_FORMATS);
decodeFormats.addAll(DecodeFormatManager.DATA_MATRIX_FORMATS);
}
hints.put(DecodeHintType.POSSIBLE_FORMATS, decodeFormats);
if (characterSet != null) {
hints.put(DecodeHintType.CHARACTER_SET, characterSet);
}
hints.put(DecodeHintType.NEED_RESULT_POINT_CALLBACK, resultPointCallback);
}
示例2: CaptureActivityHandler
import com.google.zxing.CaptureActivity; //导入依赖的package包/类
public CaptureActivityHandler(CaptureActivity activity, Vector<BarcodeFormat> decodeFormats,
String characterSet) {
this.activity = activity;
decodeThread = new DecodeThread(activity, decodeFormats, characterSet,
new ViewfinderResultPointCallback(activity.getViewfinderView()));
decodeThread.start();
state = State.SUCCESS;
// Start ourselves capturing previews and decoding.
CameraManager.get().startPreview();
restartPreviewAndDecode();
}
示例3: onClick
import com.google.zxing.CaptureActivity; //导入依赖的package包/类
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
switch (v.getId()) {
case R.id.edittext_user_key:
break;
case R.id.imageview_user_title:
break;
case R.id.Linear_above_toHome:
if (share.contains(UserLoginUidActivity.KEY)
&& !share.getString(UserLoginUidActivity.KEY, "")
.equals("")) {
IntentUtil.start_activity(this, UserCenterActivity.class);
finish();
} else {
showLongToast(getResources().getString(
R.string.user_center_error));
}
break;
case R.id.login_button_another:
IntentUtil.start_activity(this, UserLoginUidActivity.class);
finish();
break;
case R.id.user_login_bind:
loginBind();
break;
case R.id.scan_user_key:
startActivityForResult(new Intent(this, CaptureActivity.class), GET_CODE);
break;
}
}
示例4: DecodeHandler
import com.google.zxing.CaptureActivity; //导入依赖的package包/类
DecodeHandler(CaptureActivity activity, Hashtable<DecodeHintType, Object> hints) {
multiFormatReader = new MultiFormatReader();
multiFormatReader.setHints(hints);
this.activity = activity;
}