Compare View

switch
from
...
to
 
Commits (3)
.idea/deploymentTargetDropDown.xml
... ... @@ -3,20 +3,7 @@
3 3 <component name="deploymentTargetDropDown">
4 4 <value>
5 5 <entry key="app">
6   - <State>
7   - <runningDeviceTargetSelectedWithDropDown>
8   - <Target>
9   - <type value="RUNNING_DEVICE_TARGET" />
10   - <deviceKey>
11   - <Key>
12   - <type value="SERIAL_NUMBER" />
13   - <value value="951f9ace" />
14   - </Key>
15   - </deviceKey>
16   - </Target>
17   - </runningDeviceTargetSelectedWithDropDown>
18   - <timeTargetWasSelectedWithDropDown value="2025-03-20T09:48:34.278363400Z" />
19   - </State>
  6 + <State />
20 7 </entry>
21 8 </value>
22 9 </component>
... ...
app/src/main/java/com/hjx/parent/HomeworkShareActivity.java
... ... @@ -142,7 +142,7 @@ public class HomeworkShareActivity extends BaseRxActivity&lt;ActivityHomeworkShareB
142 142 errorPoint.append("、").append(point.Value);
143 143 }
144 144 float rate = 100f * correctNum / Math.max(total - blankNumber, 1);
145   - int errorNum = total - correctNum;
  145 + int errorNum = errorList.size();
