Commit 54d95874 authored by Nastuzzi Samy's avatar Nastuzzi Samy
Browse files

Avoid repeated dialogs

Call BadgeDialog only if no dialog is shown
parent 4bfe6f1e
......@@ -80,7 +80,8 @@ public class MainActivity extends NFCActivity {
@Override
protected void onIdentification(final String idBadge) {
badgeDialog(idBadge);
if (!dialog.isShowing())
badgeDialog(idBadge);
}
protected void delKey() {
......
......@@ -32,6 +32,8 @@ public class Dialog {
this.alertDialog.dismiss();
}
public Boolean isShowing() { return this.alertDialog != null && this.alertDialog.isShowing(); }
public void createDialog() { createDialog((EditText) null); }
public void createDialog(AlertDialog.Builder alertDialogBuilder) { createDialog(alertDialogBuilder, null); }
public void createDialog(AlertDialog.Builder alertDialogBuilder, final EditText input) { this.alertDialogBuilder = alertDialogBuilder; createDialog(input); }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment