Is there a way to call a function from within an AlertDialog (like calling addUser in the following code):
Thanks!
EDIT: Never mind, got it. I had to get rid of the "View view" and then it worked.
Code:
AlertDialog.Builder builder = new AlertDialog.Builder(uNear.this);
builder.setMessage("Select an Option")
.setPositiveButton("User Information", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
addUser();
}
})
....
public void addUser(View view) {
//etc
}
Thanks!
EDIT: Never mind, got it. I had to get rid of the "View view" and then it worked.