title: How I declare Textview variable
body: <p>My question is how I declare Textview variable in javacode?</p>
  
  <p>My code is here:</p>
  
  <pre><code>TextView tv1 = new TextView(MainActivity.this);
  </code></pre>
  
  <p>i want using tv1 in this function:</p>
  
  <pre><code>build.setPositiveButton("Tamam", new DialogInterface.OnClickListener() {
              @Override
              public void onClick(DialogInterface dialog, int which) {
  
  }
  </code></pre>
  
  <p>I try this code : <code>tv1 = new TextView(MainActivity.this)</code> but i had this issue:</p>
  
  <blockquote>
    <p>Multiple markers at this line
      - Syntax error on token "new", delete this token
      - TextView cannot be resolved to a variable
      - The final local variable tv1 cannot be assigned, since it is defined in an     enclosing type</p>
  </blockquote>