Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class TestActivity extends ParentActivity {
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- nextButton = (Button) findViewById(R.id.nextButton);
- nextButton.setOnClickListener(new View.OnClickListener() {
- public void onClick(View v) {
- nextQuestion();
- }
- });
- }
- private void nextQuestion() {
- if (currentTest.incrementQuestionIndex()) {
- drawQuestion();
- } else {
- finishTest();
- }
- }
- private void finishTest() {
- user.saveTest(currentTest);
- Intent intent = new Intent(this, ResultActivity.class);
- startActivity(intent);
- finish();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment