mirror of
https://github.com/zxing/zxing.git
synced 2025-02-20 18:47:38 -08:00
... and put back status text, in a simplified form?
git-svn-id: https://zxing.googlecode.com/svn/trunk@1430 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
parent
bda97f7c84
commit
b238eb22a0
|
@ -179,4 +179,13 @@
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
<TextView android:id="@+id/status_view"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="bottom|center_horizontal"
|
||||||
|
android:text="@string/msg_default_status"
|
||||||
|
android:background="@color/transparent"
|
||||||
|
android:textColor="@color/status_text"
|
||||||
|
android.textSize="14sp"/>
|
||||||
|
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
|
@ -136,6 +136,7 @@ public final class CaptureActivity extends Activity implements SurfaceHolder.Cal
|
||||||
private CaptureActivityHandler handler;
|
private CaptureActivityHandler handler;
|
||||||
|
|
||||||
private ViewfinderView viewfinderView;
|
private ViewfinderView viewfinderView;
|
||||||
|
private View statusView;
|
||||||
private View resultView;
|
private View resultView;
|
||||||
private MediaPlayer mediaPlayer;
|
private MediaPlayer mediaPlayer;
|
||||||
private Result lastResult;
|
private Result lastResult;
|
||||||
|
@ -150,7 +151,6 @@ public final class CaptureActivity extends Activity implements SurfaceHolder.Cal
|
||||||
private String characterSet;
|
private String characterSet;
|
||||||
private String versionName;
|
private String versionName;
|
||||||
private HistoryManager historyManager;
|
private HistoryManager historyManager;
|
||||||
private boolean firstLaunch;
|
|
||||||
|
|
||||||
private final OnCompletionListener beepListener = new BeepListener();
|
private final OnCompletionListener beepListener = new BeepListener();
|
||||||
|
|
||||||
|
@ -182,13 +182,14 @@ public final class CaptureActivity extends Activity implements SurfaceHolder.Cal
|
||||||
CameraManager.init(getApplication());
|
CameraManager.init(getApplication());
|
||||||
viewfinderView = (ViewfinderView) findViewById(R.id.viewfinder_view);
|
viewfinderView = (ViewfinderView) findViewById(R.id.viewfinder_view);
|
||||||
resultView = findViewById(R.id.result_view);
|
resultView = findViewById(R.id.result_view);
|
||||||
|
statusView = findViewById(R.id.status_view);
|
||||||
handler = null;
|
handler = null;
|
||||||
lastResult = null;
|
lastResult = null;
|
||||||
hasSurface = false;
|
hasSurface = false;
|
||||||
historyManager = new HistoryManager(this);
|
historyManager = new HistoryManager(this);
|
||||||
historyManager.trimHistory();
|
historyManager.trimHistory();
|
||||||
|
|
||||||
firstLaunch = showHelpOnFirstLaunch();
|
showHelpOnFirstLaunch();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -260,10 +261,6 @@ public final class CaptureActivity extends Activity implements SurfaceHolder.Cal
|
||||||
vibrate = prefs.getBoolean(PreferencesActivity.KEY_VIBRATE, false);
|
vibrate = prefs.getBoolean(PreferencesActivity.KEY_VIBRATE, false);
|
||||||
copyToClipboard = prefs.getBoolean(PreferencesActivity.KEY_COPY_TO_CLIPBOARD, true);
|
copyToClipboard = prefs.getBoolean(PreferencesActivity.KEY_COPY_TO_CLIPBOARD, true);
|
||||||
initBeepSound();
|
initBeepSound();
|
||||||
|
|
||||||
if (!firstLaunch) {
|
|
||||||
Toast.makeText(this, R.string.msg_default_status, Toast.LENGTH_SHORT).show();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static Vector<BarcodeFormat> parseDecodeFormats(Intent intent) {
|
private static Vector<BarcodeFormat> parseDecodeFormats(Intent intent) {
|
||||||
|
@ -495,6 +492,7 @@ public final class CaptureActivity extends Activity implements SurfaceHolder.Cal
|
||||||
|
|
||||||
// Put up our own UI for how to handle the decoded contents.
|
// Put up our own UI for how to handle the decoded contents.
|
||||||
private void handleDecodeInternally(Result rawResult, Bitmap barcode) {
|
private void handleDecodeInternally(Result rawResult, Bitmap barcode) {
|
||||||
|
statusView.setVisibility(View.GONE);
|
||||||
viewfinderView.setVisibility(View.GONE);
|
viewfinderView.setVisibility(View.GONE);
|
||||||
resultView.setVisibility(View.VISIBLE);
|
resultView.setVisibility(View.VISIBLE);
|
||||||
|
|
||||||
|
@ -690,6 +688,7 @@ public final class CaptureActivity extends Activity implements SurfaceHolder.Cal
|
||||||
|
|
||||||
private void resetStatusView() {
|
private void resetStatusView() {
|
||||||
resultView.setVisibility(View.GONE);
|
resultView.setVisibility(View.GONE);
|
||||||
|
statusView.setVisibility(View.VISIBLE);
|
||||||
viewfinderView.setVisibility(View.VISIBLE);
|
viewfinderView.setVisibility(View.VISIBLE);
|
||||||
lastResult = null;
|
lastResult = null;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue