| | |
| | | } |
| | | 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); |
| | |
| | | Log.i(TAG, "ExamStatus onChanged: "); |
| | | if (examStatus!=null && examStatus.size()>0){ |
| | | MyLog.i(TAG,"考试状态更新"); |
| | | showChangKaoOrLukao(examStatus.get(0).getStartExam()); |
| | | examStatusList.clear(); |
| | | examStatusList.addAll(examStatus); |
| | | mHandler.obtainMessage(ADD_DATA).sendToTarget(); |