| | |
| | | private int item_id;//扣分分数总和 |
| | | private ExamStatusViewModel examStatusViewModel; |
| | | private static final int ADD_DATA = 1; |
| | | private TextView tv_speed; |
| | | private TextView tv_speed,tv_total_score; |
| | | private double speed=0.0; |
| | | |
| | | private int currTotalScore = 100; |
| | | private List<ScoreBean> mArrayList = new ArrayList<>(); |
| | | private static final int SPEED_DATA = 2; |
| | | |
| | |
| | | @Override |
| | | public boolean handleMessage(Message msg) { |
| | | if (msg.what == ADD_DATA){ |
| | | tv_total_score.setText(getResources().getString(R.string.total_score,currTotalScore)); |
| | | houseView.setColor(whatPaintColor(examStatusList.get(0))); |
| | | av_podao.setColor(whatPaintColor(examStatusList.get(1))); |
| | | av_park.setColor(whatPaintColor(examStatusList.get(2))); |
| | |
| | | item_conents.add(f.getItem_content()); |
| | | mScoreAdapter.addDatas(mArrayList); |
| | | } |
| | | |
| | | currTotalScore -=item_id; |
| | | if (currTotalScore < Constant.PASSING_SCORE){ |
| | | MyLog.i(TAG,"低于80,不合格"); |
| | | } |
| | | MyLog.i(TAG,"监测到有失败项目加入,通知UI更新颜色"); |
| | | mHandler.obtainMessage(ADD_DATA).sendToTarget(); |
| | | } |
| | |
| | | houseView = view.findViewById(R.id.hv); |
| | | |
| | | tv_speed = view.findViewById(R.id.tv_speed); |
| | | tv_total_score = view.findViewById(R.id.tv_total_score); |
| | | tv_speed.setText(getResources().getString(R.string.speed,speed)); |
| | | |
| | | view.findViewById(R.id.btn_return).setOnClickListener(this); |