app/src/main/java/edu/washington/briluu/quizdroid/QuestionFragment.java
// populate the screen with the question and choices
populate the screen with the question and choices
populate the screen with the question and choices
public void populateScreen(View v, Topic currentTopic, int questionNumber) {
        TextView questionText = (TextView) v.findViewById(R.id.question);
        Button firstButton = (Button) v.findViewById(R.id.first_choice);
        Button secButton = (Button) v.findViewById(R.id.second_choice);
        Button thirdButton = (Button) v.findViewById(R.id.third_choice);
        Button fourthButton = (Button) v.findViewById(R.id.fourth_choice);
        questionText.setText(currentTopic.getQuestions().get(questionNumber).getQuestion());
        String[] answers = currentTopic.getQuestions().get(questionNumber).getAnswers();
        firstButton.setText(answers[0]);
        secButton.setText(answers[1]);
        thirdButton.setText(answers[2]);
        fourthButton.setText(answers[3]);
    }
public void populateScreen ( View v , Topic currentTopic , int questionNumber ) { TextView questionText = ( TextView ) v . findViewById ( R . id . question ) ; Button firstButton = ( Button ) v . findViewById ( R . id . first_choice ) ; Button secButton = ( Button ) v . findViewById ( R . id . second_choice ) ; Button thirdButton = ( Button ) v . findViewById ( R . id . third_choice ) ; Button fourthButton = ( Button ) v . findViewById ( R . id . fourth_choice ) ; questionText . setText ( currentTopic . getQuestions ( ) . get ( questionNumber ) . getQuestion ( ) ) ; String [ ] answers = currentTopic . getQuestions ( ) . get ( questionNumber ) . getAnswers ( ) ; firstButton . setText ( answers [ 0 ] ) ; secButton . setText ( answers [ 1 ] ) ; thirdButton . setText ( answers [ 2 ] ) ; fourthButton . setText ( answers [ 3 ] ) ; }
populate the screen with the question and choices
populate the screen with the question and choices