| | |
| | | private int item_id;//扣分分数总和 |
| | | private ExamStatusViewModel examStatusViewModel; |
| | | private static final int ADD_DATA = 1; |
| | | private TextView tv_speed,tv_total_score,tv_name,tv_id, |
| | | tv_start_time,tv_sex; |
| | | private TextView tv_speed,tv_total_score,tv_name, |
| | | tv_start_time,tv_coach_name; |
| | | private double speed=0.0; |
| | | private ImageView iv_head; |
| | | |
| | |
| | | students) { |
| | | MyLog.i(TAG, "onChanged: " + student.toString()); |
| | | if (!TextUtils.isEmpty(student.getName())&&student.getStu_id()==ExamPlatformData.STU_ID){ |
| | | |
| | | tv_name.setText(getString(R.string.name)+student.getName()); |
| | | tv_id.setText(getString(R.string.user_id)+student.getID()); |
| | | tv_name.setText(getNameColor(student.getName())); |
| | | ExamPlatformData.getInstance().setId(student.getID()); |
| | | tv_sex.setText(getString(R.string.sex)+(student.getSex()==2?"女":"男")); |
| | | tv_start_time.setText(getString(R.string.begin_time)+Utils.formatTimeYYMMDDHHmmSS(student.getBegin_time())); |
| | | }else if (!TextUtils.isEmpty(student.getName())&&student.getStu_id()==ExamPlatformData.COACH_ID){ |
| | | ExamPlatformData.getInstance().setCoachID(student.getID()); |
| | | tv_coach_name.setText(getNameColor(student.getName())); |
| | | } |
| | | } |
| | | } |
| | |
| | | return view; |
| | | } |
| | | |
| | | private SpannableString getNameColor(String str) { |
| | | SpannableString spannableString = new SpannableString(str); |
| | | spannableString.setSpan(new ForegroundColorSpan(Color.parseColor("#60FFFF")),0, |
| | | str.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); |
| | | |
| | | return spannableString; |
| | | } |
| | | |
| | | |
| | | private void initView(View view) { |
| | |
| | | av_zhijiao = view.findViewById(R.id.av4); |
| | | houseView = view.findViewById(R.id.hv); |
| | | tv_name = view.findViewById(R.id.tv_name); |
| | | tv_id = view.findViewById(R.id.tv_ID); |
| | | tv_coach_name = view.findViewById(R.id.tv_coach_name); |
| | | tv_start_time = view.findViewById(R.id.tv_start_time); |
| | | tv_sex = view.findViewById(R.id.tv_sex); |
| | | |
| | | |
| | | iv_head = view.findViewById(R.id.iv_head); |