| | |
| | | private List<SimulateNightBean.QuestionBean> tempQs= new ArrayList<>(); |
| | | private TableRow tableRow1,tableRow2,tableRow3; |
| | | |
| | | private Button btn_1,btn_2; |
| | | private List<Integer> btn_ids = new ArrayList<Integer>(); |
| | | |
| | | private Handler mHandler = new Handler(new Handler.Callback() { |
| | | @Override |
| | |
| | | av_park.setColor(aaa(safeluck.drive.evaluation.DB.Constant.EXAM_MAP_TYPE_PARK)); |
| | | av_curve.setColor(aaa(safeluck.drive.evaluation.DB.Constant.EXAM_MAP_TYPE_CURVE)); |
| | | av_zhijiao.setColor(aaa(safeluck.drive.evaluation.DB.Constant.EXAM_MAP_TYPE_ANGLE)); |
| | | |
| | | for (int i = 0; i < btn_ids.size(); i++) { |
| | | int viewId = getResources().getIdentifier(String.valueOf(btn_ids.get(i)),"id",_mActivity.getPackageName()); |
| | | ((Button) view.findViewById(viewId)).setBackgroundColor(100+i+1); |
| | | } |
| | | } |
| | | if (msg.what == SPEED_DATA){ |
| | | tv_speed.setText(_mActivity.getApplicationContext().getResources().getString(R.string.speed,speed)); |
| | |
| | | return getResources().getColor(R.color.examing); |
| | | } |
| | | |
| | | /** |
| | | * 路考项目 每个项目的颜色变化 |
| | | * @param type |
| | | * @return |
| | | */ |
| | | private int bbb(int type) { |
| | | if (examStatusList!=null &&examStatusList.size()>0){ |
| | | for (ExamStatus examStatus: |
| | | examStatusList) { |
| | | if (type == examStatus.getMap_item()){ |
| | | if (examStatus.getEnter() == safeluck.drive.evaluation.DB.Constant.BEGIN_ITEM){ |
| | | //进入考场 |
| | | if (examStatusList.get(0).getStartExam() == Constant.NONE_BEEN_START_EXAM){ |
| | | //结束考试了 |
| | | MyLog.i("进入考场结束考试,startexam="+examStatus.getStartExam()); |
| | | return getResources().getColor(R.color.colorAccent); |
| | | }else{ |
| | | MyLog.i("进入考场,type="+type); |
| | | return getResources().getColor(R.color.pink); |
| | | } |
| | | |
| | | |
| | | }else if (examStatus.getEnter() == safeluck.drive.evaluation.DB.Constant.FINISH_ITEM){ |
| | | |
| | | if (examStatusList.get(0).getStartExam()==Constant.NONE_BEEN_START_EXAM){ |
| | | return getResources().getColor(R.color.examing); |
| | | } |
| | | String ss=ExamPlatformData.getInstance().getItemStatusStr(type); |
| | | if (item_conents.contains(ss)) { |
| | | MyLog.i("该项考试失败,type="+type); |
| | | |
| | | return getResources().getColor(R.color.colorAccent); |
| | | }else{ |
| | | if (examStatus.getResult() ==1){ |
| | | MyLog.i(String.format("已经播放过%s合格",ss)); |
| | | }else{ |
| | | ExamPlatformData.getInstance().getTTS().speak(String.format("%s合格",ss)); |
| | | examStatusViewModel.updateItemExamResult(1,examStatus.getMap_id()); |
| | | } |
| | | |
| | | return getResources().getColor(R.color.train_btn_return); |
| | | } |
| | | |
| | | }else{ |
| | | return getResources().getColor(R.color.examing); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | return getResources().getColor(R.color.examing); |
| | | } |
| | | |
| | | |
| | | private void showChangKaoOrLukao(int exam_type){ |
| | | if (exam_type > ExamPlatformData.EXAM_TYPE_ChangKAO){ |
| | |
| | | mScoreAdapter.addDatas(mArrayList); |
| | | MyLog.i("item_score="+item_id); |
| | | } |
| | | //TODO 发送JKMessage0203 给平台,这儿有点复杂,看怎么处理 |
| | | // sendJKMessage0203(failedProj_selects); |
| | | MyLog.i("没扣分之前得分:"+currTotalScore); |
| | | currTotalScore -=item_id; |
| | | MyLog.i("当前得分:"+currTotalScore); |
| | |
| | | |
| | | |
| | | |
| | | |
| | | private void initView(View view) { |
| | | btn_ids.add(R.id.btn_1); |
| | | btn_ids.add(R.id.btn_2); |
| | | btn_ids.add(R.id.btn_3); |
| | | btn_ids.add(R.id.btn_4); |
| | | btn_ids.add(R.id.btn_5); |
| | | btn_ids.add(R.id.btn_6); |
| | | btn_ids.add(R.id.btn_7); |
| | | btn_ids.add(R.id.btn_8); |
| | | btn_ids.add(R.id.btn_9); |
| | | btn_ids.add(R.id.btn_10); |
| | | |
| | | |
| | | view.findViewById(R.id.iv_head).setOnClickListener(this); |
| | | av_curve = view.findViewById(R.id.av3); |