文档章节

JC_ExaminationActivity

无法预知
 无法预知
发布于 2016/01/11 13:47
字数 2433
阅读 30
收藏 1

package com.jicheng.android.project.ui.activity;

import java.util.ArrayList;
import java.util.List;

import com.jicheng.android.project.R;
import com.jicheng.android.project.db.JC_DbHelper;
import com.jicheng.android.project.db.responsevo.AnswerColumns;
import com.jicheng.android.project.db.responsevo.DBManager;
import com.jicheng.android.project.db.responsevo.ErrorColumns;
import com.jicheng.android.project.db.responsevo.JC_BaseColumns;
import com.jicheng.android.project.db.responsevo.JC_CauseInfo;
import com.jicheng.android.project.preferences.ConfigPreferences;
import com.jicheng.android.project.ui.adapter.JC_AnswerSheetAdapter;
import com.jicheng.android.project.ui.base.BaseFragmentActivity;
import com.jicheng.android.project.ui.widget.JCGridView;

import android.os.AsyncTask;
import android.os.Bundle;
import android.text.TextUtils;
import android.util.Log;
import android.view.GestureDetector;
import android.view.MotionEvent;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;

/**
 *
 * @Title: JC_ChapterExaminationActivity.java
 * @Package : com.jicheng.android.project.ui.activity
 * @Description: TODO(章节考试)
 * @author : xiezhenggen
 * @date : 2015年12月29日 下午3:09:20
 * @version V1.0
 */
public class JC_ExaminationActivity extends BaseFragmentActivity implements OnClickListener, OnItemClickListener {

 /**
  * 答题卡
  */
 private JCGridView jc_answer_sheet_gv;

 private JC_AnswerSheetAdapter mAnswerSheetAdapter;

 private List<String> mAnswerSheetList;
 /**
  * 考试数据
  */
 private ArrayList<JC_CauseInfo> list;

 /**
  * 标题名称
  */
 private TextView titlebar_title;

 /**
  * 已做题目数量和总题目数量
  */
 private TextView jc_has_been_done_tv;
 /**
  * 题目内容标题
  */
 private TextView jc_unit_title_content_tv; // jc_unit_title_content_tv;title

 /**
  * 题目类型
  */
 private TextView jc_unit_type;

 /**
  * A选项背景
  */
 private RelativeLayout jc_unit_relOne;
 /**
  * A选项图标
  */
 private ImageView jc_unit_imageOne_A_img;
 /**
  * A选项内容
  */
 private TextView jc_unit_selectOne_tv;

 /**
  * B选项背景
  */
 private RelativeLayout jc_unit_relTwo;
 /**
  * B选项图标
  */
 private ImageView jc_unit_imageTwo_B_img;
 /**
  * B选项内容
  */
 private TextView jc_unit_selectTwo_tv;

 /**
  * C选项背景
  */
 private RelativeLayout jc_unit_relThree;
 /**
  * C选项图标
  */
 private ImageView jc_unit_imageThree_C_img;
 /**
  * C选项内容
  */
 private TextView jc_selectThree_tv;

 /**
  * D选项背景
  */
 private RelativeLayout jc_unit_relFour;
 /**
  * D选项图标
  */
 private ImageView jc_unit_imageFour_D_img;
 /**
  * D选项内容
  */
 private TextView jc_unit_selectFour_tv;

 /**
  * 查看成绩
  */
 private Button jc_view_results_bt;

 DBManager dbManager;
 /**
  * 数据库管理器
  */
 private JC_DbHelper downloadManager;

 /**
  * 点击主题选择
  */
 private boolean isClickSelectSubject;
 /**
  * 触摸事件
  */
 private GestureDetector mGestureDetector;

 @Override
 public void onCreate(Bundle savedInstanceState) {
  // TODO Auto-generated method stub
  super.onCreate(savedInstanceState);
  setContentView(R.layout.jc_unit_test_questions);
  mAnswerSheetList = new ArrayList<String>();
  for (int i = 1; i <= 16; i++) {
   mAnswerSheetList.add("A");
  }
  downloadManager = JC_DbHelper.getInstance(this);// DownloadService.getDownloadManager(this);
  dbManager = downloadManager.getInstance();
  mGestureDetector = new GestureDetector(this, mSimpleOnGestureListener);
  // 先读取数据库中的缓存, 数据量较多比较耗时,应使用AsyncTask
  new QueryTask().execute();

  mAnswerSheetAdapter = new JC_AnswerSheetAdapter(this, (ArrayList<String>) mAnswerSheetList);
  jc_answer_sheet_gv = (JCGridView) findViewById(R.id.jc_answer_sheet_gv);
  jc_answer_sheet_gv.setAdapter(mAnswerSheetAdapter);
  jc_answer_sheet_gv.setFocusable(false);
  jc_answer_sheet_gv.setOnItemClickListener(this);

  titlebar_title = (TextView) findViewById(R.id.titlebar_title);
  jc_has_been_done_tv = (TextView) findViewById(R.id.jc_has_been_done_tv);
  jc_unit_title_content_tv = (TextView) findViewById(R.id.jc_unit_title_content_tv);
  jc_unit_type = (TextView) findViewById(R.id.jc_unit_type);

  jc_unit_relOne = (RelativeLayout) findViewById(R.id.jc_unit_relOne);
  jc_unit_relOne.setOnClickListener(this);
  jc_unit_imageOne_A_img = (ImageView) findViewById(R.id.jc_unit_imageOne);
  jc_unit_selectOne_tv = (TextView) findViewById(R.id.jc_unit_selectOne_tv);
  jc_unit_selectOne_tv.setOnClickListener(this);

  jc_unit_relTwo = (RelativeLayout) findViewById(R.id.jc_unit_relTwo);
  jc_unit_relTwo.setOnClickListener(this);
  jc_unit_imageTwo_B_img = (ImageView) findViewById(R.id.jc_unit_imageTwo);
  jc_unit_selectTwo_tv = (TextView) findViewById(R.id.jc_unit_selectTwo);
  jc_unit_selectTwo_tv.setOnClickListener(this);

  jc_unit_relThree = (RelativeLayout) findViewById(R.id.jc_unit_relThree);
  jc_unit_relThree.setOnClickListener(this);
  jc_unit_imageThree_C_img = (ImageView) findViewById(R.id.jc_unit_imageThree);
  jc_selectThree_tv = (TextView) findViewById(R.id.jc_selectThree);
  jc_selectThree_tv.setOnClickListener(this);

  jc_unit_relFour = (RelativeLayout) findViewById(R.id.jc_unit_relFour);
  jc_unit_relFour.setOnClickListener(this);
  jc_unit_imageFour_D_img = (ImageView) findViewById(R.id.jc_unit_imageFour);
  jc_unit_selectFour_tv = (TextView) findViewById(R.id.jc_unit_selectFour);
  jc_unit_selectFour_tv.setOnClickListener(this);

  jc_view_results_bt = (Button) findViewById(R.id.jc_view_results_bt);

 }

