Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
hds
flexin
android-app
Commits
54d95874
Commit
54d95874
authored
Oct 26, 2017
by
Nastuzzi Samy
Browse files
Avoid repeated dialogs
Call BadgeDialog only if no dialog is shown
parent
4bfe6f1e
Changes
2
Hide whitespace changes
Inline
Side-by-side
app/src/main/java/fr/utc/simde/payutc/MainActivity.java
View file @
54d95874
...
...
@@ -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
()
{
...
...
app/src/main/java/fr/utc/simde/payutc/tools/Dialog.java
View file @
54d95874
...
...
@@ -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
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment