Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.imaadv.leaynik.Activities;
- import android.os.Bundle;
- import android.support.v4.app.Fragment;
- import android.support.v4.app.FragmentManager;
- import android.support.v7.app.AppCompatActivity;
- import com.imaadv.leaynik.R;
- import com.imaadv.leaynik.api.API;
- import com.imaadv.leaynik.defs.AppConstants;
- import com.imaadv.leaynik.defs.Test_Question;
- import com.imaadv.leaynik.test.Question_Module_Test;
- import java.util.ArrayList;
- /**
- * Created by NT on 10/19/15.
- */
- public class Consens_test_handler extends AppCompatActivity {
- int Image_Test_One = R.drawable.visial_test_06;
- int Image_Test_Two = R.drawable.visial_test_7;
- int Image_Test_Three = R.drawable.visial_test_8;
- int Image_Test_Four = R.drawable.visial_test_11;
- int Image_Test_Five = R.drawable.visial_test_06;
- private ArrayList<Test_Question> items;
- private API _api;
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.checks_activity);
- _api = new API(this);
- _api.setSetting(AppConstants.CURRENT_QUESTION_SCORE, "0");
- display_tests();
- }
- private void display_tests() {
- items = new ArrayList<Test_Question>(5);
- items.add(new Test_Question(AppConstants.CONSENS, AppConstants.QUESTION_ONE, Image_Test_One, Question_Module_Test.TEST_MODULE_TWO));
- items.add(new Test_Question(AppConstants.CONSENS, AppConstants.QUESTION_TWO, Image_Test_Two, Question_Module_Test.TEST_MODULE_TWO));
- items.add(new Test_Question(AppConstants.CONSENS, AppConstants.QUESTION_THREE, Image_Test_Three, Question_Module_Test.TEST_MODULE_TWO));
- items.add(new Test_Question(AppConstants.CONSENS, AppConstants.QUESTION_FOUR, Image_Test_Four, Question_Module_Test.TEST_MODULE_TWO));
- items.add(new Test_Question(AppConstants.CONSENS, AppConstants.QUESTION_FIVE, Image_Test_Five, Question_Module_Test.TEST_MODULE_TWO));
- Bundle bundle = new Bundle();
- bundle.putParcelableArrayList(Question_Module_Test.QUESTION_TAG_KEY, items);
- bundle.putString(AppConstants.CURRENT_QUESTION_POS, "0");
- Fragment fragment = new Question_Module_Test();
- fragment.setArguments(bundle);
- FragmentManager fm = getSupportFragmentManager();
- fm.beginTransaction().replace(R.id.frame_container ,fragment).commit();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement