// Path: app/src/main/java/com/aepronunciation/ipa/MainActivity.java
// public static final String NUMBER_OF_QUESTIONS_KEY = "numberOfQuestions";
// 
// Path: app/src/main/java/com/aepronunciation/ipa/MainActivity.java
// public static final String TEST_MODE_KEY = "testMode";
// 
// Path: app/src/main/java/com/aepronunciation/ipa/MainActivity.java
// public static final String TEST_NAME_KEY = "testName";
// 
// Path: app/src/main/java/com/aepronunciation/ipa/MainActivity.java
// public static final int TEST_RESULTS_RESULT = 0;


import android.content.Intent;
import android.media.AudioManager;
import android.media.SoundPool;
import android.os.Bundle;
import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;
import java.util.ArrayList;
import static com.aepronunciation.ipa.MainActivity.NUMBER_OF_QUESTIONS_KEY;
import static com.aepronunciation.ipa.MainActivity.TEST_MODE_KEY;
import static com.aepronunciation.ipa.MainActivity.TEST_NAME_KEY;
import static com.aepronunciation.ipa.MainActivity.TEST_RESULTS_RESULT;
    }

    private void nextClick() {
        if (getActivity() == null) return;

        String userAnswer = tvInputWindow.getText().toString();

        // record correct answer and user answer
        Answer thisAnswer = new Answer();
        thisAnswer.setCorrectAnswer(currentIpa);
        thisAnswer.setUserAnswer(userAnswer);
        answers.add(thisAnswer);

        // reset values
        tvInputWindow.setText("");
        inputKeyCounter = 0;
        readyForNewSound = true;
        nextButton.setVisibility(View.INVISIBLE);

        questionNumber++;

        if (questionNumber == totalNumberOfQuestions) {

            // Start test results activity
            Intent intent = new Intent(getActivity(), TestResultsActivity.class);
            intent.putExtra(TEST_NAME_KEY, studentName);
            intent.putExtra(TEST_MODE_KEY, testMode.getPersistentMemoryString());
            intent.putExtra("time", System.nanoTime() - startTime);
            intent.putParcelableArrayListExtra(
                    "com.aepronunciation.ipa.testAnswers", answers);
// Path: app/src/main/java/com/aepronunciation/ipa/MainActivity.java
// public static final String NUMBER_OF_QUESTIONS_KEY = "numberOfQuestions";
// 
// Path: app/src/main/java/com/aepronunciation/ipa/MainActivity.java
// public static final String TEST_MODE_KEY = "testMode";
// 
// Path: app/src/main/java/com/aepronunciation/ipa/MainActivity.java
// public static final String TEST_NAME_KEY = "testName";
// 
// Path: app/src/main/java/com/aepronunciation/ipa/MainActivity.java
// public static final int TEST_RESULTS_RESULT = 0;


// Path: app/src/main/java/com/aepronunciation/ipa/TestContentFragment.java
import android.content.Intent;
import android.media.AudioManager;
import android.media.SoundPool;
import android.os.Bundle;
import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;
import java.util.ArrayList;
import static com.aepronunciation.ipa.MainActivity.NUMBER_OF_QUESTIONS_KEY;
import static com.aepronunciation.ipa.MainActivity.TEST_MODE_KEY;
import static com.aepronunciation.ipa.MainActivity.TEST_NAME_KEY;
import static com.aepronunciation.ipa.MainActivity.TEST_RESULTS_RESULT;

    }

    private void nextClick() {
        if (getActivity() == null) return;

        String userAnswer = tvInputWindow.getText().toString();

        // record correct answer and user answer
        Answer thisAnswer = new Answer();
        thisAnswer.setCorrectAnswer(currentIpa);
        thisAnswer.setUserAnswer(userAnswer);
        answers.add(thisAnswer);

        // reset values
        tvInputWindow.setText("");
        inputKeyCounter = 0;
        readyForNewSound = true;
        nextButton.setVisibility(View.INVISIBLE);

        questionNumber++;

        if (questionNumber == totalNumberOfQuestions) {

            // Start test results activity
            Intent intent = new Intent(getActivity(), TestResultsActivity.class);
            intent.putExtra(TEST_NAME_KEY, studentName);
            intent.putExtra(TEST_MODE_KEY, testMode.getPersistentMemoryString());
            intent.putExtra("time", System.nanoTime() - startTime);
            intent.putParcelableArrayListExtra(
                    "com.aepronunciation.ipa.testAnswers", answers);
            getActivity().startActivityForResult(intent, TEST_RESULTS_RESULT);