 private int i = 0;
 /**
  * 单选多选判断
  */
 private boolean isSelectA;
 private boolean isSelectB;
 private boolean isSelectC;
 private boolean isSelectD;

 private class QueryTask extends AsyncTask<Void, Void, ArrayList<JC_CauseInfo>> {
  @Override
  protected ArrayList<JC_CauseInfo> doInBackground(Void... params) {
   list = DBManager.getInstance(JC_ExaminationActivity.this).queryExam(AnswerColumns.TABLE_NAME);
   return list;
  }

  @Override
  protected void onPostExecute(ArrayList<JC_CauseInfo> list) {
   if (list.size() == 0) {
    jc_has_been_done_tv.setText("0/0");
    jc_unit_selectOne_tv.setText("");
    jc_unit_selectTwo_tv.setText("");
    jc_selectThree_tv.setText("");
    jc_unit_selectFour_tv.setText("");
    return;
   }
   int lastSelect = ConfigPreferences.getInstance(JC_ExaminationActivity.this).isLastSelectExam();
   i = lastSelect - 1;
   JC_CauseInfo myData = list.get(lastSelect - 1);
   jc_unit_title_content_tv.setText(lastSelect + "." + myData.getProblem());
   jc_unit_type.setText("题型:" + myData.getOption_types());
   jc_has_been_done_tv.setText(lastSelect + "/" + list.size());
   if ("单选".equals(myData.getOption_types())) {

    jc_unit_relThree.setVisibility(View.VISIBLE);
    jc_unit_relFour.setVisibility(View.VISIBLE);
    jc_unit_selectOne_tv.setText("A." + myData.getOption_a());
    jc_unit_selectTwo_tv.setText("B." + myData.getOption_b());
    jc_selectThree_tv.setText("C." + myData.getOption_c());
    jc_unit_selectFour_tv.setText("D." + myData.getOption_d());
   } else if ("多选".equals(myData.getOption_types())) {

    jc_unit_relThree.setVisibility(View.VISIBLE);
    jc_unit_relFour.setVisibility(View.VISIBLE);
    jc_unit_selectOne_tv.setText("A." + myData.getOption_a());
    jc_unit_selectTwo_tv.setText("B." + myData.getOption_b());
    jc_selectThree_tv.setText("C." + myData.getOption_c());
    jc_unit_selectFour_tv.setText("D." + myData.getOption_d());
   } else if ("判断".equals(myData.getOption_types())) {

    jc_unit_relThree.setVisibility(View.GONE);
    jc_unit_relFour.setVisibility(View.GONE);
    jc_unit_selectOne_tv.setText(myData.getOption_a());
    jc_unit_selectTwo_tv.setText(myData.getOption_b());
   }
  }
 }

 @Override
 public void onDownloadStateChanged(String info) {
  // TODO Auto-generated method stub

 }

 @Override
 public void onDownloadProgressed(String result) {
  // TODO Auto-generated method stub

 }

 @Override
 public String getAccessNetworkData(String networkData) {
  // TODO Auto-generated method stub
  return null;
 }

 @Override
 public String addGequestURL() {
  // TODO Auto-generated method stub
  return null;
 }

 @Override
 public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
  // TODO Auto-generated method stub

