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