资源简介
快速扫描二维码,跟微信差不多,比QQ的快,扫描的代码模块做了封装,其他的容易更改,不会影响关键代码,更适合敏捷开发。
代码片段和文件信息
/*
* Copyright (C) 2008 ZXing authors
*
* Licensed under the Apache License Version 2.0 (the “License“);
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing software
* distributed under the License is distributed on an “AS IS“ BASIS
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.dtr.zxing.activity;
import java.io.IOException;
import java.lang.reflect.Field;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.graphics.Rect;
import android.os.Bundle;
import android.os.Handler;
import android.util.Log;
import android.view.SurfaceHolder;
import android.view.SurfaceView;
import android.view.Window;
import android.view.WindowManager;
import android.view.animation.Animation;
import android.view.animation.TranslateAnimation;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import com.dtr.zxing.R;
import com.dtr.zxing.camera.CameraManager;
import com.dtr.zxing.decode.DecodeThread;
import com.dtr.zxing.utils.BeepManager;
import com.dtr.zxing.utils.CaptureActivityHandler;
import com.dtr.zxing.utils.InactivityTimer;
import com.google.zxing.Result;
/**
* This activity opens the camera and does the actual scanning on a background
* thread. It draws a viewfinder to help the user place the barcode correctly
* shows feedback as the image processing is happening and then overlays the
* results when a scan is successful.
*
* @author dswitkin@google.com (Daniel Switkin)
* @author Sean Owen
*/
public final class CaptureActivity extends Activity implements SurfaceHolder.Callback {
private static final String TAG = CaptureActivity.class.getSimpleName();
private CameraManager cameraManager;
private CaptureActivityHandler handler;
private InactivityTimer inactivityTimer;
private BeepManager beepManager;
private SurfaceView scanPreview = null;
private RelativeLayout scanContainer;
private RelativeLayout scanCropView;
private ImageView scanLine;
private Rect mCropRect = null;
public Handler getHandler() {
return handler;
}
public CameraManager getCameraManager() {
return cameraManager;
}
private boolean isHasSurface = false;
@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
Window window = getWindow();
window.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
setContentView(R.layout.activity_capture);
scanPreview = (SurfaceView) findViewById(R.id.capture_preview);
scanContainer = (RelativeLayout) findViewById(R.id.capture_container);
scanCropView = (RelativeLayout) findViewById(R.id.capture_crop_view);
scanLine = (ImageView) findViewById(R.i
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2014-10-16 14:43 ZXingProject-master\
文件 290 2014-10-16 14:43 ZXingProject-master\.gitignore
文件 1081 2014-10-16 14:43 ZXingProject-master\LICENSE
文件 120 2014-10-16 14:43 ZXingProject-master\README.md
目录 0 2014-10-16 14:43 ZXingProject-master\ZXingProj\
文件 466 2014-10-16 14:43 ZXingProject-master\ZXingProj\.classpath
文件 812 2014-10-16 14:43 ZXingProject-master\ZXingProj\.project
目录 0 2014-10-16 14:43 ZXingProject-master\ZXingProj\.settings\
文件 173 2014-10-16 14:43 ZXingProject-master\ZXingProj\.settings\org.eclipse.jdt.core.prefs
文件 1667 2014-10-16 14:43 ZXingProject-master\ZXingProj\AndroidManifest.xm
文件 51394 2014-10-16 14:43 ZXingProject-master\ZXingProj\ic_launcher-web.png
目录 0 2014-10-16 14:43 ZXingProject-master\ZXingProj\libs\
文件 1000515 2014-10-16 14:43 ZXingProject-master\ZXingProj\libs\zxing.jar
文件 159 2014-10-16 14:43 ZXingProject-master\ZXingProj\lint.xm
文件 781 2014-10-16 14:43 ZXingProject-master\ZXingProj\proguard-project.txt
文件 563 2014-10-16 14:43 ZXingProject-master\ZXingProj\project.properties
目录 0 2014-10-16 14:43 ZXingProject-master\ZXingProj\res\
目录 0 2014-10-16 14:43 ZXingProject-master\ZXingProj\res\drawable-hdpi\
文件 7658 2014-10-16 14:43 ZXingProject-master\ZXingProj\res\drawable-hdpi\ic_launcher.png
目录 0 2014-10-16 14:43 ZXingProject-master\ZXingProj\res\drawable-mdpi\
文件 3777 2014-10-16 14:43 ZXingProject-master\ZXingProj\res\drawable-mdpi\ic_launcher.png
目录 0 2014-10-16 14:43 ZXingProject-master\ZXingProj\res\drawable-xhdpi\
文件 12516 2014-10-16 14:43 ZXingProject-master\ZXingProj\res\drawable-xhdpi\ic_launcher.png
文件 2336 2014-10-16 14:43 ZXingProject-master\ZXingProj\res\drawable-xhdpi\qr_code_bg.9.png
文件 6413 2014-10-16 14:43 ZXingProject-master\ZXingProj\res\drawable-xhdpi\scan_line.png
文件 17926 2014-10-16 14:43 ZXingProject-master\ZXingProj\res\drawable-xhdpi\shadow.png
目录 0 2014-10-16 14:43 ZXingProject-master\ZXingProj\res\drawable-xxhdpi\
文件 24777 2014-10-16 14:43 ZXingProject-master\ZXingProj\res\drawable-xxhdpi\ic_launcher.png
目录 0 2014-10-16 14:43 ZXingProject-master\ZXingProj\res\layout\
文件 2838 2014-10-16 14:43 ZXingProject-master\ZXingProj\res\layout\activity_capture.xm
文件 1021 2014-10-16 14:43 ZXingProject-master\ZXingProj\res\layout\activity_result.xm
............此处省略32个文件信息
- 上一篇:java实现SVM支持向量机算法
- 下一篇:HikariCP所需jar包
相关资源
- Android开发二维码的生成和扫一扫功能
- Delphi10.3二维码扫描源码.zip
- 基于Android的二维码识别系统的实现
- QRCode二维码所需jar文件
- 一款Android浏览器源码 功能有:扫描二
- android studio 生成二维码
- java编写微信二维码支付源码
- jsp 生成二维码
- JAVA整合HTML5实现扫描二维码功能项目
- android studio ZXing 二维码扫描
- Android项目源码仿微信APP源码登录注册
- Android扫描二维码及生成二维码Demo
- 二维码所需jar包
- android手机变无线扫描枪()
- Android二维码扫描识别-二维码生成de
- 用java生成二维码图片(dm格式的)
- Zxing二维码识别 android
- java实现生成二维码包括必要jar
- Android 使用将 wifi 信息转为二维码
- java二维码生成和添加中间图片
- android二维码扫描DEMO
- Android利用ZBar实现二维码、条形码扫码
- Android实现二维码扫描功能-ZXing插件接
- android二维码开发,zxing开发包,通讯
- Android最好用的二维码扫描Demo
- java二维码生成与解析代码实现
- ZBarBuildProj
- 用电脑摄像头扫描二维码
- java生成二维码+jar包
- Android之扫描二维码和根据输入信息生
评论
共有 条评论