title: TextView is not updating
body: <p>I am trying to generate random number. And to do so ,
  I am getting the text from edit text and passing it to the nextInt of Random class. But i have a problem. My textView is not changing. 
  Here its the code: </p>
  
  <pre><code>    package random.vivek.com.random;
  
  import android.os.Bundle;
  import android.support.v7.app.AppCompatActivity;
  import android.widget.EditText;
  import android.widget.TextView;
  
  /**
   * Created by Shiva on 09-08-2015.
   */
  public class Random extends AppCompatActivity  {
  
      int number , i ;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
          java.util.Random genertor = new java.util.Random();
          EditText editText = (EditText) findViewById(R.id.random);
          TextView textView = (TextView) findViewById(R.id.text);
  
  
          String s = editText.getText().toString();
          try {
              i = Integer.parseInt(s);
              for (int roll = 0; roll &lt; 20; roll++) {
                  number = genertor.nextInt(i);
              }
  
  
          } catch (NumberFormatException e) {
              e.printStackTrace();
  
      }
  
  
  
  
  
  
          textView.setText(number + "");
      }
  }
  </code></pre>