• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

TextView problem

techcent

Lurker
Hi Friends

I am new one in the world of Android, i wrote a sample application code from internet. I can't run application it shows an error

please find code snippet

alert.setPositiveButton("OK", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
String value = input.getText().toString();
TextView tv = new TextView(this);
alert.setView(tv);
}
});



Error is "The constructor TextView(new DialogInterface.OnClickListener(){}) is undefined"

expecting your valuable help

thanks in advance
 
Back
Top Bottom