@@ -43,18 +43,21 @@ public void showAlert(String message, final Result result) {
43
43
dlg .setCancelable (true );
44
44
dlg .setPositiveButton (android .R .string .ok ,
45
45
new AlertDialog .OnClickListener () {
46
+ @ Override
46
47
public void onClick (DialogInterface dialog , int which ) {
47
48
result .gotResult (true , null );
48
49
}
49
50
});
50
51
dlg .setOnCancelListener (
51
52
new DialogInterface .OnCancelListener () {
53
+ @ Override
52
54
public void onCancel (DialogInterface dialog ) {
53
55
result .gotResult (false , null );
54
56
}
55
57
});
56
58
dlg .setOnKeyListener (new DialogInterface .OnKeyListener () {
57
59
//DO NOTHING
60
+ @ Override
58
61
public boolean onKey (DialogInterface dialog , int keyCode , KeyEvent event ) {
59
62
if (keyCode == KeyEvent .KEYCODE_BACK )
60
63
{
@@ -75,24 +78,28 @@ public void showConfirm(String message, final Result result) {
75
78
dlg .setCancelable (true );
76
79
dlg .setPositiveButton (android .R .string .ok ,
77
80
new DialogInterface .OnClickListener () {
81
+ @ Override
78
82
public void onClick (DialogInterface dialog , int which ) {
79
83
result .gotResult (true , null );
80
84
}
81
85
});
82
86
dlg .setNegativeButton (android .R .string .cancel ,
83
87
new DialogInterface .OnClickListener () {
88
+ @ Override
84
89
public void onClick (DialogInterface dialog , int which ) {
85
90
result .gotResult (false , null );
86
91
}
87
92
});
88
93
dlg .setOnCancelListener (
89
94
new DialogInterface .OnCancelListener () {
95
+ @ Override
90
96
public void onCancel (DialogInterface dialog ) {
91
97
result .gotResult (false , null );
92
98
}
93
99
});
94
100
dlg .setOnKeyListener (new DialogInterface .OnKeyListener () {
95
101
//DO NOTHING
102
+ @ Override
96
103
public boolean onKey (DialogInterface dialog , int keyCode , KeyEvent event ) {
97
104
if (keyCode == KeyEvent .KEYCODE_BACK )
98
105
{
@@ -126,13 +133,15 @@ public void showPrompt(String message, String defaultValue, final Result result)
126
133
dlg .setCancelable (false );
127
134
dlg .setPositiveButton (android .R .string .ok ,
128
135
new DialogInterface .OnClickListener () {
136
+ @ Override
129
137
public void onClick (DialogInterface dialog , int which ) {
130
138
String userText = input .getText ().toString ();
131
139
result .gotResult (true , userText );
132
140
}
133
141
});
134
142
dlg .setNegativeButton (android .R .string .cancel ,
135
143
new DialogInterface .OnClickListener () {
144
+ @ Override
136
145
public void onClick (DialogInterface dialog , int which ) {
137
146
result .gotResult (false , null );
138
147
}
0 commit comments