| | |
| | | import android.view.View; |
| | | import android.view.ViewGroup; |
| | | import android.widget.Button; |
| | | import android.widget.ImageView; |
| | | import android.widget.ListView; |
| | | import android.widget.TextView; |
| | | import android.widget.Toast; |
| | |
| | | import safeluck.drive.evaluation.Constant; |
| | | import safeluck.drive.evaluation.DB.Student; |
| | | import safeluck.drive.evaluation.DB.WokViewModel; |
| | | import safeluck.drive.evaluation.DB.appstatusdb.AppStatus; |
| | | import safeluck.drive.evaluation.DB.appstatusdb.AppStatusViewModel; |
| | | import safeluck.drive.evaluation.DB.exam_status.ExamStatus; |
| | | import safeluck.drive.evaluation.DB.exam_status.ExamStatusInitWorker; |
| | | import safeluck.drive.evaluation.DB.exam_status.ExamStatusViewModel; |
| | |
| | | private ExamStatusViewModel examStatusViewModel; |
| | | private static final int ADD_DATA = 1; |
| | | private static final int SPEED_DATA = 2; |
| | | private ImageView iv_rtk_status; |
| | | |
| | | private List<ScoreBean> mArrayList = new ArrayList<>(); |
| | | private View tv_stop; |
| | | private TextView tv_speed,tv_total_score; |
| | | private TextView tv_speed,tv_total_score,tv_sat_num; |
| | | private int currTotalScore = 100; |
| | | private double speed=0.0; |
| | | |
| | |
| | | } |
| | | }); |
| | | |
| | | |
| | | |
| | | AppStatusViewModel appStatusViewModel = ViewModelProviders.of(this).get(AppStatusViewModel.class); |
| | | appStatusViewModel.getAppStatus().observe(this, new Observer<AppStatus>() { |
| | | @Override |
| | | public void onChanged(AppStatus appStatus) { |
| | | if (appStatus != null){ |
| | | Log.i(TAG, "onChanged: "+appStatus.toString()); |
| | | iv_rtk_status.getDrawable().setLevel(appStatus.getRtk_connect_status()); |
| | | tv_sat_num.setText(String.valueOf(appStatus.getDefault_observe1())); |
| | | } |
| | | } |
| | | }); |
| | | |
| | | return view; |
| | | } |
| | | private void initView(View view) { |
| | |
| | | houseView = view.findViewById(R.id.hv); |
| | | |
| | | tv_speed = view.findViewById(R.id.tv_speed); |
| | | iv_rtk_status = view.findViewById(R.id.iv_rtk_connect); |
| | | tv_sat_num = view.findViewById(R.id.tv_sat_num); |
| | | |
| | | 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); |