满意答案
LLbecky
2013.08.05
采纳率:58% 等级:8
已帮助:1911人
/** * Handler scan result * * @param result * @param barcode */ public void handleDecode(Result result, Bitmap barcode) { inactivityTimer.onActivity(); playBeepSoundAndVibrate(); String resultString = result.getText(); if (resultString.equals("")) { Toast.makeText(CaptureActivity.this, "Scan failed!", Toast.LENGTH_SHORT).show(); } else { if (pg != null && pg.isShown()) { pg.setVisibility(View.GONE); iv_pg_bg_grey.setVisibility(View.VISIBLE); iv_big_circle.setBackgroundResource(R.drawable.bar_code_center_grey); iv_four_corner.setBackgroundResource(R.drawable.bar_code_four_corner_grey); } Intent resultIntent = new Intent(); Bundle bundle = new Bundle(); bundle.putString("result", resultString); resultIntent.putExtras(bundle); this.setResult(RESULT_OK, resultIntent); } CaptureActivity.this.finish(); }
00分享举报