1. Download our Official Android App: Forums for Android!

TextView problem

Discussion in 'Android Apps & Games' started by techcent, Oct 11, 2011.

  1. techcent

    techcent Lurker
    Thread Starter
    Rank:
    None
    Points:
    5
    Posts:
    3
    Joined:
    Oct 11, 2011

    Oct 11, 2011
    3
    0
    5
    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
     

    Advertisement

Share This Page

Loading...