lizhanwei
2020-01-14 d98af7b0c477752e90b5d88ea2360811aaffb5b8
app/src/main/java/safeluck/drive/evaluation/fragment/NetWorkTrainFragment.java
@@ -68,9 +68,10 @@
    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;
@@ -82,6 +83,7 @@
        @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)));
@@ -118,7 +120,10 @@
                        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();
                }
@@ -212,6 +217,7 @@
        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);