當前位置: 首頁>>代碼示例>>Java>>正文


Java CaptureActivity類代碼示例

本文整理匯總了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);
}
 
開發者ID:shengge,項目名稱:eoe-android-app,代碼行數:26,代碼來源:DecodeThread.java

示例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();
}
 
開發者ID:shengge,項目名稱:eoe-android-app,代碼行數:12,代碼來源:CaptureActivityHandler.java

示例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;
    }
}
 
開發者ID:shengge,項目名稱:eoe-android-app,代碼行數:33,代碼來源:UserLoginActivity.java

示例4: DecodeHandler

import com.google.zxing.CaptureActivity; //導入依賴的package包/類
DecodeHandler(CaptureActivity activity, Hashtable<DecodeHintType, Object> hints) {
    multiFormatReader = new MultiFormatReader();
    multiFormatReader.setHints(hints);
    this.activity = activity;
}
 
開發者ID:shengge,項目名稱:eoe-android-app,代碼行數:6,代碼來源:DecodeHandler.java


注:本文中的com.google.zxing.CaptureActivity類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。