show alert dialog through button android -
I'm trying to show a warning dialog while clicking a button
Previous .setOnClickListener (click on the New View.OnClickListener () {@Override Public Zero (see View) {AlertDialog.Builder answerAlert = New AlertDialog.Builder (this);}});
But I received an error in this line
alerts. Builder NorthArtter = New AlertDownloadsBolder (this);
what said
constructor algorithm. Builder (New view. Onclick Lester () {}) is undefined
How do anyone know how to fix it? Thanks
alertdoglog
gets in context
You have used this
in your code on constructor
instead. ClickClickListenner instead of you yourActivity.this
Previous .setOnClickListener (New View.OnClickListener () should write {@Override click on Public Zoom (see View) {AlertDialog.Builder answerAlert = New AlertDialog.Builder (YourActivity.This);}});