| | |
| | | return getResources().getColor(R.color.examing); |
| | | } |
| | | |
| | | |
| | | private void showChangKaoOrLukao(int exam_type){ |
| | | if (exam_type > ExamPlatformData.EXAM_TYPE_ChangKAO){ |
| | | //show路考 |
| | | view.findViewById(R.id.lukao).setVisibility(View.VISIBLE); |
| | | view.findViewById(R.id.changkao).setVisibility(View.GONE); |
| | | }else{ |
| | | //show场考 |
| | | view.findViewById(R.id.lukao).setVisibility(View.GONE); |
| | | view.findViewById(R.id.changkao).setVisibility(View.VISIBLE); |
| | | } |
| | | } |
| | | View view; |
| | | @Nullable |
| | | @Override |
| | | public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { |
| | | View view = inflater.inflate(R.layout.layout_train_fragment, container, false); |
| | | view = inflater.inflate(R.layout.layout_train_fragment, container, false); |
| | | initView(view); |
| | | |
| | | failedProjViewModel = ViewModelProviders.of(this).get(FailedProjViewModel.class); |
| | |
| | | MyLog.i("路考当前得分:"+currTotalScore); |
| | | if (currTotalScore < Constant.PASSING_SCORE){ |
| | | MyLog.i("路考低于80,不合格"+currTotalScore); |
| | | // ExamPlatformData.getInstance().getTTS().speak("考试不合格"); |
| | | // stopExam(); |
| | | } |
| | | MyLog.i("路考监测到有失败项目加入,通知UI更新颜色"); |
| | | mHandler.obtainMessage(ADD_DATA).sendToTarget(); |
| | |
| | | MyLog.i("当前得分:"+currTotalScore); |
| | | if (currTotalScore < Constant.PASSING_SCORE){ |
| | | MyLog.i("低于80,不合格"+currTotalScore); |
| | | // ExamPlatformData.getInstance().getTTS().speak("考试不合格"); |
| | | // stopExam(); |
| | | } |
| | | MyLog.i("监测到有失败项目加入,通知UI更新颜色"); |
| | | mHandler.obtainMessage(ADD_DATA).sendToTarget(); |
| | |
| | | |
| | | Log.i(TAG, "ExamStatus onChanged: "); |
| | | if (examStatus!=null && examStatus.size()>0){ |
| | | showChangKaoOrLukao(examStatus.get(0).getStartExam()); |
| | | MyLog.i(TAG,"考试状态更新"); |
| | | examStatusList.clear(); |
| | | examStatusList.addAll(examStatus); |
| | |
| | | myDialogFragment.setCallback(new MyDialogFragment.Callback() { |
| | | @Override |
| | | public void changKao() { |
| | | |
| | | exam_type = 2; |
| | | iv_head.getDrawable().setLevel(1); |
| | | ExamPlatformData.getInstance().setTrainingMode(ExamPlatformData.TRAINING_MODE); |