Update content of a Dialog with custom view after Click
<p>I am using a Dialog to show a sequence of quizzes in Android. I would like to show the next quiz once the user answers True or False.</p>

<p>I am using a custom layout and I am controlling it with the following code:</p>

<pre><code>public void showQuizDialog() {
    View v;
    TextView question;
    // Textview showing Quiz 1 out of 3
    TextView numQ;
    NetworkImageView image;
    ImageLoader imageLoader = AppController.getInstance().getImageLoader();

    // The coordinator keeps track of the game
    coordinator.setQuizStarted();
    // Get the quiz using the coordinator
    Quiz qX = coordinator.getQuiz();
    final String answer = qX.getAnswer();
    final String quizTracker = coordinator.getTracker();

    // Create an instance of the dialog fragment
    AlertDialog.Builder quiz = new AlertDialog.Builder(MyActivity.this);

    LayoutInflater inflater = MyActivity.this.getLayoutInflater();

    // Inflate and set the layout for the dialog
    v = inflater.inflate(R.layout.quiz_layout,null);

    // Set the question
    question = (TextView) v.findViewById(R.id.content_quiz);
    question.setText(qX.getQuestion());

    // Set current number of question
    numQ = (TextView) v.findViewById(R.id.number_quiz);
    numQ.setText(quizTracker);

    // Retrieves the image from url
    image = (NetworkImageView) v.findViewById(R.id.thumbnail_quiz);
    if (imageLoader == null)
        imageLoader = AppController.getInstance().getImageLoader();
    String urlImage = getCompleteUrl(CODE_QUIZ_IMG);
    urlImage += qX.getImg();
    image.setImageUrl(urlImage, imageLoader);


    quiz.setPositiveButton("True", new DialogInterface.OnClickListener() {
            public void onClick(DialogInterface dialog, int id) {
                // User clicked OK button
                if (answer.equals(quiz_true)) {
                    coordinator.notifyCorrectQuizNum();
                    Log.d(QUIZ_DIALOG,"\t\tCorrect answer! it was true");
                }
                coordinator.setQuizEnded(true);
                coordinator.updateQuizLeft();
            }
        })
      .setNegativeButton("False", new DialogInterface.OnClickListener() {
                    public void onClick(DialogInterface dialog, int id) {
                        // User clicked to False btn

                        if (answer.equals(quiz_false)){
                            Log.d(QUIZ_DIALOG,"\t\tCorrect Answer!! It was false");
                            coordinator.notifyCorrectQuizNum();
                        }
                        coordinator.setQuizEnded(true);
                        coordinator.updateQuizLeft();
                    }
                });

    quiz.setView(v);

    final AlertDialog dialog = quiz.create();
    dialog.setCancelable(false);
    dialog.setCanceledOnTouchOutside(false);
    dialog.show();
} 
</code></pre>

<p>Let's say there are 100 quizzes to show and a method of the Coordinator class that returns the number of remaining quizzes. </p>

<p>So, after the call </p>

<pre><code>coordinator.setQuizEnded(true);
coordinator.updateQuizLeft();
</code></pre>

<p>the <code>coordinator.getQuizLeft()</code> will return 99. And <code>coordinator.getQuiz()</code> will point to the next quiz. </p>

<p>How do I update the <code>TextView question</code> and <code>numQ</code> without closing the dialog?</p>