  ChoiceQuestions(position);

 }

 @Override
 public void onClick(View v) {
  // TODO Auto-generated method stub
  if (list.size() == 0) {
   return;
  }
  JC_CauseInfo myData = list.get(i);
  String types = myData.getOption_types();
  String daan_one = myData.getDaan_one();
  String daan_tow = myData.getDaan_tow();
  String daan_three = myData.getDaan_three();
  String daan_four = myData.getDaan_four();
  switch (v.getId()) {
  case R.id.jc_unit_selectOne_tv:
   if ("单选".equals(types)) {
    DefaultConfigurationImg();
    myData.setReply(JC_BaseColumns.A);
    DBManager.getInstance(this).update(AnswerColumns.TABLE_NAME, myData);
    if (!TextUtils.isEmpty(daan_one)) {
     jc_unit_imageOne_A_img.setImageResource(R.drawable.jc_option_a_up);
     jc_unit_relOne.setBackgroundResource(R.color.select_select);
     jc_unit_imageTwo_B_img.setImageResource(R.drawable.jc_option_b_in);
     jc_unit_imageThree_C_img.setImageResource(R.drawable.jc_option_c_in);
     jc_unit_imageFour_D_img.setImageResource(R.drawable.jc_option_d_in);
     jc_unit_relTwo.setBackgroundResource(R.color.jc_select_default_color);
     jc_unit_relThree.setBackgroundResource(R.color.jc_select_default_color);
     jc_unit_relFour.setBackgroundResource(R.color.jc_select_default_color);
    } else {
     DBManager.getInstance(this).insert(ErrorColumns.TABLE_NAME, myData);
     if (!TextUtils.isEmpty(daan_tow)) {
      jc_unit_imageOne_A_img.setImageResource(R.drawable.jc_option_a_up);
      jc_unit_relOne.setBackgroundResource(R.color.select_select);
      jc_unit_imageTwo_B_img.setImageResource(R.drawable.jc_option_b_in);
      jc_unit_imageThree_C_img.setImageResource(R.drawable.jc_option_c_in);
      jc_unit_imageFour_D_img.setImageResource(R.drawable.jc_option_d_in);
      jc_unit_relTwo.setBackgroundResource(R.color.jc_select_default_color);
      jc_unit_relThree.setBackgroundResource(R.color.jc_select_default_color);
      jc_unit_relFour.setBackgroundResource(R.color.jc_select_default_color);
     } else if (!TextUtils.isEmpty(daan_three)) {
      jc_unit_imageOne_A_img.setImageResource(R.drawable.jc_option_a_up);
      jc_unit_relOne.setBackgroundResource(R.color.select_select);
      jc_unit_imageTwo_B_img.setImageResource(R.drawable.jc_option_b_in);
      jc_unit_imageThree_C_img.setImageResource(R.drawable.jc_option_c_in);
      jc_unit_imageFour_D_img.setImageResource(R.drawable.jc_option_d_in);
      jc_unit_relTwo.setBackgroundResource(R.color.jc_select_default_color);
      jc_unit_relThree.setBackgroundResource(R.color.jc_select_default_color);
      jc_unit_relFour.setBackgroundResource(R.color.jc_select_default_color);
     } else if (!TextUtils.isEmpty(daan_four)) {
      jc_unit_imageOne_A_img.setImageResource(R.drawable.jc_option_a_up);
      jc_unit_relOne.setBackgroundResource(R.color.select_select);
      jc_unit_imageTwo_B_img.setImageResource(R.drawable.jc_option_b_in);
      jc_unit_imageThree_C_img.setImageResource(R.drawable.jc_option_c_in);
      jc_unit_imageFour_D_img.setImageResource(R.drawable.jc_option_d_in);
      jc_unit_relTwo.setBackgroundResource(R.color.jc_select_default_color);
      jc_unit_relThree.setBackgroundResource(R.color.jc_select_default_color);
      jc_unit_relFour.setBackgroundResource(R.color.jc_select_default_color);
     }
    }
   } else if ("多选".equals(types)) {
    isSelectA = !isSelectA;
    if (isSelectA) {
     jc_unit_relOne.setBackgroundResource(R.color.select_select);
     jc_unit_imageOne_A_img.setImageResource(R.drawable.jc_option_a_up);
    } else {
     jc_unit_relOne.setBackgroundResource(R.color.jc_select_default_color);
     jc_unit_imageOne_A_img.setImageResource(R.drawable.jc_option_a_in);
    }
   } else if ("判断".equals(types)) {
    jc_unit_imageOne_A_img.setImageResource(R.drawable.jc_option_a_in);
    jc_unit_imageTwo_B_img.setImageResource(R.drawable.jc_option_b_in);
    jc_unit_imageThree_C_img.setImageResource(R.drawable.jc_option_c_in);
    jc_unit_imageFour_D_img.setImageResource(R.drawable.jc_option_d_in);
    jc_selectThree_tv.setBackgroundResource(R.color.jc_select_default_color);
    jc_unit_relOne.setBackgroundResource(R.color.jc_select_default_color);
    jc_unit_relTwo.setBackgroundResource(R.color.jc_select_default_color);
    jc_unit_relThree.setBackgroundResource(R.color.jc_select_default_color);
    jc_unit_relFour.setBackgroundResource(R.color.jc_select_default_color);
    if (!TextUtils.isEmpty(daan_one)) {
     myData.setReply(JC_BaseColumns.TRUE);
     DBManager.getInstance(this).update(AnswerColumns.TABLE_NAME, myData);
     jc_unit_imageOne_A_img.setImageResource(R.drawable.more_select);
     jc_unit_relOne.setBackgroundResource(R.color.select_select);
     jc_unit_imageTwo_B_img.setImageResource(R.drawable.jc_option_b_in);
     jc_unit_relTwo.setBackgroundResource(R.color.jc_select_default_color);
    } else {
     DBManager.getInstance(this).insert(ErrorColumns.TABLE_NAME, myData);
     myData.setReply(JC_BaseColumns.TRUE);
     DBManager.getInstance(this).update(AnswerColumns.TABLE_NAME, myData);
     jc_unit_imageOne_A_img.setImageResource(R.drawable.more_select);
     jc_unit_relOne.setBackgroundResource(R.color.select_select);
     jc_unit_imageTwo_B_img.setImageResource(R.drawable.jc_option_b_in);
     jc_unit_relTwo.setBackgroundResource(R.color.jc_select_default_color);
    }
   }
   break;
  case R.id.jc_unit_selectTwo:
   if ("单选".equals(types)) {
    DefaultConfigurationImg();
    myData.setReply(JC_BaseColumns.B);
    DBManager.getInstance(this).update(AnswerColumns.TABLE_NAME, myData);
    if (!TextUtils.isEmpty(daan_tow)) {
     jc_unit_imageTwo_B_img.setImageResource(R.drawable.jc_option_b_up);
     jc_unit_relTwo.setBackgroundResource(R.color.select_select);
     jc_unit_imageOne_A_img.setImageResource(R.drawable.jc_option_a_in);
     jc_unit_imageThree_C_img.setImageResource(R.drawable.jc_option_c_in);
     jc_unit_imageFour_D_img.setImageResource(R.drawable.jc_option_d_in);
     jc_unit_relOne.setBackgroundResource(R.color.jc_select_default_color);
     jc_unit_relThree.setBackgroundResource(R.color.jc_select_default_color);
     jc_unit_relFour.setBackgroundResource(R.color.jc_select_default_color);
    } else {
     DBManager.getInstance(this).insert(ErrorColumns.TABLE_NAME, myData);
     if (!TextUtils.isEmpty(daan_one)) {
      jc_unit_imageTwo_B_img.setImageResource(R.drawable.jc_option_b_up);
      jc_unit_relTwo.setBackgroundResource(R.color.select_select);
      jc_unit_imageOne_A_img.setImageResource(R.drawable.jc_option_a_in);
      jc_unit_imageThree_C_img.setImageResource(R.drawable.jc_option_c_in);
      jc_unit_imageFour_D_img.setImageResource(R.drawable.jc_option_d_in);
      jc_unit_relOne.setBackgroundResource(R.color.jc_select_default_color);
      jc_unit_relThree.setBackgroundResource(R.color.jc_select_default_color);
      jc_unit_relFour.setBackgroundResource(R.color.jc_select_default_color);
     } else if (!TextUtils.isEmpty(daan_three)) {
      jc_unit_imageTwo_B_img.setImageResource(R.drawable.jc_option_b_up);
      jc_unit_relTwo.setBackgroundResource(R.color.select_select);
      jc_unit_imageOne_A_img.setImageResource(R.drawable.jc_option_a_in);
      jc_unit_imageThree_C_img.setImageResource(R.drawable.jc_option_c_in);
      jc_unit_imageFour_D_img.setImageResource(R.drawable.jc_option_d_in);
      jc_unit_relOne.setBackgroundResource(R.color.jc_select_default_color);
      jc_unit_relThree.setBackgroundResource(R.color.jc_select_default_color);
      jc_unit_relFour.setBackgroundResource(R.color.jc_select_default_color);
     } else if (!TextUtils.isEmpty(daan_four)) {
      jc_unit_imageTwo_B_img.setImageResource(R.drawable.jc_option_b_up);
      jc_unit_relTwo.setBackgroundResource(R.color.select_select);
      jc_unit_imageOne_A_img.setImageResource(R.drawable.jc_option_a_in);
      jc_unit_imageThree_C_img.setImageResource(R.drawable.jc_option_c_in);
      jc_unit_imageFour_D_img.setImageResource(R.drawable.jc_option_d_in);
      jc_unit_relOne.setBackgroundResource(R.color.jc_select_default_color);
      jc_unit_relThree.setBackgroundResource(R.color.jc_select_default_color);
      jc_unit_relFour.setBackgroundResource(R.color.jc_select_default_color);
     }
    }
   } else if ("多选".equals(types)) {
    isSelectB = !isSelectB;
    if (isSelectB) {
     jc_unit_relTwo.setBackgroundResource(R.color.select_select);
     jc_unit_imageTwo_B_img.setImageResource(R.drawable.jc_option_b_up);
    } else {
     jc_unit_relTwo.setBackgroundResource(R.color.jc_select_default_color);
     jc_unit_imageTwo_B_img.setImageResource(R.drawable.jc_option_b_in);
    }
   } else if ("判断".equals(types)) {
    jc_unit_imageOne_A_img.setImageResource(R.drawable.jc_option_a_in);
    jc_unit_imageTwo_B_img.setImageResource(R.drawable.jc_option_b_in);
    jc_unit_imageThree_C_img.setImageResource(R.drawable.jc_option_c_in);
    jc_unit_imageFour_D_img.setImageResource(R.drawable.jc_option_d_in);
    jc_selectThree_tv.setBackgroundResource(R.color.jc_select_default_color);
    jc_unit_relOne.setBackgroundResource(R.color.jc_select_default_color);
    jc_unit_relTwo.setBackgroundResource(R.color.jc_select_default_color);
    jc_unit_relThree.setBackgroundResource(R.color.jc_select_default_color);
    jc_unit_relFour.setBackgroundResource(R.color.jc_select_default_color);
    if (!TextUtils.isEmpty(daan_tow)) {
     myData.setReply(JC_BaseColumns.FALSE);
     DBManager.getInstance(this).update(AnswerColumns.TABLE_NAME, myData);
     jc_unit_imageTwo_B_img.setImageResource(R.drawable.more_select);
     jc_unit_relTwo.setBackgroundResource(R.color.select_select);
     jc_unit_imageOne_A_img.setImageResource(R.drawable.jc_option_a_in);
     jc_unit_relOne.setBackgroundResource(R.color.jc_select_default_color);
    } else {
     DBManager.getInstance(this).insert(ErrorColumns.TABLE_NAME, myData);
     myData.setReply(JC_BaseColumns.FALSE);
     DBManager.getInstance(this).update(AnswerColumns.TABLE_NAME, myData);
     jc_unit_imageTwo_B_img.setImageResource(R.drawable.more_select);
     jc_unit_relTwo.setBackgroundResource(R.color.select_select);
     jc_unit_imageOne_A_img.setImageResource(R.drawable.jc_option_a_in);
     jc_unit_relOne.setBackgroundResource(R.color.jc_select_default_color);
    }
   }

   break;

  case R.id.jc_selectThree:
   if ("单选".equals(types)) {
    DefaultConfigurationImg();
    myData.setReply(JC_BaseColumns.C);
    DBManager.getInstance(this).update(AnswerColumns.TABLE_NAME, myData);
    if (!TextUtils.isEmpty(daan_three)) {
     jc_unit_imageThree_C_img.setImageResource(R.drawable.jc_option_c_up);
     jc_unit_relThree.setBackgroundResource(R.color.select_select);
     jc_unit_imageOne_A_img.setImageResource(R.drawable.jc_option_a_in);
     jc_unit_imageTwo_B_img.setImageResource(R.drawable.jc_option_b_in);
     jc_unit_imageFour_D_img.setImageResource(R.drawable.jc_option_d_in);
     jc_unit_relOne.setBackgroundResource(R.color.jc_select_default_color);
     jc_unit_relTwo.setBackgroundResource(R.color.jc_select_default_color);
     jc_unit_relFour.setBackgroundResource(R.color.jc_select_default_color);
    } else {
     DBManager.getInstance(this).insert(ErrorColumns.TABLE_NAME, myData);
     if (!TextUtils.isEmpty(daan_one)) {
      jc_unit_imageThree_C_img.setImageResource(R.drawable.jc_option_c_up);
      jc_unit_relThree.setBackgroundResource(R.color.select_select);
      jc_unit_imageOne_A_img.setImageResource(R.drawable.jc_option_a_in);
      jc_unit_imageTwo_B_img.setImageResource(R.drawable.jc_option_b_in);
      jc_unit_imageFour_D_img.setImageResource(R.drawable.jc_option_d_in);
      jc_unit_relOne.setBackgroundResource(R.color.jc_select_default_color);
      jc_unit_relTwo.setBackgroundResource(R.color.jc_select_default_color);
      jc_unit_relFour.setBackgroundResource(R.color.jc_select_default_color);
     } else if (!TextUtils.isEmpty(daan_tow)) {
      jc_unit_imageThree_C_img.setImageResource(R.drawable.jc_option_c_up);
      jc_unit_relThree.setBackgroundResource(R.color.select_select);
      jc_unit_imageOne_A_img.setImageResource(R.drawable.jc_option_a_in);
      jc_unit_imageTwo_B_img.setImageResource(R.drawable.jc_option_b_in);
      jc_unit_imageFour_D_img.setImageResource(R.drawable.jc_option_d_in);
      jc_unit_relOne.setBackgroundResource(R.color.jc_select_default_color);
      jc_unit_relTwo.setBackgroundResource(R.color.jc_select_default_color);
      jc_unit_relFour.setBackgroundResource(R.color.jc_select_default_color);
     } else if (!TextUtils.isEmpty(daan_four)) {
      jc_unit_imageThree_C_img.setImageResource(R.drawable.jc_option_c_up);
      jc_unit_relThree.setBackgroundResource(R.color.select_select);
      jc_unit_imageOne_A_img.setImageResource(R.drawable.jc_option_a_in);
      jc_unit_imageTwo_B_img.setImageResource(R.drawable.jc_option_b_in);
      jc_unit_imageFour_D_img.setImageResource(R.drawable.jc_option_d_in);
      jc_unit_relOne.setBackgroundResource(R.color.jc_select_default_color);
      jc_unit_relTwo.setBackgroundResource(R.color.jc_select_default_color);
      jc_unit_relFour.setBackgroundResource(R.color.jc_select_default_color);
     }
    }
   } else if ("多选".equals(types)) {
    isSelectC = !isSelectC;
    if (isSelectC) {
     jc_unit_relThree.setBackgroundResource(R.color.select_select);
     jc_unit_imageThree_C_img.setImageResource(R.drawable.jc_option_c_up);
    } else {
     jc_unit_relThree.setBackgroundResource(R.color.jc_select_default_color);
     jc_unit_imageThree_C_img.setImageResource(R.drawable.jc_option_c_in);
    }
   }

   break;
  case R.id.jc_unit_selectFour:
   if ("单选".equals(types)) {
    DefaultConfigurationImg();
    myData.setReply(JC_BaseColumns.D);
    DBManager.getInstance(this).update(AnswerColumns.TABLE_NAME, myData);
    if (!TextUtils.isEmpty(daan_four)) {
     jc_unit_imageFour_D_img.setImageResource(R.drawable.jc_option_d_up);
     jc_unit_relFour.setBackgroundResource(R.color.select_select);
     jc_unit_imageOne_A_img.setImageResource(R.drawable.jc_option_a_in);
     jc_unit_imageTwo_B_img.setImageResource(R.drawable.jc_option_b_in);
     jc_unit_imageThree_C_img.setImageResource(R.drawable.jc_option_c_in);
     jc_unit_relOne.setBackgroundResource(R.color.jc_select_default_color);
     jc_unit_relTwo.setBackgroundResource(R.color.jc_select_default_color);
     jc_unit_relThree.setBackgroundResource(R.color.jc_select_default_color);
    } else {
     DBManager.getInstance(this).insert(ErrorColumns.TABLE_NAME, myData);
     if (!TextUtils.isEmpty(daan_one)) {
      jc_unit_imageFour_D_img.setImageResource(R.drawable.jc_option_d_up);
      jc_unit_relFour.setBackgroundResource(R.color.select_select);
      jc_unit_imageOne_A_img.setImageResource(R.drawable.jc_option_a_in);
      jc_unit_imageTwo_B_img.setImageResource(R.drawable.jc_option_b_in);
      jc_unit_imageThree_C_img.setImageResource(R.drawable.jc_option_c_in);
      jc_unit_relOne.setBackgroundResource(R.color.jc_select_default_color);
      jc_unit_relTwo.setBackgroundResource(R.color.jc_select_default_color);
      jc_unit_relThree.setBackgroundResource(R.color.jc_select_default_color);
     } else if (!TextUtils.isEmpty(daan_tow)) {
      jc_unit_imageFour_D_img.setImageResource(R.drawable.jc_option_d_up);
      jc_unit_relFour.setBackgroundResource(R.color.select_select);
      jc_unit_imageOne_A_img.setImageResource(R.drawable.jc_option_a_in);
      jc_unit_imageTwo_B_img.setImageResource(R.drawable.jc_option_b_in);
      jc_unit_imageThree_C_img.setImageResource(R.drawable.jc_option_c_in);
      jc_unit_relOne.setBackgroundResource(R.color.jc_select_default_color);
      jc_unit_relTwo.setBackgroundResource(R.color.jc_select_default_color);
      jc_unit_relThree.setBackgroundResource(R.color.jc_select_default_color);
     } else if (!TextUtils.isEmpty(daan_three)) {
      jc_unit_imageFour_D_img.setImageResource(R.drawable.jc_option_d_up);
      jc_unit_relFour.setBackgroundResource(R.color.select_select);
      jc_unit_imageOne_A_img.setImageResource(R.drawable.jc_option_a_in);
      jc_unit_imageTwo_B_img.setImageResource(R.drawable.jc_option_b_in);
      jc_unit_imageThree_C_img.setImageResource(R.drawable.jc_option_c_in);
      jc_unit_relOne.setBackgroundResource(R.color.jc_select_default_color);
      jc_unit_relTwo.setBackgroundResource(R.color.jc_select_default_color);
      jc_unit_relThree.setBackgroundResource(R.color.jc_select_default_color);
     }
    }
   } else if ("多选".equals(types)) {
    isSelectD = !isSelectD;
    if (isSelectD) {
     jc_unit_relFour.setBackgroundResource(R.color.select_select);
     jc_unit_imageFour_D_img.setImageResource(R.drawable.jc_option_d_up);
    } else {
     jc_unit_relFour.setBackgroundResource(R.color.jc_select_default_color);
     jc_unit_imageFour_D_img.setImageResource(R.drawable.jc_option_d_in);
    }
   }

   break;
  }

 }

 /**
  * @Description: TODO(切换到下一题)
  * @param
  * @return void 返回类型
  * @date: 2015年12月30日 上午11:16:26
  * @Author xiezhenggen
  */
 void switchNextQuestion() {

  if (i >= list.size() - 1) {
   return;
  }
  // answer.setText("");

  if (isClickSelectSubject) {
   i = ConfigPreferences.getInstance(this).isLastSelectExam() - 1;
   i += 1;
   isClickSelectSubject = false;
  } else {
   i += 1;
  }

  ChoiceQuestions(i);

 }

 /**
  * @Description: TODO(上一题)
  * @param
  * @return void 返回类型
  * @date: 2015年12月30日 下午5:05:55
  * @Author xiezhenggen
  */
 void back_last_question() {
  if (i <= 0) {
   return;
  }
  isSelectA = false;
  isSelectB = false;
  isSelectC = false;
  isSelectD = false;
  DefaultConfigurationImg();
  if (isClickSelectSubject) {
   i = ConfigPreferences.getInstance(this).isLastSelectExam() - 1;
   i -= 1;
   isClickSelectSubject = false;
  } else {
   i -= 1;
  }
  ChoiceQuestions(i);
 }

 /**
  * @Description: TODO(选择问题)
  * @param: i
  * @return: void 返回类型
  * @date: 2016年1月4日 上午10:45:05
  * @Author: xiezhenggen
  */
 private void ChoiceQuestions(int i) {
  isSelectA = false;
  isSelectB = false;
  isSelectC = false;
  isSelectD = false;
  DefaultConfigurationImg();
  ConfigPreferences.getInstance(this).setLastSelectExam(i + 1);
  JC_CauseInfo myDataForward = list.get(i);
  jc_has_been_done_tv.setText((i + 1) + "/" + list.size());
  if ("单选".equals(myDataForward.getOption_types())) {
   jc_unit_relThree.setVisibility(View.VISIBLE);
   jc_unit_relFour.setVisibility(View.VISIBLE);
  } else if ("多选".equals(myDataForward.getOption_types())) {
   jc_unit_relThree.setVisibility(View.VISIBLE);
   jc_unit_relFour.setVisibility(View.VISIBLE);
  } else if ("判断".equals(myDataForward.getOption_types())) {
   jc_unit_relThree.setVisibility(View.GONE);
   jc_unit_relFour.setVisibility(View.GONE);
  }
  int replyForward = myDataForward.getReply();
  switch (replyForward) {
  case JC_BaseColumns.NULL:
   SelectTopicContent(myDataForward);
   break;
  case JC_BaseColumns.A:
   if (myDataForward.daan_one.equals("A")) {
    jc_unit_imageOne_A_img.setImageResource(R.drawable.more_select);
    jc_unit_relOne.setBackgroundResource(R.color.select_select);
   } else {
    if (!TextUtils.isEmpty(myDataForward.daan_tow)) {
     jc_unit_imageOne_A_img.setImageResource(R.drawable.more_select);
     jc_unit_relOne.setBackgroundResource(R.color.select_select);
    } else if (!TextUtils.isEmpty(myDataForward.daan_three)) {
     jc_unit_imageOne_A_img.setImageResource(R.drawable.more_select);
     jc_unit_relOne.setBackgroundResource(R.color.select_select);
    } else if (!TextUtils.isEmpty(myDataForward.daan_four)) {
     jc_unit_imageOne_A_img.setImageResource(R.drawable.more_select);
     jc_unit_relOne.setBackgroundResource(R.color.select_select);
    }
   }
   SelectTopicContent(myDataForward);
   break;

  case JC_BaseColumns.B:
   if (myDataForward.daan_tow.equals("B")) {
    jc_unit_imageTwo_B_img.setImageResource(R.drawable.more_select);
    jc_unit_relTwo.setBackgroundResource(R.color.select_select);
   } else {
    if (!TextUtils.isEmpty(myDataForward.daan_one)) {
     jc_unit_imageTwo_B_img.setImageResource(R.drawable.more_select);
     jc_unit_relTwo.setBackgroundResource(R.color.select_select);
    } else if (!TextUtils.isEmpty(myDataForward.daan_three)) {
     jc_unit_imageTwo_B_img.setImageResource(R.drawable.more_select);
     jc_unit_relTwo.setBackgroundResource(R.color.select_select);
    } else if (!TextUtils.isEmpty(myDataForward.daan_four)) {
     jc_unit_imageTwo_B_img.setImageResource(R.drawable.more_select);
     jc_unit_relTwo.setBackgroundResource(R.color.select_select);
    }
   }
   SelectTopicContent(myDataForward);
   break;

  case JC_BaseColumns.C:
   if (myDataForward.daan_three.equals("C")) {
    jc_unit_imageThree_C_img.setImageResource(R.drawable.more_select);
    jc_unit_relThree.setBackgroundResource(R.color.select_select);
    jc_selectThree_tv.setBackgroundResource(R.color.select_select);
   } else {
    if (!TextUtils.isEmpty(myDataForward.daan_one)) {
     jc_unit_imageThree_C_img.setImageResource(R.drawable.more_select);
     jc_unit_relThree.setBackgroundResource(R.color.select_select);
    } else if (!TextUtils.isEmpty(myDataForward.daan_tow)) {
     jc_unit_imageThree_C_img.setImageResource(R.drawable.more_select);
     jc_unit_relThree.setBackgroundResource(R.color.select_select);
    } else if (!TextUtils.isEmpty(myDataForward.daan_four)) {
     jc_unit_imageThree_C_img.setImageResource(R.drawable.more_select);
     jc_unit_relThree.setBackgroundResource(R.color.select_select);
    }
   }
   SelectTopicContent(myDataForward);
   break;

  case JC_BaseColumns.D:
   if (myDataForward.daan_four.equals("D")) {
    jc_unit_imageFour_D_img.setImageResource(R.drawable.more_select);
    jc_unit_relFour.setBackgroundResource(R.color.select_select);
   } else {
    if (!TextUtils.isEmpty(myDataForward.daan_one)) {
     jc_unit_imageFour_D_img.setImageResource(R.drawable.more_select);
     jc_unit_relFour.setBackgroundResource(R.color.select_select);
    } else if (!TextUtils.isEmpty(myDataForward.daan_tow)) {
     jc_unit_imageFour_D_img.setImageResource(R.drawable.more_select);
     jc_unit_relFour.setBackgroundResource(R.color.select_select);
    } else if (!TextUtils.isEmpty(myDataForward.daan_three)) {
     jc_unit_imageFour_D_img.setImageResource(R.drawable.more_select);
     jc_unit_relFour.setBackgroundResource(R.color.select_select);
    }
   }
   SelectTopicContent(myDataForward);
   break;

  case JC_BaseColumns.AB:
   MultiplechoiceContent(myDataForward);
   jc_unit_imageOne_A_img.setImageResource(R.drawable.more_select);
   jc_unit_imageTwo_B_img.setImageResource(R.drawable.more_select);
   isSelectA = true;
   isSelectB = true;
   break;

  case JC_BaseColumns.AC:
   MultiplechoiceContent(myDataForward);
   jc_unit_imageOne_A_img.setImageResource(R.drawable.more_select);
   jc_unit_imageThree_C_img.setImageResource(R.drawable.more_select);
   isSelectA = true;
   isSelectC = true;
   break;

  case JC_BaseColumns.AD:
   MultiplechoiceContent(myDataForward);
   jc_unit_imageOne_A_img.setImageResource(R.drawable.more_select);
   jc_unit_imageFour_D_img.setImageResource(R.drawable.more_select);
   isSelectA = true;
   isSelectD = true;
   break;

  case JC_BaseColumns.BC:
   MultiplechoiceContent(myDataForward);
   jc_unit_imageTwo_B_img.setImageResource(R.drawable.more_select);
   jc_unit_imageThree_C_img.setImageResource(R.drawable.more_select);
   isSelectB = true;
   isSelectC = true;
   break;

  case JC_BaseColumns.BD:
   MultiplechoiceContent(myDataForward);
   jc_unit_imageTwo_B_img.setImageResource(R.drawable.more_select);
   jc_unit_imageFour_D_img.setImageResource(R.drawable.more_select);
   isSelectB = true;
   isSelectD = true;
   break;

  case JC_BaseColumns.CD:
   MultiplechoiceContent(myDataForward);
   jc_unit_imageThree_C_img.setImageResource(R.drawable.more_select);
   jc_unit_imageFour_D_img.setImageResource(R.drawable.more_select);
   isSelectC = true;
   isSelectD = true;
   break;

  case JC_BaseColumns.ABC:
   MultiplechoiceContent(myDataForward);
   jc_unit_imageOne_A_img.setImageResource(R.drawable.more_select);
   jc_unit_imageTwo_B_img.setImageResource(R.drawable.more_select);
   jc_unit_imageThree_C_img.setImageResource(R.drawable.more_select);
   isSelectA = true;
   isSelectB = true;
   isSelectC = true;
   break;

  case JC_BaseColumns.ABD:
   MultiplechoiceContent(myDataForward);
   jc_unit_imageOne_A_img.setImageResource(R.drawable.more_select);
   jc_unit_imageTwo_B_img.setImageResource(R.drawable.more_select);
   jc_unit_imageFour_D_img.setImageResource(R.drawable.more_select);
   isSelectA = true;
   isSelectB = true;
   isSelectD = true;
   break;

  case JC_BaseColumns.ACD:
   MultiplechoiceContent(myDataForward);
   jc_unit_imageOne_A_img.setImageResource(R.drawable.more_select);
   jc_unit_imageThree_C_img.setImageResource(R.drawable.more_select);
   jc_unit_imageFour_D_img.setImageResource(R.drawable.more_select);
   isSelectA = true;
   isSelectC = true;
   isSelectD = true;
   break;

  case JC_BaseColumns.BCD:
   MultiplechoiceContent(myDataForward);
   jc_unit_imageTwo_B_img.setImageResource(R.drawable.more_select);
   jc_unit_imageThree_C_img.setImageResource(R.drawable.more_select);
   jc_unit_imageFour_D_img.setImageResource(R.drawable.more_select);
   isSelectB = true;
   isSelectC = true;
   isSelectD = true;
   break;

  case JC_BaseColumns.ABCD:
   MultiplechoiceContent(myDataForward);
   jc_unit_imageOne_A_img.setImageResource(R.drawable.more_select);
   jc_unit_imageTwo_B_img.setImageResource(R.drawable.more_select);
   jc_unit_imageThree_C_img.setImageResource(R.drawable.more_select);
   jc_unit_imageFour_D_img.setImageResource(R.drawable.more_select);
   isSelectA = true;
   isSelectB = true;
   isSelectC = true;
   isSelectD = true;
   break;

  case JC_BaseColumns.TRUE:
   if (myDataForward.daan_one.equals("A")) {
    jc_unit_imageOne_A_img.setImageResource(R.drawable.jc_option_a_up);
    jc_unit_relOne.setBackgroundResource(R.color.select_select);
    jc_unit_imageTwo_B_img.setImageResource(R.drawable.jc_option_b_in);
    jc_unit_relTwo.setBackgroundResource(R.color.jc_select_default_color);
   } else {
    jc_unit_imageOne_A_img.setImageResource(R.drawable.jc_option_a_up);
    jc_unit_relOne.setBackgroundResource(R.color.select_select);
    jc_unit_imageTwo_B_img.setImageResource(R.drawable.jc_option_b_in);
    jc_unit_relTwo.setBackgroundResource(R.color.jc_select_default_color);
   }
   JudgmentQuestion(myDataForward);
   break;

  case JC_BaseColumns.FALSE:
   if (myDataForward.daan_tow.equals("B")) {
    jc_unit_imageTwo_B_img.setImageResource(R.drawable.jc_option_b_up);
    jc_unit_relTwo.setBackgroundResource(R.color.select_select);
    jc_unit_imageOne_A_img.setImageResource(R.drawable.jc_option_a_in);
    jc_unit_relOne.setBackgroundResource(R.color.jc_select_default_color);
   } else {
    jc_unit_imageTwo_B_img.setImageResource(R.drawable.jc_option_b_up);
    jc_unit_relTwo.setBackgroundResource(R.color.select_select);
    jc_unit_imageOne_A_img.setImageResource(R.drawable.jc_option_a_in);
    jc_unit_relOne.setBackgroundResource(R.color.jc_select_default_color);
   }
   JudgmentQuestion(myDataForward);
   break;

  default:
   break;
  }
 }

 /**
  * @Description: TODO(选择颜色)
  * @param i
  * @param @return
  * @return String 返回类型
  * @date: 2015年12月30日 上午11:55:58
  * @Author xiezhenggen
  */
 private String selectColor(int i) {
  String str = "";
  switch (i) {
  case 5:
   jc_unit_relOne.setBackgroundResource(R.color.select_select);
   jc_unit_relTwo.setBackgroundResource(R.color.select_select);
   break;
  case 6:
   jc_unit_relOne.setBackgroundResource(R.color.select_select);
   jc_unit_relThree.setBackgroundResource(R.color.select_select);
   break;
  case 7:
   jc_unit_relOne.setBackgroundResource(R.color.select_select);
   jc_unit_relFour.setBackgroundResource(R.color.select_select);
   break;

  case 8:
   jc_unit_relTwo.setBackgroundResource(R.color.select_select);
   jc_unit_relThree.setBackgroundResource(R.color.select_select);
   break;

  case 9:
   jc_unit_relTwo.setBackgroundResource(R.color.select_select);
   jc_unit_relFour.setBackgroundResource(R.color.select_select);
   break;

  case 10:
   jc_unit_relThree.setBackgroundResource(R.color.select_select);
   jc_unit_relFour.setBackgroundResource(R.color.select_select);
   break;

  case 11:
   jc_unit_relOne.setBackgroundResource(R.color.select_select);
   jc_unit_relTwo.setBackgroundResource(R.color.select_select);
   jc_unit_relThree.setBackgroundResource(R.color.select_select);
   break;

  case 12:
   jc_unit_relOne.setBackgroundResource(R.color.select_select);
   jc_unit_relTwo.setBackgroundResource(R.color.select_select);
   jc_unit_relFour.setBackgroundResource(R.color.select_select);
   break;

  case 13:
   jc_unit_relOne.setBackgroundResource(R.color.select_select);
   jc_unit_relThree.setBackgroundResource(R.color.select_select);
   jc_unit_relFour.setBackgroundResource(R.color.select_select);
   break;

  case 14:
   jc_unit_relTwo.setBackgroundResource(R.color.select_select);
   jc_unit_relThree.setBackgroundResource(R.color.select_select);
   jc_unit_relFour.setBackgroundResource(R.color.select_select);
   break;

  case 15:
   jc_unit_relOne.setBackgroundResource(R.color.select_select);
   jc_unit_relTwo.setBackgroundResource(R.color.select_select);
   jc_unit_relThree.setBackgroundResource(R.color.select_select);
   jc_unit_relFour.setBackgroundResource(R.color.select_select);
   break;

  default:
   break;
  }
  return str;
 }

 @Override
 public boolean dispatchTouchEvent(MotionEvent ev) {
  // TODO Auto-generated method stub
  mGestureDetector.onTouchEvent(ev); // 让GestureDetector响应触碰事件
  super.dispatchTouchEvent(ev); // 让Activity响应触碰事件
  return super.dispatchTouchEvent(ev);
 }

 @Override
 public boolean onTouchEvent(MotionEvent event) {
  // TODO Auto-generated method stub
  mGestureDetector.onTouchEvent(event);
  return super.onTouchEvent(event);
 }

 /**
  * 每次滑动只有一个跳动的滑动事件
  */
 GestureDetector.SimpleOnGestureListener mSimpleOnGestureListener = new GestureDetector.SimpleOnGestureListener() {
  public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) {
   Log.i("EEE", "e2=" + (e2.getX() - e1.getX()));
   // 控制只右滑
   if (e2.getX() - e1.getX() > 0 && (e1.getX() >= 0 && e1.getX() >= 300)) {

    Log.i("HHH", "下一题  左往右=" + (e2.getX() - e1.getX()));
    switchNextQuestion();// 下一题

   } else if (e1.getX() - e2.getX() > 0 && (e2.getX() >= 0 && e2.getX() <= 300)) {
    Log.i("HHH", "上一题  右往左=" + (e1.getX() - e2.getX()));
    back_last_question();// 上一题
   }
   return false;
  };
 };

 /**
  * @Description: TODO(选择题默认配置)
  * @param:
  * @return: void 返回类型
  * @date: 2016年1月4日 上午11:21:35
  * @Author: xiezhenggen
  */
 void DefaultConfigurationImg() {
  jc_unit_imageOne_A_img.setImageResource(R.drawable.jc_option_a_in);
  jc_unit_imageTwo_B_img.setImageResource(R.drawable.jc_option_b_in);
  jc_unit_imageThree_C_img.setImageResource(R.drawable.jc_option_c_in);
  jc_unit_imageFour_D_img.setImageResource(R.drawable.jc_option_d_in);
  jc_unit_relOne.setBackgroundResource(R.color.jc_select_default_color);
  jc_unit_relTwo.setBackgroundResource(R.color.jc_select_default_color);
  jc_unit_relThree.setBackgroundResource(R.color.jc_select_default_color);
  jc_unit_relFour.setBackgroundResource(R.color.jc_select_default_color);
 }

 /**
  * @Description: TODO(选择题内容)
  * @param: @param
  *             myDataForward
  * @return: void 返回类型
  * @date: 2016年1月4日 上午11:55:29
  * @Author: xiezhenggen
  */
 void SelectTopicContent(JC_CauseInfo myDataForward) {
  String timu_title = myDataForward.getProblem();
  String timu_one = myDataForward.getOption_a();
  String timu_tow = myDataForward.getOption_b();
  String timu_three = myDataForward.getOption_c();
  String timu_four = myDataForward.getOption_d();
  jc_unit_type.setText("题型:" + myDataForward.getOption_types());
  jc_unit_title_content_tv.setText((i + 1) + "." + timu_title);
  if ("单选".equals(myDataForward.getOption_types())) {
   jc_unit_selectOne_tv.setText("A." + timu_one);
   jc_unit_selectTwo_tv.setText("B." + timu_tow);
   jc_selectThree_tv.setText("C." + timu_three);
   jc_unit_selectFour_tv.setText("D." + timu_four);
  } else if ("多选".equals(myDataForward.getOption_types())) {
   jc_unit_selectOne_tv.setText("A." + timu_one);
   jc_unit_selectTwo_tv.setText("B." + timu_tow);
   jc_selectThree_tv.setText("C." + timu_three);
   jc_unit_selectFour_tv.setText("D." + timu_four);
  } else if ("判断".equals(myDataForward.getOption_types())) {
   jc_unit_selectOne_tv.setText(timu_one);
   jc_unit_selectTwo_tv.setText(timu_tow);
  }
  jc_unit_selectOne_tv.setClickable(true);
  jc_unit_selectTwo_tv.setClickable(true);
  jc_selectThree_tv.setClickable(true);
  jc_unit_selectFour_tv.setClickable(true);
 }

 /**
  * @Description: TODO(多选题内容)
  * @param: @param
  *             myDataForward
  * @return: void 返回类型
  * @date: 2016年1月4日 上午11:56:26
  * @Author: xiezhenggen
  */
 void MultiplechoiceContent(JC_CauseInfo myDataForward) {
  String timu_title = myDataForward.getProblem();
  String timu_one = myDataForward.getOption_a();
  String timu_tow = myDataForward.getOption_b();
  String timu_three = myDataForward.getOption_c();
  String timu_four = myDataForward.getOption_d();
  jc_unit_type.setText("题型:" + myDataForward.getOption_types());
  jc_unit_title_content_tv.setText((i + 1) + "." + timu_title);
  jc_unit_selectOne_tv.setText("A." + timu_one);
  jc_unit_selectTwo_tv.setText("B." + timu_tow);
  jc_selectThree_tv.setText("C." + timu_three);
  jc_unit_selectFour_tv.setText("D." + timu_four);
  selectColor(myDataForward.getReply());
 }

 /**
  * Judgment question
  *
  * @Description: TODO(判断题对错)
  * @param: @param
  *             myDataForward
  * @return: void 返回类型
  * @date: 2016年1月4日 下午1:49:31
  * @Author: xiezhenggen
  */

 void JudgmentQuestion(JC_CauseInfo myDataForward) {
  String timu_title = myDataForward.getProblem();
  String timu_one = myDataForward.getOption_a();
  String timu_tow = myDataForward.getOption_b();
  jc_unit_type.setText("题型:" + myDataForward.getOption_types());
  jc_unit_title_content_tv.setText((i + 1) + "." + timu_title);
  jc_unit_selectOne_tv.setText(timu_one);
  jc_unit_selectTwo_tv.setText(timu_tow);
  jc_unit_selectOne_tv.setClickable(false);
  jc_unit_selectTwo_tv.setClickable(false);
  jc_selectThree_tv.setClickable(false);
  jc_unit_selectFour_tv.setClickable(false);
 }
}

