此答题器可以通过Next按钮选择下一题,新写题目的类Question,有两个成员变量。
package com.android.testrecord; /** * Created by wang on 16-10-19. */ public class Question { private int mTextResId; private boolean mAnswerTrue; public Question(int textResId, boolean answerTrue) { mTextResId = textResId; mAnswerTrue = answerTrue; } public int getTextResId() { return mTextResId; } public boolean isAnswerTrue() { return mAnswerTrue; } public void setTextResId(int textResId) { mTextResId = textResId; } public void setAnswerTrue(boolean answerTrue) { mAnswerTrue = answerTrue; } }
package com.android.testrecord; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widg