146 146 binding.tvPercent.setText(new DecimalFormat("0").format(rate));
147 147 binding.tvCorrect.setText(String.valueOf(correctNum));
148 148 binding.tvWrong.setText(String.valueOf(errorNum));
... ...
app/src/main/java/com/hjx/parent/HuyouDetailActivity.java
... ... @@ -176,16 +176,31 @@ public class HuyouDetailActivity extends BaseRxActivity&lt;ActivityHuyouDetailBindi
176 176 int exNo = 0, goodNo = 0, normalNo = 0, weakNo = 0;
177 177 float total = 0;
178 178 if (data.points != null) {
179   - for (StDetail.Point point: data.points) {
180   - total += point.afterState;
181   - if (point.afterState >= 0.9) {
182   - exNo ++;
183   - } else if (point.afterState >= 0.8) {
184   - goodNo ++;
185   - } else if (point.afterState >= 0.6) {
186   - normalNo ++;
187   - } else {
188   - weakNo ++;
  179 + if (type == 0) {
  180 + for (StDetail.Point point: data.points) {
  181 + total += point.beforeState;
  182 + if (point.beforeState >= 0.9) {
  183 + exNo ++;
  184 + } else if (point.beforeState >= 0.8) {
  185 + goodNo ++;
  186 + } else if (point.beforeState >= 0.6) {
  187 + normalNo ++;
  188 + } else {
  189 + weakNo ++;
  190 + }
  191 + }
  192 + } else {
  193 + for (StDetail.Point point: data.points) {
  194 + total += point.afterState;
  195 + if (point.afterState >= 0.9) {
  196 + exNo ++;
  197 + } else if (point.afterState >= 0.8) {
  198 + goodNo ++;
  199 + } else if (point.afterState >= 0.6) {
  200 + normalNo ++;
  201 + } else {
  202 + weakNo ++;
  203 + }
189 204 }
190 205 }
191 206 }
... ... @@ -193,7 +208,7 @@ public class HuyouDetailActivity extends BaseRxActivity&lt;ActivityHuyouDetailBindi
193 208 float rate = 100f * data.correct / Math.max(data.total - data.unfinished, 1);
194 209 binding.tvTotalRate.setText(new DecimalFormat("0").format(rate));
195 210 binding.tvTotalCorrect.setText(String.valueOf(data.correct));
196   - binding.tvTotalError.setText(String.valueOf(data.total - data.correct));
  211 + binding.tvTotalError.setText(String.valueOf(data.total - data.correct - data.unfinished));
197 212 binding.tvTotalBlank.setText(String.valueOf(data.unfinished));
198 213 if (data.total == 0) {
199 214 binding.tvRating.setText("");
... ... @@ -220,10 +235,12 @@ public class HuyouDetailActivity extends BaseRxActivity&lt;ActivityHuyouDetailBindi
220 235 .append(correctNumHt).append(" 个,答错题目 ")
221 236 .append(errNumHt).append(" 个");
222 237 if (exNo > 0) {
223   - pointComment.append(",").append(exNo).append(" 个知识点掌握的非常棒");
  238 + String ht = fromColor(String.valueOf(exNo), "#3BC3B6");
  239 + pointComment.append(",").append(ht).append(" 个知识点掌握的非常棒");
224 240 }
225 241 if (weakNo > 0) {
226   - pointComment.append(",").append(weakNo).append(" 个知识点掌握的还需努力,这部分还要再加强学习");
  242 + String ht = fromColor(String.valueOf(weakNo), "#3BC3B6");
  243 + pointComment.append(",").append(ht).append(" 个知识点掌握的还需努力,这部分还要再加强学习");
227 244 }
228 245 pointComment.append("。");
229 246 String rateStr = new DecimalFormat("0%").format(rate / 100f);
... ... @@ -460,13 +477,13 @@ public class HuyouDetailActivity extends BaseRxActivity&lt;ActivityHuyouDetailBindi
460 477 holder.setText(R.id.tvName, point.pointName);
461 478  
462 479 TextView after = holder.getView(R.id.tvState);
463   - if (point.afterState >= 0.9) {
  480 + if (point.beforeState >= 0.9) {
464 481 after.setText("掌握优秀");
465 482 after.setBackgroundTintList(ColorStateList.valueOf(0xFF4FBB7A));
466   - } else if (point.afterState >= 0.8) {
  483 + } else if (point.beforeState >= 0.8) {
467 484 after.setText("掌握良好");
468 485 after.setBackgroundTintList(ColorStateList.valueOf(0xFF489AFA));
469   - } else if (point.afterState >= 0.6) {
  486 + } else if (point.beforeState >= 0.6) {
470 487 after.setText("掌握一般");
471 488 after.setBackgroundTintList(ColorStateList.valueOf(0xFFF58725));
472 489 } else {
... ... @@ -475,7 +492,7 @@ public class HuyouDetailActivity extends BaseRxActivity&lt;ActivityHuyouDetailBindi
475 492 }
476 493  
477 494 DecimalFormat format1 = new DecimalFormat("0%");
478   - holder.setText(R.id.tvHuyou, format1.format(point.correctness));
  495 + holder.setText(R.id.tvHuyou, format1.format(point.beforeState));
479 496 }
480 497 }
481 498  
... ...
app/src/main/res/layout/activity_huyou_detail.xml
... ... @@ -1154,7 +1154,7 @@
1154 1154 android:textSize="13sp"
1155 1155 android:textColor="@color/white"
1156 1156 android:gravity="center"
1157   - android:layout_weight="135"
  1157 + android:layout_weight="5"
1158 1158 android:layout_width="0dp"
1159 1159 android:layout_height="match_parent"/>
1160 1160 <View
... ... @@ -1167,7 +1167,7 @@
1167 1167 android:textSize="13sp"
1168 1168 android:textColor="@color/white"
1169 1169 android:gravity="center"
1170   - android:layout_weight="179"
  1170 + android:layout_weight="4"
1171 1171 android:layout_width="0dp"
1172 1172 android:layout_height="match_parent"/>
1173 1173  
... ...
app/src/main/res/layout/activity_huyou_detail_a4.xml
... ... @@ -1159,7 +1159,7 @@
1159 1159 android:textSize="13sp"
1160 1160 android:textColor="@color/white"
1161 1161 android:gravity="center"
1162   - android:layout_weight="135"
  1162 + android:layout_weight="5"
1163 1163 android:layout_width="0dp"
1164 1164 android:layout_height="match_parent"/>
1165 1165 <View
... ... @@ -1172,7 +1172,7 @@
1172 1172 android:textSize="13sp"
1173 1173 android:textColor="@color/white"
1174 1174 android:gravity="center"
1175   - android:layout_weight="179"
  1175 + android:layout_weight="4"
1176 1176 android:layout_width="0dp"
1177 1177 android:layout_height="match_parent"/>
1178 1178  
... ...
app/src/main/res/layout/item_huyou_week_point.xml
... ... @@ -22,7 +22,7 @@
22 22 android:gravity="center_vertical"
23 23 android:maxLines="2"
24 24 android:paddingStart="6dp"
25   - android:layout_weight="135"
  25 + android:layout_weight="5"
26 26 android:layout_width="0dp"
27 27 android:layout_height="match_parent"/>
28 28 <View
... ... @@ -31,7 +31,7 @@
31 31 android:layout_height="match_parent"/>
32 32 <FrameLayout
33 33 android:paddingStart="4dp"
34   - android:layout_weight="179"
  34 + android:layout_weight="4"
35 35 android:layout_width="0dp"
36 36 android:layout_height="match_parent">
37 37 <TextView
... ...