当前位置: 首页>>代码示例>>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;未经允许,请勿转载。