| | |
| | | private ExamStatusViewModel examStatusViewModel; |
| | | private static final int ADD_DATA = 1; |
| | | private static final int SPEED_DATA = 2; |
| | | private ImageView iv_rtk_status; |
| | | private ImageView iv_rtk_status,iv_head; |
| | | |
| | | private List<ScoreBean> mArrayList = new ArrayList<>(); |
| | | private View tv_stop; |
| | |
| | | MyLog.i(TAG,"监测到有失败项目加入,通知UI更新颜色"); |
| | | mHandler.obtainMessage(ADD_DATA).sendToTarget(); |
| | | |
| | | }else { |
| | | Log.i(TAG, "onChanged: 失败项目"); |
| | | }else{ |
| | | MyLog.i(TAG,"失败项目数据表被清空更新UI"); |
| | | item_id = 0; |
| | | mArrayList.clear(); |
| | | item_conents.clear(); |
| | | mScoreAdapter.addDatas(mArrayList); |
| | | mHandler.obtainMessage(ADD_DATA).sendToTarget(); |
| | | } |
| | | } |
| | | }); |
| | |
| | | |
| | | tv_speed = view.findViewById(R.id.tv_speed); |
| | | iv_rtk_status = view.findViewById(R.id.iv_rtk_connect); |
| | | iv_head = view.findViewById(R.id.iv_head); |
| | | tv_sat_num = view.findViewById(R.id.tv_sat_num); |
| | | |
| | | tv_total_score = view.findViewById(R.id.tv_total_score); |
| | |
| | | } |
| | | |
| | | private void stopExam() { |
| | | MyLog.i(TAG,"结束考试"); |
| | | item_id = 0; |
| | | currTotalScore = 100; |
| | | tv_total_score.setText(String.valueOf(currTotalScore)); |
| | | iv_head.getDrawable().setLevel(0); |
| | | OneTimeWorkRequest examStatusInitWork = OneTimeWorkRequest.from(ExamStatusInitWorker.class); |
| | | WorkManager.getInstance(_mActivity).enqueue(examStatusInitWork); |
| | | try { |