title: setOnClickListener in TextView
body: <p>I'm trying to build an text view that goes to onClick but its not working they told me to add this code I did it but I'm having a lot of errors in it.  </p>
  
  <p>this is my <code>MainActivity.java</code></p>
  
  <pre><code>     package imamalsajadsayings.android.com;
  
      import android.app.Activity;
      import android.os.Bundle;
      import android.view.Menu;
      import android.view.View;
      import android.widget.TextView;
  
      public class MainActivity extends Activity {
  
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
  
  }
     public void runNextTask(){
         final View addView = getLayoutInflater().inflate(R.layout.addnewtracker, null);
         final TrackerInfo newInfo = new TrackerInfo();
         //set up for model selection
         TextView modelTextview = (TextView)addView.findViewById(R.id.state1);                    
         modelTextview.setOnClickListener(new OnClickListener() {
             @Override
             public void onClick(View v) {
  
             }
         });
     }
  
  
  @Override
  public boolean onCreateOptionsMenu(Menu menu) {
      // Inflate the menu; this adds items to the action bar if it is present.
      getMenuInflater().inflate(R.menu.main, menu);
      return true;
  }
  
      }
  </code></pre>
  
  <p>and is my textview </p>
  
  <pre><code>        &lt;TextView
          android:id="@+id/state1"
           android:layout_width="wrap_content"
          android:layout_height="wrap_content"
            android:text="@string/Tracker_model" 
          android:clickable="true"
  </code></pre>
  
  <p>note : I don't have addnewtracker created</p>
  
  <p>errors :</p>
  
  <pre><code> Description    Resource    Path    Location    Type
  TrackerInfo cannot be resolved to a type    MainActivity.java   /ImamAlsajadsayings/src/imamalsajadsayings/android/com  line 20 Java Problem
  addnewtracker cannot be resolved or is not a field  MainActivity.java   /ImamAlsajadsayings/src/imamalsajadsayings/android/com  line 19 Java Problem
  The method setOnClickListener(View.OnClickListener) in the type View is not applicable for the arguments (new OnClickListener(){})  MainActivity.java   /ImamAlsajadsayings/src/imamalsajadsayings/android/com  line 23 Java Problem
  TrackerInfo cannot be resolved to a type    MainActivity.java   /ImamAlsajadsayings/src/imamalsajadsayings/android/com  line 20 Java Problem
  The method onClick(View) of type new OnClickListener(){} must override or implement a supertype method  MainActivity.java   /ImamAlsajadsayings/src/imamalsajadsayings/android/com  line 25 Java Problem
  OnClickListener cannot be resolved to a type    MainActivity.java   /ImamAlsajadsayings/src/imamalsajadsayings/android/com  line 23 Java Problem
  </code></pre>