Issue #153: Display default value in prompt().

This commit is contained in:
Bryce Curtis 2011-07-16 15:07:34 -05:00
parent 4af8952dc3
commit 2787a960d8

View File

@ -921,6 +921,9 @@ public class DroidGap extends PhonegapActivity {
AlertDialog.Builder dlg = new AlertDialog.Builder(this.ctx); AlertDialog.Builder dlg = new AlertDialog.Builder(this.ctx);
dlg.setMessage(message); dlg.setMessage(message);
final EditText input = new EditText(this.ctx); final EditText input = new EditText(this.ctx);
if (defaultValue != null) {
input.setText(defaultValue);
}
dlg.setView(input); dlg.setView(input);
dlg.setCancelable(false); dlg.setCancelable(false);
dlg.setPositiveButton(android.R.string.ok, dlg.setPositiveButton(android.R.string.ok,