© 著作权归作者所有

下一篇: 无法预知
无法预知
粉丝 2
博文 3
码字总数 2533
作品 0
深圳
私信 提问
加载中

评论(4)

游龙惜凤
游龙惜凤

引用来自“无法预知”的评论

铜模

我就只给你发私信
无法预知
无法预知 博主
铜模
游龙惜凤
游龙惜凤
我再来看看
游龙惜凤
游龙惜凤
我来看看
java切割字符串将时间2015-12-31 12:12:55.000后面的毫秒删除掉

//这里切割字符串了 if(jc.jckssj.contains(".")){ mytime=jc.jckssj.substring(0,jc.jckssj.indexOf(".")); }else{ mytime=jc.jckssj; } 此时 mytime就是切割后的字符串......

761218914
2016/01/11
9
0
日本环球旅行友人在武汉失窃自行车被追回

日本自行车丢了后,辖区民警拿出手机,熟练的拨了个号码。 JC:尼玛呀,皇军的车子是你偷的吧? 电话那头:大哥,这事不是我干的,听道上说是刘二做的。也就这事最近闹的有点大,要不就这么点...

一号男嘉宾
2012/02/21
763
12
jeecms 数据被引用,不能删除。解决办法

数据被引用,不能删除。 Could not execute JDBC batch update; SQL [update jc_channel_model set tpl_content=?, model_id=? where channel_id=? and priority=?]; nested exception is or......

