01.
final
EditText txtUrl =
new
EditText(
this
);
02.
03.
05.
06.
new
AlertDialog.Builder(
this
)
07.
.setTitle(
"Moustachify Link"
)
08.
.setMessage(
"Paste in the link of an image to moustachify!"
)
09.
.setView(txtUrl)
10.
.setPositiveButton(
"Moustachify"
,
new
DialogInterface.OnClickListener() {
11.
public
void
onClick(DialogInterface dialog,
int
whichButton) {
12.
String url = txtUrl.getText().toString();
13.
moustachify(
null
, url);
14.
}
15.
})
16.
.setNegativeButton(
"Cancel"
,
new
DialogInterface.OnClickListener() {
17.
public
void
onClick(DialogInterface dialog,
int
whichButton) {
18.
}
19.
})
20.
.show();