By request, let's show a bit of the scanned string when scanning by Intent in the Toast popup

git-svn-id: https://zxing.googlecode.com/svn/trunk@2656 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
srowen@gmail.com 2013-04-15 18:18:00 +00:00
parent f8b01f65b0
commit 0b366ef77b

View file

@ -592,11 +592,12 @@ public final class CaptureActivity extends Activity implements SurfaceHolder.Cal
DEFAULT_INTENT_RESULT_DURATION_MS);
}
// Since this message will only be shown for a second, just tell the user what kind of
// barcode was found (e.g. contact info) rather than the full contents, which they won't
// have time to read.
if (resultDurationMS > 0) {
statusView.setText(getString(resultHandler.getDisplayTitle()));
String rawResultString = String.valueOf(rawResult);
if (rawResultString.length() > 32) {
rawResultString = rawResultString.substring(0, 32) + " ...";
}
statusView.setText(getString(resultHandler.getDisplayTitle()) + " : " + rawResultString);
}
if (copyToClipboard && !resultHandler.areContentsSecure()) {