src/com/zbar/lib/CaptureActivity.java
@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);

		setContentView(R.layout.activity_qr_scan);
		// 初始化 CameraManager
		CameraManager.init(getApplication());
		hasSurface = false;
		inactivityTimer = new InactivityTimer(this);

		mContainer = (RelativeLayout) findViewById(R.id.capture_containter);
		mCropLayout = (RelativeLayout) findViewById(R.id.capture_crop_layout);

		ImageView mQrLineView = (ImageView) findViewById(R.id.capture_scan_line);
		TranslateAnimation mAnimation = new TranslateAnimation(
				TranslateAnimation.ABSOLUTE, 0f, TranslateAnimation.ABSOLUTE,
				0f, TranslateAnimation.RELATIVE_TO_PARENT, 0f,
				TranslateAnimation.RELATIVE_TO_PARENT, 0.9f);
		mAnimation.setDuration(1500);
		mAnimation.setRepeatCount(-1);
		mAnimation.setRepeatMode(Animation.REVERSE);
		mAnimation.setInterpolator(new LinearInterpolator());
		mQrLineView.setAnimation(mAnimation);
	}
/** Called when the activity is first created. */
Called when the activity is first created.
Called when the activity is first created .
@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_qr_scan);
		CameraManager.init(getApplication());
		hasSurface = false;
		inactivityTimer = new InactivityTimer(this);
		mContainer = (RelativeLayout) findViewById(R.id.capture_containter);
		mCropLayout = (RelativeLayout) findViewById(R.id.capture_crop_layout);
		ImageView mQrLineView = (ImageView) findViewById(R.id.capture_scan_line);
		TranslateAnimation mAnimation = new TranslateAnimation(
				TranslateAnimation.ABSOLUTE, 0f, TranslateAnimation.ABSOLUTE,
				0f, TranslateAnimation.RELATIVE_TO_PARENT, 0f,
				TranslateAnimation.RELATIVE_TO_PARENT, 0.9f);
		mAnimation.setDuration(1500);
		mAnimation.setRepeatCount(-1);
		mAnimation.setRepeatMode(Animation.REVERSE);
		mAnimation.setInterpolator(new LinearInterpolator());
		mQrLineView.setAnimation(mAnimation);
	}
@ Override public void onCreate ( Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; setContentView ( R . layout . activity_qr_scan ) ; CameraManager . init ( getApplication ( ) ) ; hasSurface = false ; inactivityTimer = new InactivityTimer ( this ) ; mContainer = ( RelativeLayout ) findViewById ( R . id . capture_containter ) ; mCropLayout = ( RelativeLayout ) findViewById ( R . id . capture_crop_layout ) ; ImageView mQrLineView = ( ImageView ) findViewById ( R . id . capture_scan_line ) ; TranslateAnimation mAnimation = new TranslateAnimation ( TranslateAnimation . ABSOLUTE , 0f , TranslateAnimation . ABSOLUTE , 0f , TranslateAnimation . RELATIVE_TO_PARENT , 0f , TranslateAnimation . RELATIVE_TO_PARENT , 0.9f ) ; mAnimation . setDuration ( 1500 ) ; mAnimation . setRepeatCount ( - 1 ) ; mAnimation . setRepeatMode ( Animation . REVERSE ) ; mAnimation . setInterpolator ( new LinearInterpolator ( ) ) ; mQrLineView . setAnimation ( mAnimation ) ; }
Called when the activity is first created.
Called when the activity is first created .
// 初始化 CameraManager
