Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- alertDialog.setTitle("Authorization Required");
- alertDialog.setMessage("Please enter your username and password for http authentication.\nError: Status Code 401");
- final EditText htuser1 = new EditText(this);
- final EditText htpass1 = new EditText(this);
- alertDialog.setView(htuser1);
- alertDialog.setView(htpass1);
- alertDialog.setButton("Login", new DialogInterface.OnClickListener() {
- public void onClick(DialogInterface dialog, int which) {
- htuser = htuser1.toString();
- htpass = htpass1.toString();
- login(username, password, url);
- }
- });
- alertDialog.setButton2("Cancel", new DialogInterface.OnClickListener() {
- public void onClick(DialogInterface dialog, int which) {
- username2.setEnabled(true);
- password2.setEnabled(true);
- button.setEnabled(true);
- }
- });
- alertDialog.show();
Add Comment
Please, Sign In to add comment