yimi
2014/05/14
1K
0
请问各位在Mysql中的一个查询问题?

SELECT channel_id FROM jc_channel WHERE parent_id=269 //此条查询语返回多条结果 SELECT jce.content_id,jce.title,jce.type_img,jce.release_date,jcc.comments,jcc.ups FROM jc_content......

慕容小伟
2015/08/29
106
4
PHP调用MYSQL存储过程获取不到返回值?

BEGIN DECLARE sTaskStatus INT DEFAULT -2; DECLARE cJcUserId INT; DECLARE cChoiceCode CHAR; DECLARE cHbNum INT; DECLARE sIdKey INT; DECLARE sTotalHB INT DEFAULT 0; DECLARE sRight......

悄悄地慢慢的
2014/05/15
756
0

没有更多内容

加载失败,请刷新页面

加载更多

parseint和isNaN用法

本文转载于:专业的前端网站➭parseint和isNaN用法 <!doctype html><html><head><meta charset="utf-8"><title>无标题文档</title></head><body><script> var a='12'; alert......

前端老手
33分钟前
4
0
Kylin 精确去重在用户行为分析中的妙用

作者:史少锋,Apache Kylin committer & PMC,2019/10/11 在上次文章《如何在 1 秒内做到大数据精准去重》中,我们介绍了 Apache Kylin 为什么要支持大数据集上的精确去重,以及基于 Bitmap...

ApacheKylin
44分钟前
3
0
学习记录(二) es6基本语法(rest参数,模板化,axios模块,拦截器)

日常学习记录 模块化:把一个大文件分成多个小文件,按照一定规范进行拼接 es5写法: 导出:module.exports = 数据 导入:require("路径") /路径未添加后缀名时 //默认添加.js //把路径作为文件名...

Pole丶逐
47分钟前
3
0
以程序员的角度怎么购买一台「性价比高的电视」

前俩天有小伙伴在我的文章下留言,说能否把 【国内电视机都介绍一下】,今天我已在TV端开发多年的程序员的角度。谈谈已程序员的角度如何购买一台性价比高的电视。 国内大的电视机品牌介绍 长...

我们都很努力着
51分钟前
2
0
PhotoShop 色调:理解直方图/RGB通道信息

一、直方图:图表的形式,展示图像像素分布的情况 1.平均值:表示平均亮度 2.标准偏差值:表示亮度值范围内的中间值 3.像素: 表示用于计算直方图的像素总数 4.色阶:显示指针下面的区域亮度...

东方墨天
56分钟前
7
0

没有更多内容

加载失败,请刷新页面

加载更多

返回顶部
顶部