app/src/main/java/safeluck/drive/evaluation/adapter/ScoreAdapter.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
app/src/main/java/safeluck/drive/evaluation/bean/ScoreBean.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
app/src/main/java/safeluck/drive/evaluation/fragment/NetWorkTrainFragment.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
app/src/main/java/safeluck/drive/evaluation/fragment/TrainFragment.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
app/src/main/res/layout/layout_score_item.xml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
app/src/main/res/layout/layout_score_item_title.xml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
app/src/main/java/safeluck/drive/evaluation/adapter/ScoreAdapter.java
@@ -13,6 +13,7 @@ import safeluck.drive.evaluation.R; import safeluck.drive.evaluation.bean.ScoreBean; import safeluck.drive.evaluation.util.Utils; /** * MyApplication2 @@ -79,6 +80,10 @@ ScoreBean scoreBean = getItem(position); dataHodler.tv_item.setTextColor(Color.parseColor("#FFFFFF")); dataHodler.tv_item.setText(scoreBean.getItem()); dataHodler.tv_item_time.setTextColor(Color.parseColor("#FFFFFF")); dataHodler.tv_item_time.setText(Utils.formatTimeYYMMDDHHmmSS(scoreBean.getUtc())); dataHodler.tv_item_code.setTextColor(Color.parseColor("#FFFFFF")); dataHodler.tv_item_code.setText(scoreBean.getItem_code()+""); dataHodler.tv_score.setTextColor(Color.parseColor("#FE910B")); dataHodler.tv_score.setText(String.format("-%.0f分",scoreBean.getScore())); @@ -91,11 +96,15 @@ TextView tv_score; TextView tv_reason; TextView tv_item; TextView tv_item_time; TextView tv_item_code; public DataHodler(View view) { this.tv_score = view.findViewById(R.id.tv_score); this.tv_reason = view.findViewById(R.id.tv_reason); this.tv_item = view.findViewById(R.id.tv_item); this.tv_item_time = view.findViewById(R.id.tv_item_time); this.tv_item_code = view.findViewById(R.id.tv_item_code); } } } app/src/main/java/safeluck/drive/evaluation/bean/ScoreBean.java
@@ -18,7 +18,19 @@ /**扣分原因*/ private String reason; private int item_code; private long mUtc; public int getItem_code() { return item_code; } public void setItem_code(int item_code) { this.item_code = item_code; } public ScoreBean(float mScore, String mItem, String reason) { @@ -26,7 +38,7 @@ this.mItem = mItem; this.reason = reason; } public ScoreBean(float mScore, String mItem, String reason,String utc) { public ScoreBean(float mScore, String mItem, String reason,String utc,int item_code) { this.mScore = mScore; this.mItem = mItem; this.reason = reason; @@ -36,8 +48,10 @@ }else{ MyLog.i("utc时间不是纯数字"+utc); mUtc = System.currentTimeMillis(); } this.item_code= item_code; } public long getUtc() { app/src/main/java/safeluck/drive/evaluation/fragment/NetWorkTrainFragment.java
@@ -358,7 +358,7 @@ failedProj_selects) { item_id += f.getScore_deducting(); Log.i(TAG, "onChanged: " + f.toString()); mArrayList.add(new ScoreBean(f.getScore_deducting(), f.getItem_content(), f.getDeducting_reason(),f.getUtc())); mArrayList.add(new ScoreBean(f.getScore_deducting(), f.getItem_content(), f.getDeducting_reason(),f.getUtc(),f.getEmp_id())); item_conents.add(f.getItem_content()); Collections.sort(mArrayList); mScoreAdapter.addDatas(mArrayList); app/src/main/java/safeluck/drive/evaluation/fragment/TrainFragment.java
@@ -218,7 +218,7 @@ MyLog.i("进入考场结束考试,startexam="+examStatus.getStartExam()); return getResources().getDrawable(R.drawable.ic_btn_fail); }else{ MyLog.i("进入考场,type="+type); MyLog.i(TAG,"进入考场,type="+type); return getResources().getDrawable(R.drawable.ic_btn_examing); } @@ -533,7 +533,7 @@ failedProj_selects) { item_id += f.getScore_deducting(); Log.i(TAG, "onChanged: " + f.toString()); mArrayList.add(new ScoreBean(f.getScore_deducting(), f.getItem_content(), f.getDeducting_reason(),f.getUtc())); mArrayList.add(new ScoreBean(f.getScore_deducting(), f.getItem_content(), f.getDeducting_reason(),f.getUtc(),f.getEmp_id())); item_conents.add(f.getItem_content()); Collections.sort(mArrayList); mScoreAdapter.addDatas(mArrayList); app/src/main/res/layout/layout_score_item.xml
@@ -4,6 +4,24 @@ android:layout_height="40dp" android:background="@drawable/stu_score_title" > <TextView android:layout_width="0dp" android:layout_weight="1" android:layout_height="match_parent" android:textColor="@android:color/white" android:gravity="center" android:id="@+id/tv_item_time" style="@style/ui_exam_font" android:text="扣分时间"/> <TextView android:layout_width="0dp" android:layout_weight="1" android:layout_height="match_parent" android:textColor="@android:color/white" android:gravity="center" android:id="@+id/tv_item_code" style="@style/ui_exam_font" android:text="项目编号"/> <TextView android:layout_width="0dp" android:layout_weight="1" app/src/main/res/layout/layout_score_item_title.xml
@@ -6,6 +6,43 @@ android:background="@drawable/stu_score_title" > <TextView android:layout_width="wrap_content" android:layout_weight="1" android:layout_height="match_parent" android:textColor="@android:color/white" android:gravity="center_vertical" android:paddingLeft="90dp" android:drawablePadding="5dp" android:id="@+id/tv_item_time" android:textSize="@dimen/network_train_textsize22px" android:drawableLeft="@mipmap/duobianxing" android:text="扣分时间"/> <View android:layout_height="match_parent" android:layout_width="1px" android:background="#2B3141" /> <TextView android:layout_width="wrap_content" android:layout_weight="1" android:layout_height="match_parent" android:textColor="@android:color/white" android:gravity="center_vertical" android:paddingLeft="90dp" android:drawablePadding="5dp" android:id="@+id/tv_item_code" android:textSize="@dimen/network_train_textsize22px" android:drawableLeft="@mipmap/duobianxing" android:text="项目编号"/> <View android:layout_height="match_parent" android:layout_width="1px" android:background="#2B3141" /> <TextView android:layout_width="wrap_content" android:layout_weight="1"