title: string array changing onClick
body: <p>I wish to have questions that change to the next question in the sequence onClick but I'm having trouble creating the array of questions and writing the onClick code for that portion.  </p>
  
  <p>*Too add more context to the app it will be a questionaire app with a question above an editText field and the users inputs will show up in its respective box at the top of the screen.</p>
  
  <pre><code>package com.example.greg;
  
  import android.app.Activity;
  import android.os.Bundle;
  import android.view.View;
  import android.widget.Button;
  import android.widget.EditText;
  import android.widget.TextView;
  import android.widget.Toast;
  
  
  public class menu extends Activity {
  
  Button   mButton;
  EditText mEdit;
  int questionNumber = 0;
  String [] questions;
  int numberOfQuestions = 2;
  
  
  @Override
  protected void  onCreate(Bundle savedInstanceState) {
      // TODO Auto-generated method stub
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
  
      mButton = (Button)findViewById(R.id.button);
      mEdit   = (EditText)findViewById(R.id.userAnswereditText);
  
  
      questions=new String[numberOfQuestions];
      questions[0]="This is first question?";
      questions[1]="This is second question?";
  
  
      final TextView [] myTexts = new TextView[2];
      myTexts[0]=(TextView)findViewById(R.id.varATextView);
      myTexts[1]=(TextView)findViewById(R.id.varBTextView);
  
      mButton.setOnClickListener(
      new View.OnClickListener()
         {
              public void onClick(View view)
              {
  
  
                  myTexts[questionNumber].setText(mEdit.getText().toString());
                  mEdit.setText(null);
                  questionNumber++;
  
                   if(questionNumber &lt; numberOfQuestions)
                           questionTextViewHolder.setText(questions[questionNumber]);
                   else
                       Toast.makeText(menu.this,"No more questions!",Toast.LENGTH_LONG).show();
  
              }
          });
  
          }
  
  @Override
  protected void onPause() {
      // TODO Auto-generated method stub
      super.onPause();
  }
  </code></pre>
  
  <p>}</p>