I would like to prompt the user to give me input in my android application using a dialog. this is what I have found:
AlertDialog.Builder alert = new AlertDi
When I ran your code in a new project, it worked fine. So probably "this" that you are using
Hope this helps.
I've written a helper class that makes it easy to create a prompt dialog with only a few lines of code.
PromptDialog dlg = new PromptDialog(MainActivity.this, R.string.title, R.string.enter_comment) {
@Override
public boolean onOkClicked(String input) {
// do something
return true; // true = close dialog
}
};
dlg.show();
See full code => Prompt Dialog for Android