Compare View

switch
from
...
to
 
Commits (2)
app/src/main/java/com/hjx/parent/HomeworkFeedbackActivity.java
... ... @@ -19,7 +19,6 @@ import com.google.gson.Gson;
19 19 import com.hjx.parent.databinding.ActivityHomeworkFeedbackBinding;
20 20 import com.hjx.parent.rx.BaseRxActivity;
21 21 import com.prws.common.bean.Student;
22   -import com.prws.common.bean.homework.Correction;
23 22 import com.prws.common.bean.homework.CorrectionPoint;
24 23 import com.prws.common.bean.homework.CorrectionSer;
25 24 import com.prws.common.bean.homework.HomeWork;
... ... @@ -41,7 +40,7 @@ public class HomeworkFeedbackActivity extends BaseRxActivity<ActivityHomeworkFee
41 40 private Student student;
42 41 private HomeworkList mData;
43 42 private ArrayList<HomeWork> mList;
44   - private List<Correction> corrections = new ArrayList<>();
  43 + private List<CorrectionSer> corrections = new ArrayList<>();
45 44  
46 45 @SuppressWarnings("unchecked")
47 46 @Override
... ... @@ -54,20 +53,40 @@ public class HomeworkFeedbackActivity extends BaseRxActivity&lt;ActivityHomeworkFee
54 53 binding.tvStuName.setText(student.stuName);
55 54 binding.tvGrade.setText(student.grade);
56 55  
  56 + List<HomeWork> correctList = new ArrayList<>();
57 57 List<HomeWork> errorList = new ArrayList<>();
58   - int correctNo = 0;
  58 + List<HomeWork> blankList = new ArrayList<>();
  59 + int correctNo = 0, blankNo = 0;
59 60 for (HomeWork homeWork: mList) {
60 61 homeWork.state = 1;
61 62 homeWork.index = mList.indexOf(homeWork);
62   - corrections.add(new Correction(homeWork.brief, homeWork.check ? 1 : 0));
63   - if (!homeWork.check) correctNo ++;
64   - else errorList.add(homeWork);
  63 + corrections.add(homeWork.toSer());
  64 + if (homeWork.correction == 0) {
  65 + correctList.add(homeWork);
  66 + correctNo ++;
  67 + }
  68 + else if (homeWork.correction == 1) {
  69 + correctList.add(homeWork);
  70 + errorList.add(homeWork);
  71 + }
  72 + else if (homeWork.correction == 2) {
  73 + blankList.add(homeWork);
  74 + blankNo ++;
  75 + }
65 76 }
66   - binding.tvPercent.setText(new DecimalFormat("0%").format(1f * correctNo / mList.size()));
  77 + binding.viewBlank.setVisibility(blankList.isEmpty() ? View.GONE : View.VISIBLE);
  78 + binding.rvBlank.setVisibility(blankList.isEmpty() ? View.GONE : View.VISIBLE);
  79 +
  80 + float rate = 1f * correctNo / Math.max(mList.size() - blankNo, 1);
  81 + binding.tvPercent.setText(new DecimalFormat("0%").format(rate));
67 82  
68 83 binding.rvCorrect.setLayoutManager(new FlexboxLayoutManager(this));
69   - NumberAdapter numberAdapter = new NumberAdapter(mList);
  84 + binding.rvBlank.setLayoutManager(new FlexboxLayoutManager(this));
  85 + NumberAdapter numberAdapter = new NumberAdapter(correctList);
  86 + NumberAdapter blankAdapter = new NumberAdapter(blankList);
70 87 binding.rvCorrect.setAdapter(numberAdapter);
  88 + binding.rvBlank.setAdapter(blankAdapter);
  89 +
71 90 binding.rvError.setVisibility(errorList.isEmpty() ? View.GONE : View.VISIBLE);
72 91 binding.rvError.setAdapter(new EvalAdapter(errorList));
73 92 if (errorList.isEmpty()) {
... ... @@ -77,9 +96,15 @@ public class HomeworkFeedbackActivity extends BaseRxActivity&lt;ActivityHomeworkFee
77 96 binding.btnDetail.setOnClickListener(v -> {
78 97 viewTopicDetail(0);
79 98 });
  99 + binding.btnDetail2.setOnClickListener(v -> {
  100 + viewTopicDetail(0);
  101 + });
80 102 numberAdapter.setOnItemClickListener((baseQuickAdapter, view, i) -> {
81 103 viewTopicDetail(i);
82 104 });
  105 + blankAdapter.setOnItemClickListener((baseQuickAdapter, view, i) -> {
  106 + viewTopicDetail(i);
  107 + });
83 108 binding.btnPublish.setOnClickListener(v -> submit());
84 109 }
85 110  
... ... @@ -153,29 +178,31 @@ public class HomeworkFeedbackActivity extends BaseRxActivity&lt;ActivityHomeworkFee
153 178 } else {
154 179 totalTimes.put(key, 1);
155 180 }
156   - if (!homeWork.check) {
  181 + if (homeWork.correction == 0) {
157 182 if (correctTimes.containsKey(key)) {
158 183 correctTimes.put(key, correctTimes.get(key) + 1);
159 184 } else {
160 185 correctTimes.put(key, 1);
161 186 }
162   - } else if (homeWork.state == 1) {
163   - if (underTimes.containsKey(key)) {
164   - underTimes.put(key, underTimes.get(key) + 1);
165   - } else {
166   - underTimes.put(key, 1);
167   - }
168   - } else if (homeWork.state == 2) {
169   - if (baseTimes.containsKey(key)) {
170   - baseTimes.put(key, baseTimes.get(key) + 1);
171   - } else {
172   - baseTimes.put(key, 1);
173   - }
174   - } else if (homeWork.state == 3) {
175   - if (normalTimes.containsKey(key)) {
176   - normalTimes.put(key, normalTimes.get(key) + 1);
177   - } else {
178   - normalTimes.put(key, 1);
  187 + } else if (homeWork.correction == 1) {
  188 + if (homeWork.state == 1) {
  189 + if (underTimes.containsKey(key)) {
  190 + underTimes.put(key, underTimes.get(key) + 1);
  191 + } else {
  192 + underTimes.put(key, 1);
  193 + }
  194 + } else if (homeWork.state == 2) {
  195 + if (baseTimes.containsKey(key)) {
  196 + baseTimes.put(key, baseTimes.get(key) + 1);
  197 + } else {
  198 + baseTimes.put(key, 1);
  199 + }
  200 + } else if (homeWork.state == 3) {
  201 + if (normalTimes.containsKey(key)) {
  202 + normalTimes.put(key, normalTimes.get(key) + 1);
  203 + } else {
  204 + normalTimes.put(key, 1);
  205 + }
179 206 }
180 207 }
181 208 }
... ... @@ -218,10 +245,12 @@ public class HomeworkFeedbackActivity extends BaseRxActivity&lt;ActivityHomeworkFee
218 245 protected void convert(@NonNull BaseViewHolder holder, HomeWork homeWork) {
219 246 int position = getData().indexOf(homeWork);
220 247 holder.setText(R.id.tvNum, String.valueOf(position + 1));
221   - if (homeWork.check) {
  248 + if (homeWork.correction == 1) {
222 249 holder.setImageResource(R.id.ivType, R.drawable.ic_wrong_small);
223   - } else {
  250 + } else if (homeWork.correction == 0){
224 251 holder.setImageResource(R.id.ivType, R.drawable.ic_correct_small);
  252 + } else {
  253 + holder.setImageDrawable(R.id.ivType, null);
225 254 }
226 255 }
227 256 }
... ...
app/src/main/java/com/hjx/parent/HomeworkSelectActivity.java
... ... @@ -3,24 +3,20 @@ package com.hjx.parent;
3 3 import android.annotation.SuppressLint;
4 4 import android.content.Intent;
5 5 import android.content.res.ColorStateList;
6   -import android.graphics.drawable.Drawable;
7 6 import android.os.Bundle;
8 7 import android.view.View;
9   -import android.widget.CheckBox;
10 8 import android.widget.ImageView;
  9 +import android.widget.RadioGroup;
11 10 import android.widget.TextView;
12 11  
13   -import androidx.annotation.DrawableRes;
14 12 import androidx.annotation.NonNull;
15 13 import androidx.annotation.Nullable;
16   -import androidx.core.content.res.ResourcesCompat;
17   -import androidx.lifecycle.MutableLiveData;
18 14  
19 15 import com.bumptech.glide.Glide;
20 16 import com.chad.library.adapter.base.BaseQuickAdapter;
21 17 import com.chad.library.adapter.base.BaseViewHolder;
22 18 import com.hjx.parent.databinding.ActivityHomeworkSelectBinding;
23   -import com.hjx.parent.function.Function1;
  19 +import com.hjx.parent.function.Function0;
24 20 import com.hjx.parent.rx.BaseRxActivity;
25 21 import com.prws.common.bean.Student;
26 22 import com.prws.common.bean.homework.HomeWork;
... ... @@ -35,8 +31,6 @@ public class HomeworkSelectActivity extends BaseRxActivity&lt;ActivityHomeworkSelec
35 31 private ArrayList<HomeWork> mList;
36 32 private Adapter mAdapter = new Adapter();
37 33  
38   - MutableLiveData<Integer> selectNum = new MutableLiveData<>(0);
39   -
40 34 @SuppressLint("NotifyDataSetChanged")
41 35 @SuppressWarnings("unchecked,ConstantConditions")
42 36 @Override
... ... @@ -45,32 +39,31 @@ public class HomeworkSelectActivity extends BaseRxActivity&lt;ActivityHomeworkSelec
45 39 student = (Student) getIntent().getSerializableExtra("student");
46 40 mData = (HomeworkList) getIntent().getSerializableExtra("data");
47 41 mList = (ArrayList<HomeWork>) getIntent().getSerializableExtra("list");
  42 + if (mList == null) mList = new ArrayList<>();
  43 + for (HomeWork homeWork: mList) {
  44 + homeWork.correction = 0;
  45 + }
48 46  
49 47 mAdapter.setNewData(mList);
50 48 binding.recyclerView.setAdapter(mAdapter);
51 49  
52   - mAdapter.selectCall = i -> selectNum.setValue(selectNum.getValue() + i);
53   - selectNum.observe(this, i -> {
54   - binding.tvNumber.setText(String.valueOf(i));
55   - if (i == 0) {
56   - binding.btnConfirm.setText("作业全对");
57   - binding.btnConfirm.setBackgroundTintList(ColorStateList.valueOf(0xFF4ABC78));
58   - } else {
59   - binding.btnConfirm.setText("下一步");
60   - binding.btnConfirm.setBackgroundTintList(ColorStateList.valueOf(0xFF1C90F3));
  50 + mAdapter.selectCall = () -> {
  51 + int right = 0, error = 0, blank = 0;
  52 + for (HomeWork homeWork: mList) {
  53 + if (homeWork.correction == 0) right ++;
  54 + else if (homeWork.correction == 1) error ++;
  55 + else if (homeWork.correction == 2) blank ++;
61 56 }
62   - binding.chkAll.setChecked(i == mList.size() && i != 0);
63   - });
64   -
65   - binding.chkAll.setOnClickListener(v -> {
66   - if (mList.size() == 0) return;
67   - boolean b = binding.chkAll.isChecked();
68   - for (HomeWork item: mList) {
69   - item.check = b;
70   - }
71   - selectNum.setValue(b ? mList.size() : 0);
72   - mAdapter.notifyDataSetChanged();
73   - });
  57 + binding.tvNumber.setText(String.valueOf(error));
  58 + binding.tvBlankNumber.setText(String.valueOf(blank));
  59 +// if (right == mList.size()) {
  60 +// binding.btnConfirm.setText("作业全对");
  61 +// binding.btnConfirm.setBackgroundTintList(ColorStateList.valueOf(0xFF4ABC78));
  62 +// } else {
  63 +// binding.btnConfirm.setText("下一步");
  64 +// binding.btnConfirm.setBackgroundTintList(ColorStateList.valueOf(0xFF1C90F3));
  65 +// }
  66 + };
74 67  
75 68 binding.btnConfirm.setOnClickListener(v -> {
76 69 Intent intent = new Intent(this, HomeworkFeedbackActivity.class);
... ... @@ -100,7 +93,7 @@ public class HomeworkSelectActivity extends BaseRxActivity&lt;ActivityHomeworkSelec
100 93 public Adapter() {
101 94 super(R.layout.item_homework_detail);
102 95 }
103   - public Function1<Integer> selectCall;
  96 + public Function0 selectCall;
104 97  
105 98 @SuppressLint("SetTextI18n")
106 99 @Override
... ... @@ -111,32 +104,30 @@ public class HomeworkSelectActivity extends BaseRxActivity&lt;ActivityHomeworkSelec
111 104 tvNumber.setText("第" + number + "题");
112 105 Glide.with(mContext).load(homeWork.url).into(imageView);
113 106  
114   - if (homeWork.check) {
115   - holder.itemView.setForeground(getDrawable(R.drawable.border_radius_10_red));
116   - } else {
117   - holder.itemView.setForeground(null);
118   - }
119   - CheckBox checkBox = holder.getView(R.id.checkbox);
120   - checkBox.setVisibility(View.VISIBLE);
121   - checkBox.setOnCheckedChangeListener(null);
122   - checkBox.setChecked(homeWork.check);
123   -
124   - holder.itemView.setOnClickListener(v -> checkBox.performClick());
125   - checkBox.setOnCheckedChangeListener((v, b) -> {
126   - homeWork.check = b;
127   - if (selectCall != null) {
128   - selectCall.invoke(b ? 1 : -1);
129   - }
130   - if (homeWork.check) {
131   - holder.itemView.setForeground(getDrawable(R.drawable.border_radius_10_red));
132   - } else {
133   - holder.itemView.setForeground(null);
134   - }
  107 + setBackground(homeWork, holder);
  108 + RadioGroup radioGroup = holder.getView(R.id.radioGroup);
  109 + radioGroup.setVisibility(View.VISIBLE);
  110 +
  111 + radioGroup.setOnCheckedChangeListener((group, checkedId) -> {
  112 + if (checkedId == R.id.rbRight) homeWork.correction = 0;
  113 + else if (checkedId == R.id.rbError) homeWork.correction = 1;
  114 + else if (checkedId == R.id.rbBlank) homeWork.correction = 2;
  115 + setBackground(homeWork, holder);
  116 + selectCall.invoke();
135 117 });
136 118 }
137 119  
138   - private Drawable getDrawable(@DrawableRes int res) {
139   - return ResourcesCompat.getDrawable(mContext.getResources(), res, null);
  120 + private void setBackground(HomeWork homeWork, BaseViewHolder helper) {
  121 + if (homeWork.correction == 0) {
  122 + helper.setBackgroundRes(R.id.root, R.drawable.bg_feedback_right);
  123 + helper.setChecked(R.id.rbRight, true);
  124 + } else if (homeWork.correction == 1) {
  125 + helper.setBackgroundRes(R.id.root, R.drawable.bg_feedback_error);
  126 + helper.setChecked(R.id.rbError, true);
  127 + } else if (homeWork.correction == 2) {
  128 + helper.setBackgroundRes(R.id.root, R.drawable.bg_feedback_blank);
  129 + helper.setChecked(R.id.rbBlank, true);
  130 + }
140 131 }
141 132 }
142 133 }
... ...
app/src/main/java/com/hjx/parent/HomeworkTopicActivity.java
... ... @@ -92,8 +92,13 @@ public class HomeworkTopicActivity extends BaseRxActivity&lt;ActivityTopicDetailBin
92 92 TextView textView = (TextView) holder.itemView;
93 93 textView.setText(String.valueOf(getData().indexOf(homeWork) + 1));
94 94  
95   - int color = homeWork.check ? 0xFFFF4133 : 0xFF4ABC78;
96   - textView.setBackgroundTintList(ColorStateList.valueOf(color));
  95 + if (homeWork.correction == null || homeWork.correction == 2) {
  96 + textView.setBackgroundTintList(ColorStateList.valueOf(0xFF999999));
  97 + } else if (homeWork.correction == 0) {
  98 + textView.setBackgroundTintList(ColorStateList.valueOf(0xFF4ABC78));
  99 + } else if (homeWork.correction == 1) {
  100 + textView.setBackgroundTintList(ColorStateList.valueOf(0xFFFF4133));
  101 + }
97 102 }
98 103 }
99 104 }
... ...
app/src/main/java/com/hjx/parent/HuyouDetailActivity.java
... ... @@ -77,7 +77,13 @@ public class HuyouDetailActivity extends BaseRxActivity&lt;ActivityHuyouDetailBindi
77 77 type = getIntent().getIntExtra("type", 0);
78 78 student = (Student) getIntent().getSerializableExtra("student");
79 79  
80   - if (type == 1) binding.tvTitle.setText("阶段作业学习总结");
  80 + if (type == 1) {
  81 + binding.tvTitle.setText("阶段作业学习总结");
  82 + binding.viewWeekTable.setVisibility(View.GONE);
  83 + } else {
  84 + binding.viewPointTotal.setVisibility(View.GONE);
  85 + binding.viewTable.setVisibility(View.GONE);
  86 + }
81 87  
82 88 Glide.with(this).load(student.photo).into(binding.ivAvatar);
83 89 binding.tvStuName.setText(student.stuName);
... ... @@ -167,29 +173,60 @@ public class HuyouDetailActivity extends BaseRxActivity&lt;ActivityHuyouDetailBindi
167 173 binding.tvWeakRate.setText(Html.fromHtml(temp, Html.FROM_HTML_MODE_COMPACT));
168 174 }
169 175  
170   - binding.tvTotalRate.setText(new DecimalFormat("0").format(100f * data.correct / data.total));
  176 + int exNo = 0, goodNo = 0, normalNo = 0, weakNo = 0;
  177 + float total = 0;
  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 ++;
  189 + }
  190 + }
  191 + }
  192 +
  193 + float rate = 100f * data.correct / Math.max(data.total - data.unfinished, 1);
  194 + binding.tvTotalRate.setText(new DecimalFormat("0").format(rate));
171 195 binding.tvTotalCorrect.setText(String.valueOf(data.correct));
172 196 binding.tvTotalError.setText(String.valueOf(data.total - data.correct));
  197 + binding.tvTotalBlank.setText(String.valueOf(data.unfinished));
173 198 if (data.total == 0) {
174 199 binding.tvRating.setText("");
175 200 } else {
176   - float rate = 100f * data.correct / data.total;
177   - String comment;
  201 + String rateComment;
178 202 if (rate >= 90) {
179   - comment = "掌握程度比较优秀,你对知识的理解和运用能力非常强,这是你努力的结果。请继续保持这份优秀,在未来的学习中,可以继续挑战更难的题目,勇攀高峰。";
  203 + rateComment = "知识点掌握得比较优秀,多练习多巩固掌握一般的知识点会有很大帮助。";
180 204 } else if (rate >= 80) {
181   - comment = "掌握良好。接下来,跟随老师的学习规划,针对薄弱环节重点突破。加油,只要持之以恒,坚持下去,你一定会更加出色。";
  205 + rateComment = "知识点掌握程度有进步,还要再继续学习,多练习,不断巩固。";
182 206 } else if (rate >= 60) {
183   - comment = "掌握程度一般。不过别灰心,你有提升的潜力。跟随老师的步伐,制定合理的学习计划,多做一些练习题来巩固知识。老师相信你一定可以做到。";
  207 + rateComment = "薄弱知识点还有进步空间,再多做一些类似题目来巩固知识点,继续努力。";
184 208 } else {
185   - comment = "掌握程度较为薄弱。但不要放弃,这正是你奋起直追的好时机。认真分析自己的问题,从基础开始逐步提升。老师会一直支持你,只要你有决心,就没有克服不了的困难。";
  209 + rateComment = "你的薄弱知识点还需要再深入了解,有不清楚的地方及时问老师,继续加油。";
  210 + }
  211 +
  212 + String correctNumHt = fromColor(String.valueOf(data.correct), "#3BC3B6");
  213 + String errNumHt = fromColor(String.valueOf(data.total - data.correct - data.unfinished), "#3BC3B6");
  214 + StringBuilder pointComment = new StringBuilder("其中,答对题目 ")
  215 + .append(correctNumHt).append(" 个,答错题目 ")
  216 + .append(errNumHt).append(" 个");
  217 + if (exNo > 0) {
  218 + pointComment.append(",").append(exNo).append(" 个知识点掌握的非常棒");
186 219 }
  220 + if (weakNo > 0) {
  221 + pointComment.append(",").append(weakNo).append(" 个知识点掌握的还需努力,这部分还要再加强学习");
  222 + }
  223 + pointComment.append("。");
187 224 String rateStr = new DecimalFormat("0%").format(rate / 100f);
188 225 String temp;
189 226 if (type == 0) {
190   - temp = indent + "在本周作业中,你的综合正确率是 %s," + comment;
  227 + temp = indent + "在本周作业中,你的综合正确率是 %s," + rateComment + pointComment + "在未来的学习中,请保持这份优秀,继续挑战更难的题目,勇攀高峰。";
191 228 } else {
192   - temp = indent + "你的综合正确率是 %s," + comment;
  229 + temp = indent + "你的综合正确率是 %s," + rateComment;
193 230 }
194 231 temp = String.format(temp, fromColor(rateStr, "#3BC3B6"));
195 232 binding.tvRating.setText(Html.fromHtml(temp, Html.FROM_HTML_MODE_COMPACT));
... ... @@ -234,20 +271,6 @@ public class HuyouDetailActivity extends BaseRxActivity&lt;ActivityHuyouDetailBindi
234 271 binding.lineChart.invalidate();
235 272  
236 273 if (!data.points.isEmpty()) {
237   - int exNo = 0, goodNo = 0, normalNo = 0, weakNo = 0;
238   - float total = 0;
239   - for (StDetail.Point point: data.points) {
240   - total += point.afterState;
241   - if (point.afterState >= 0.9) {
242   - exNo ++;
243   - } else if (point.afterState >= 0.8) {
244   - goodNo ++;
245   - } else if (point.afterState >= 0.6) {
246   - normalNo ++;
247   - } else {
248   - weakNo ++;
249   - }
250   - }
251 274 binding.tvExcellent.setText(String.valueOf(exNo));
252 275 binding.tvGood.setText(String.valueOf(goodNo));
253 276 binding.tvNormal.setText(String.valueOf(normalNo));
... ... @@ -268,7 +291,9 @@ public class HuyouDetailActivity extends BaseRxActivity&lt;ActivityHuyouDetailBindi
268 291 if (point.beforeState < 1) points.add(point);
269 292 }
270 293 binding.tableRoot.setClipToOutline(true);
  294 + binding.tableWeekRoot.setClipToOutline(true);
271 295 binding.rvPoint.setAdapter(new Adapter(points));
  296 + binding.rvWeekPoint.setAdapter(new WeekAdapter(data.points));
272 297 binding.tableRoot.setVisibility(points.isEmpty() ? View.GONE : View.VISIBLE);
273 298 binding.flPointDesc.setVisibility(points.isEmpty() ? View.GONE : View.VISIBLE);
274 299 binding.flEmptyPoints.setVisibility(points.isEmpty() ? View.VISIBLE : View.GONE);
... ... @@ -420,4 +445,33 @@ public class HuyouDetailActivity extends BaseRxActivity&lt;ActivityHuyouDetailBindi
420 445  
421 446 }
422 447  
  448 + public static class WeekAdapter extends BaseQuickAdapter<StDetail.Point, BaseViewHolder> {
  449 + public WeekAdapter(@Nullable List<StDetail.Point> data) {
  450 + super(R.layout.item_huyou_week_point, data);
  451 + }
  452 +
  453 + @Override
  454 + protected void convert(@NonNull BaseViewHolder holder, StDetail.Point point) {
  455 + holder.setText(R.id.tvName, point.pointName);
  456 +
  457 + TextView after = holder.getView(R.id.tvState);
  458 + if (point.afterState >= 0.9) {
  459 + after.setText("掌握优秀");
  460 + after.setBackgroundTintList(ColorStateList.valueOf(0xFF4FBB7A));
  461 + } else if (point.afterState >= 0.8) {
  462 + after.setText("掌握良好");
  463 + after.setBackgroundTintList(ColorStateList.valueOf(0xFF489AFA));
  464 + } else if (point.afterState >= 0.6) {
  465 + after.setText("掌握一般");
  466 + after.setBackgroundTintList(ColorStateList.valueOf(0xFFF58725));
  467 + } else {
  468 + after.setText("掌握薄弱");
  469 + after.setBackgroundTintList(ColorStateList.valueOf(0xFFEA5127));
  470 + }
  471 +
  472 + DecimalFormat format1 = new DecimalFormat("0%");
  473 + holder.setText(R.id.tvHuyou, format1.format(point.correctness));
  474 + }
  475 + }
  476 +
423 477 }
... ...
app/src/main/res/drawable/bg_feedback_blank.xml
... ... @@ -0,0 +1,6 @@
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +<shape xmlns:android="http://schemas.android.com/apk/res/android">
  3 + <corners android:radius="10dp"/>
  4 + <stroke android:color="#FDB900" android:width="2dp"/>
  5 + <solid android:color="@color/white"/>
  6 +</shape>
0 7 \ No newline at end of file
... ...
app/src/main/res/drawable/bg_feedback_error.xml
... ... @@ -0,0 +1,6 @@
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +<shape xmlns:android="http://schemas.android.com/apk/res/android">
  3 + <corners android:radius="10dp"/>
  4 + <stroke android:color="#FF5138" android:width="2dp"/>
  5 + <solid android:color="@color/white"/>
  6 +</shape>
0 7 \ No newline at end of file
... ...
app/src/main/res/drawable/bg_feedback_right.xml
... ... @@ -0,0 +1,6 @@
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +<shape xmlns:android="http://schemas.android.com/apk/res/android">
  3 + <corners android:radius="10dp"/>
  4 + <stroke android:color="#00D39C" android:width="2dp"/>
  5 + <solid android:color="@color/white"/>
  6 +</shape>
0 7 \ No newline at end of file
... ...
app/src/main/res/drawable/btn_feedback_blank.xml
... ... @@ -0,0 +1,16 @@
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +<selector xmlns:android="http://schemas.android.com/apk/res/android">
  3 + <item android:state_checked="false">
  4 + <shape>
  5 + <corners android:radius="888dp"/>
  6 + <solid android:color="#C4DFFF"/>
  7 + </shape>
  8 + </item>
  9 +
  10 + <item>
  11 + <shape>
  12 + <corners android:radius="888dp"/>
  13 + <solid android:color="#FDB900"/>
  14 + </shape>
  15 + </item>
  16 +</selector>
0 17 \ No newline at end of file
... ...
app/src/main/res/drawable/btn_feedback_error.xml
... ... @@ -0,0 +1,16 @@
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +<selector xmlns:android="http://schemas.android.com/apk/res/android">
  3 + <item android:state_checked="false">
  4 + <shape>
  5 + <corners android:radius="888dp"/>
  6 + <solid android:color="#C4DFFF"/>
  7 + </shape>
  8 + </item>
  9 +
  10 + <item>
  11 + <shape>
  12 + <corners android:radius="888dp"/>
  13 + <solid android:color="#FF5138"/>
  14 + </shape>
  15 + </item>
  16 +</selector>
0 17 \ No newline at end of file
... ...
app/src/main/res/drawable/btn_feedback_right.xml
... ... @@ -0,0 +1,16 @@
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +<selector xmlns:android="http://schemas.android.com/apk/res/android">
  3 + <item android:state_checked="false">
  4 + <shape>
  5 + <corners android:radius="888dp"/>
  6 + <solid android:color="#C4DFFF"/>
  7 + </shape>
  8 + </item>
  9 +
  10 + <item>
  11 + <shape>
  12 + <corners android:radius="888dp"/>
  13 + <solid android:color="#00D39C"/>
  14 + </shape>
  15 + </item>
  16 +</selector>
0 17 \ No newline at end of file
... ...
app/src/main/res/drawable/png_icon_daily_blank.png

6.23 KB

app/src/main/res/drawable/shape_radius_10.xml
1 1 <?xml version="1.0" encoding="utf-8"?>
2 2 <shape xmlns:android="http://schemas.android.com/apk/res/android">
3 3 <corners android:radius="10dp"/>
  4 + <solid android:color="@color/white"/>
4 5 </shape>
5 6 \ No newline at end of file
... ...
app/src/main/res/layout/activity_homework_feedback.xml
... ... @@ -144,6 +144,7 @@
144 144 android:layout_width="wrap_content"
145 145 android:layout_height="wrap_content"/>
146 146 </LinearLayout>
  147 +
147 148 <LinearLayout
148 149 android:orientation="horizontal"
149 150 android:layout_marginHorizontal="15dp"
... ... @@ -173,12 +174,36 @@
173 174 android:layout_marginHorizontal="15dp"
174 175 android:layout_width="match_parent"
175 176 android:layout_height="wrap_content"/>
176   - <TextView
177   - android:text="错题已经加入到错题本,到错题本查看详情"
178   - android:textSize="12sp"
179   - android:textColor="#666"
  177 +
  178 + <LinearLayout
  179 + android:id="@+id/viewBlank"
  180 + android:orientation="horizontal"
  181 + android:layout_marginHorizontal="15dp"
  182 + android:layout_marginTop="15dp"
  183 + android:layout_width="match_parent"
  184 + android:layout_height="wrap_content">
  185 + <TextView
  186 + android:text="未答题目"
  187 + android:textSize="14sp"
  188 + android:textColor="#333"
  189 + android:layout_width="wrap_content"
  190 + android:layout_height="wrap_content"/>
  191 + <TextView
  192 + android:id="@+id/btnDetail2"
  193 + android:text="(点击查看题目详情)"
  194 + android:textSize="14sp"
  195 + android:textColor="#1C90F3"
  196 + android:layout_width="wrap_content"
  197 + android:layout_height="wrap_content"/>
  198 + </LinearLayout>
  199 +
  200 + <androidx.recyclerview.widget.RecyclerView
  201 + android:id="@+id/rvBlank"
  202 + tools:listitem="@layout/item_feedback_num"
  203 + tools:itemCount="1"
  204 + android:layout_marginTop="15dp"
180 205 android:layout_marginHorizontal="15dp"
181   - android:layout_width="wrap_content"
  206 + android:layout_width="match_parent"
182 207 android:layout_height="wrap_content"/>
183 208 </LinearLayout>
184 209  
... ...
app/src/main/res/layout/activity_homework_select.xml
... ... @@ -34,33 +34,29 @@
34 34 android:layout_marginBottom="8dp"
35 35 android:layout_width="match_parent"
36 36 android:layout_height="wrap_content">
37   - <CheckBox
38   - android:id="@+id/chkAll"
39   - android:text="全选"
  37 + <Space style="@style/empty_space"/>
  38 + <TextView
  39 + android:id="@+id/tvNumber"
  40 + android:text="0"
40 41 android:textSize="13sp"
41   - android:textColor="#333"
42   - android:button="@drawable/chk_circle"
43   - android:gravity="center_vertical"
44   - android:paddingStart="8dp"
45   - android:paddingEnd="0dp"
  42 + android:textColor="#1C90F3"
46 43 android:layout_width="wrap_content"
47 44 android:layout_height="wrap_content"/>
48   - <Space style="@style/empty_space"/>
49 45 <TextView
50   - android:text="已选择 "
  46 + android:text=" 道错题, "
51 47 android:textSize="13sp"
52 48 android:textColor="#333"
53 49 android:layout_width="wrap_content"
54 50 android:layout_height="wrap_content"/>
55 51 <TextView
56   - android:id="@+id/tvNumber"
  52 + android:id="@+id/tvBlankNumber"
57 53 android:text="0"
58 54 android:textSize="13sp"
59 55 android:textColor="#1C90F3"
60 56 android:layout_width="wrap_content"
61 57 android:layout_height="wrap_content"/>
62 58 <TextView
63   - android:text=" 道题"
  59 + android:text=" 道未做题"
64 60 android:textSize="13sp"
65 61 android:textColor="#333"
66 62 android:layout_width="wrap_content"
... ... @@ -83,13 +79,13 @@
83 79 android:layout_height="wrap_content">
84 80 <TextView
85 81 android:id="@+id/btnConfirm"
86   - android:text="作业全对"
  82 + android:text="下一步"
87 83 android:textSize="16sp"
88 84 android:textColor="@color/white"
89 85 android:gravity="center"
90 86 android:layout_gravity="center"
91 87 android:background="@drawable/shape_radius_5"
92   - android:backgroundTint="#4ABC78"
  88 + android:backgroundTint="#1C90F3"
93 89 android:layout_width="265dp"
94 90 android:layout_height="36dp"/>
95 91 </FrameLayout>
... ...
app/src/main/res/layout/activity_huyou_detail.xml
... ... @@ -15,6 +15,7 @@
15 15 android:id="@+id/root"
16 16 android:orientation="vertical"
17 17 android:background="#CEF1EC"
  18 + android:paddingBottom="24dp"
18 19 android:layout_width="378dp"
19 20 android:layout_height="match_parent">
20 21  
... ... @@ -203,6 +204,7 @@
203 204 </LinearLayout>
204 205  
205 206 <LinearLayout
  207 + android:id="@+id/viewPointTotal"
206 208 android:orientation="vertical"
207 209 android:background="@drawable/shape_radius_10"
208 210 android:backgroundTint="@color/white"
... ... @@ -212,7 +214,7 @@
212 214 android:layout_width="match_parent"
213 215 android:layout_height="wrap_content">
214 216 <TextView
215   - android:text="薄弱知识点总评"
  217 + android:text="知识点总评"
216 218 android:textSize="16sp"
217 219 android:textColor="#333333"
218 220 android:textStyle="bold"
... ... @@ -418,7 +420,7 @@
418 420 android:gravity="center"
419 421 android:layout_width="0dp"
420 422 android:layout_height="match_parent"
421   - android:layout_weight="1">
  423 + android:layout_weight="1.1">
422 424 <LinearLayout
423 425 android:orientation="horizontal"
424 426 android:gravity="center_vertical"
... ... @@ -433,7 +435,7 @@
433 435 android:textSize="11sp"
434 436 android:textColor="#333"
435 437 android:textStyle="bold"
436   - android:layout_marginStart="5dp"
  438 + android:layout_marginStart="4dp"
437 439 android:layout_width="wrap_content"
438 440 android:layout_height="wrap_content"/>
439 441 </LinearLayout>
... ... @@ -459,11 +461,6 @@
459 461 android:layout_height="wrap_content"/>
460 462 </LinearLayout>
461 463 </LinearLayout>
462   - <View
463   - android:background="#9ECAFC"
464   - android:layout_marginVertical="8dp"
465   - android:layout_width="1dp"
466   - android:layout_height="match_parent"/>
467 464 <LinearLayout
468 465 android:orientation="vertical"
469 466 android:gravity="center"
... ... @@ -476,7 +473,7 @@
476 473 android:layout_width="wrap_content"
477 474 android:layout_height="wrap_content">
478 475 <ImageView
479   - android:src="@drawable/png_icon_statistical_accuracy"
  476 + android:src="@drawable/png_icon_statistical_correct"
480 477 android:layout_width="12dp"
481 478 android:layout_height="13dp"/>
482 479 <TextView
... ... @@ -484,7 +481,7 @@
484 481 android:textSize="11sp"
485 482 android:textColor="#333"
486 483 android:textStyle="bold"
487   - android:layout_marginStart="5dp"
  484 + android:layout_marginStart="4dp"
488 485 android:layout_width="wrap_content"
489 486 android:layout_height="wrap_content"/>
490 487 </LinearLayout>
... ... @@ -510,11 +507,6 @@
510 507 android:layout_height="wrap_content"/>
511 508 </LinearLayout>
512 509 </LinearLayout>
513   - <View
514   - android:background="#9ECAFC"
515   - android:layout_marginVertical="8dp"
516   - android:layout_width="1dp"
517   - android:layout_height="match_parent"/>
518 510 <LinearLayout
519 511 android:orientation="vertical"
520 512 android:gravity="center"
... ... @@ -527,7 +519,7 @@
527 519 android:layout_width="wrap_content"
528 520 android:layout_height="wrap_content">
529 521 <ImageView
530   - android:src="@drawable/png_icon_statistical_accuracy"
  522 + android:src="@drawable/png_icon_statistical_error"
531 523 android:layout_width="12dp"
532 524 android:layout_height="13dp"/>
533 525 <TextView
... ... @@ -535,7 +527,7 @@
535 527 android:textSize="11sp"
536 528 android:textColor="#333"
537 529 android:textStyle="bold"
538   - android:layout_marginStart="5dp"
  530 + android:layout_marginStart="4dp"
539 531 android:layout_width="wrap_content"
540 532 android:layout_height="wrap_content"/>
541 533 </LinearLayout>
... ... @@ -561,6 +553,52 @@
561 553 android:layout_height="wrap_content"/>
562 554 </LinearLayout>
563 555 </LinearLayout>
  556 + <LinearLayout
  557 + android:orientation="vertical"
  558 + android:gravity="center"
  559 + android:layout_width="0dp"
  560 + android:layout_height="match_parent"
  561 + android:layout_weight="1">
  562 + <LinearLayout
  563 + android:orientation="horizontal"
  564 + android:gravity="center_vertical"
  565 + android:layout_width="wrap_content"
  566 + android:layout_height="wrap_content">
  567 + <ImageView
  568 + android:src="@drawable/png_icon_daily_blank"
  569 + android:layout_width="12dp"
  570 + android:layout_height="13dp"/>
  571 + <TextView
  572 + android:text="未做题数"
  573 + android:textSize="11sp"
  574 + android:textColor="#333"
  575 + android:textStyle="bold"
  576 + android:layout_marginStart="4dp"
  577 + android:layout_width="wrap_content"
  578 + android:layout_height="wrap_content"/>
  579 + </LinearLayout>
  580 + <LinearLayout
  581 + android:orientation="horizontal"
  582 + android:layout_marginTop="8dp"
  583 + android:layout_width="wrap_content"
  584 + android:layout_height="wrap_content">
  585 + <TextView
  586 + android:id="@+id/tvTotalBlank"
  587 + tools:text="88"
  588 + android:textSize="14sp"
  589 + android:textColor="#3BC3B6"
  590 + android:textStyle="bold"
  591 + android:layout_width="wrap_content"
  592 + android:layout_height="wrap_content"/>
  593 + <TextView
  594 + android:text="道"
  595 + android:textSize="9sp"
  596 + android:textColor="#3BC3B6"
  597 + android:textStyle="bold"
  598 + android:layout_width="wrap_content"
  599 + android:layout_height="wrap_content"/>
  600 + </LinearLayout>
  601 + </LinearLayout>
564 602 </LinearLayout>
565 603  
566 604 <TextView
... ... @@ -863,6 +901,7 @@
863 901 </LinearLayout>
864 902  
865 903 <LinearLayout
  904 + android:id="@+id/viewTable"
866 905 android:orientation="vertical"
867 906 android:background="@drawable/shape_radius_10"
868 907 android:backgroundTint="@color/white"
... ... @@ -1074,6 +1113,85 @@
1074 1113 android:layout_width="wrap_content"
1075 1114 android:layout_height="wrap_content"/>
1076 1115 </LinearLayout>
  1116 + </LinearLayout>
  1117 +
  1118 + <LinearLayout
  1119 + android:id="@+id/viewWeekTable"
  1120 + android:orientation="vertical"
  1121 + android:background="@drawable/shape_radius_10"
  1122 + android:backgroundTint="@color/white"
  1123 + android:padding="16dp"
  1124 + android:layout_marginHorizontal="16dp"
  1125 + android:layout_marginTop="12dp"
  1126 + android:layout_width="match_parent"
  1127 + android:layout_height="wrap_content">
  1128 + <TextView
  1129 + android:text="知识点掌握详情"
  1130 + android:textSize="16sp"
  1131 + android:textColor="#333333"
  1132 + android:textStyle="bold"
  1133 + android:background="@drawable/bg_hy_analyse_title"
  1134 + android:paddingStart="24dp"
  1135 + android:paddingEnd="4dp"
  1136 + android:layout_gravity="center_horizontal"
  1137 + android:layout_width="wrap_content"
  1138 + android:layout_height="wrap_content"/>
  1139 +
  1140 + <LinearLayout
  1141 + android:id="@+id/tableWeekRoot"
  1142 + android:orientation="vertical"
  1143 + android:background="@drawable/bg_huyou_table_bg"
  1144 + android:layout_marginTop="16dp"
  1145 + android:layout_width="match_parent"
  1146 + android:layout_height="wrap_content">
  1147 + <LinearLayout
  1148 + android:orientation="horizontal"
  1149 + android:background="#50CEC2"
  1150 + android:layout_width="match_parent"
  1151 + android:layout_height="60dp">
  1152 + <TextView
  1153 + android:text="知识点名称"
  1154 + android:textSize="13sp"
  1155 + android:textColor="@color/white"
  1156 + android:gravity="center"
  1157 + android:layout_weight="135"
  1158 + android:layout_width="0dp"
  1159 + android:layout_height="match_parent"/>
  1160 + <View
  1161 + android:background="#38B3A7"
  1162 + android:layout_width="1dp"
  1163 + android:layout_height="match_parent"/>
  1164 +
  1165 + <TextView
  1166 + android:text="知识点掌握状态"
  1167 + android:textSize="13sp"
  1168 + android:textColor="@color/white"
  1169 + android:gravity="center"
  1170 + android:layout_weight="179"
  1171 + android:layout_width="0dp"
  1172 + android:layout_height="match_parent"/>
  1173 +
  1174 + <View
  1175 + android:background="#38B3A7"
  1176 + android:layout_width="1dp"
  1177 + android:layout_height="match_parent"/>
  1178 +
  1179 + <TextView
  1180 + android:text="正答率"
  1181 + android:textSize="13sp"
  1182 + android:textColor="@color/white"
  1183 + android:gravity="center"
  1184 + android:layout_width="48dp"
  1185 + android:layout_height="match_parent"/>
  1186 + </LinearLayout>
  1187 + <androidx.recyclerview.widget.RecyclerView
  1188 + android:id="@+id/rvWeekPoint"
  1189 + android:orientation="vertical"
  1190 + app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
  1191 + app:reverseLayout="false"
  1192 + android:layout_width="match_parent"
  1193 + android:layout_height="wrap_content"/>
  1194 + </LinearLayout>
1077 1195  
1078 1196 </LinearLayout>
1079 1197 </LinearLayout>
... ...
app/src/main/res/layout/activity_huyou_detail_a4.xml
... ... @@ -218,6 +218,7 @@
218 218 android:layout_width="wrap_content"
219 219 android:layout_height="match_parent">
220 220 <LinearLayout
  221 + android:id="@+id/viewPointTotal"
221 222 android:orientation="vertical"
222 223 android:background="@drawable/shape_radius_10"
223 224 android:backgroundTint="@color/white"
... ... @@ -226,7 +227,7 @@
226 227 android:layout_width="335dp"
227 228 android:layout_height="613dp">
228 229 <TextView
229   - android:text="薄弱知识点总评"
  230 + android:text="知识点总评"
230 231 android:textSize="16sp"
231 232 android:textColor="#333333"
232 233 android:textStyle="bold"
... ... @@ -469,11 +470,6 @@
469 470 android:layout_height="wrap_content"/>
470 471 </LinearLayout>
471 472 </LinearLayout>
472   - <View
473   - android:background="#9ECAFC"
474   - android:layout_marginVertical="8dp"
475   - android:layout_width="1dp"
476   - android:layout_height="match_parent"/>
477 473 <LinearLayout
478 474 android:orientation="vertical"
479 475 android:gravity="center"
... ... @@ -486,7 +482,7 @@
486 482 android:layout_width="wrap_content"
487 483 android:layout_height="wrap_content">
488 484 <ImageView
489   - android:src="@drawable/png_icon_statistical_accuracy"
  485 + android:src="@drawable/png_icon_statistical_correct"
490 486 android:layout_width="12dp"
491 487 android:layout_height="13dp"/>
492 488 <TextView
... ... @@ -520,11 +516,6 @@
520 516 android:layout_height="wrap_content"/>
521 517 </LinearLayout>
522 518 </LinearLayout>
523   - <View
524   - android:background="#9ECAFC"
525   - android:layout_marginVertical="8dp"
526   - android:layout_width="1dp"
527   - android:layout_height="match_parent"/>
528 519 <LinearLayout
529 520 android:orientation="vertical"
530 521 android:gravity="center"
... ... @@ -537,7 +528,7 @@
537 528 android:layout_width="wrap_content"
538 529 android:layout_height="wrap_content">
539 530 <ImageView
540   - android:src="@drawable/png_icon_statistical_accuracy"
  531 + android:src="@drawable/png_icon_statistical_error"
541 532 android:layout_width="12dp"
542 533 android:layout_height="13dp"/>
543 534 <TextView
... ... @@ -571,6 +562,52 @@
571 562 android:layout_height="wrap_content"/>
572 563 </LinearLayout>
573 564 </LinearLayout>
  565 + <LinearLayout
  566 + android:orientation="vertical"
  567 + android:gravity="center"
  568 + android:layout_width="0dp"
  569 + android:layout_height="match_parent"
  570 + android:layout_weight="1">
  571 + <LinearLayout
  572 + android:orientation="horizontal"
  573 + android:gravity="center_vertical"
  574 + android:layout_width="wrap_content"
  575 + android:layout_height="wrap_content">
  576 + <ImageView
  577 + android:src="@drawable/png_icon_daily_blank"
  578 + android:layout_width="12dp"
  579 + android:layout_height="13dp"/>
  580 + <TextView
  581 + android:text="未做题数"
  582 + android:textSize="11sp"
  583 + android:textColor="#333"
  584 + android:textStyle="bold"
  585 + android:layout_marginStart="5dp"
  586 + android:layout_width="wrap_content"
  587 + android:layout_height="wrap_content"/>
  588 + </LinearLayout>
  589 + <LinearLayout
  590 + android:orientation="horizontal"
  591 + android:layout_marginTop="8dp"
  592 + android:layout_width="wrap_content"
  593 + android:layout_height="wrap_content">
  594 + <TextView
  595 + android:id="@+id/tvTotalBlank"
  596 + tools:text="88"
  597 + android:textSize="14sp"
  598 + android:textColor="#3BC3B6"
  599 + android:textStyle="bold"
  600 + android:layout_width="wrap_content"
  601 + android:layout_height="wrap_content"/>
  602 + <TextView
  603 + android:text="道"
  604 + android:textSize="9sp"
  605 + android:textColor="#3BC3B6"
  606 + android:textStyle="bold"
  607 + android:layout_width="wrap_content"
  608 + android:layout_height="wrap_content"/>
  609 + </LinearLayout>
  610 + </LinearLayout>
574 611 </LinearLayout>
575 612  
576 613 <TextView
... ... @@ -630,7 +667,8 @@
630 667 android:orientation="horizontal"
631 668 android:layout_width="match_parent"
632 669 android:layout_height="70dp"
633   - android:layout_marginTop="48dp">
  670 + android:layout_marginTop="48dp"
  671 + android:baselineAligned="false">
634 672 <LinearLayout
635 673 android:orientation="vertical"
636 674 android:background="@drawable/shape_radius_10"
... ... @@ -866,6 +904,7 @@
866 904 </LinearLayout>
867 905  
868 906 <LinearLayout
  907 + android:id="@+id/viewTable"
869 908 android:orientation="vertical"
870 909 android:background="@drawable/shape_radius_10"
871 910 android:backgroundTint="@color/white"
... ... @@ -1080,6 +1119,86 @@
1080 1119 android:layout_height="wrap_content"/>
1081 1120 </LinearLayout>
1082 1121 </LinearLayout>
  1122 +
  1123 + <LinearLayout
  1124 + android:id="@+id/viewWeekTable"
  1125 + android:orientation="vertical"
  1126 + android:background="@drawable/shape_radius_10"
  1127 + android:backgroundTint="@color/white"
  1128 + android:padding="16dp"
  1129 + android:layout_marginHorizontal="14dp"
  1130 + android:layout_width="335dp"
  1131 + android:layout_height="472dp">
  1132 + <TextView
  1133 + android:text="知识点掌握详情"
  1134 + android:textSize="16sp"
  1135 + android:textColor="#333333"
  1136 + android:textStyle="bold"
  1137 + android:background="@drawable/bg_hy_analyse_title"
  1138 + android:paddingStart="24dp"
  1139 + android:paddingEnd="4dp"
  1140 + android:layout_marginTop="4dp"
  1141 + android:layout_gravity="center_horizontal"
  1142 + android:layout_width="wrap_content"
  1143 + android:layout_height="wrap_content"/>
  1144 +
  1145 + <LinearLayout
  1146 + android:id="@+id/tableWeekRoot"
  1147 + android:orientation="vertical"
  1148 + android:background="@drawable/bg_huyou_table_bg"
  1149 + android:layout_marginTop="16dp"
  1150 + android:layout_width="match_parent"
  1151 + android:layout_height="wrap_content">
  1152 + <LinearLayout
  1153 + android:orientation="horizontal"
  1154 + android:background="#50CEC2"
  1155 + android:layout_width="match_parent"
  1156 + android:layout_height="60dp">
  1157 + <TextView
  1158 + android:text="知识点名称"
  1159 + android:textSize="13sp"
  1160 + android:textColor="@color/white"
  1161 + android:gravity="center"
  1162 + android:layout_weight="135"
  1163 + android:layout_width="0dp"
  1164 + android:layout_height="match_parent"/>
  1165 + <View
  1166 + android:background="#38B3A7"
  1167 + android:layout_width="1dp"
  1168 + android:layout_height="match_parent"/>
  1169 +
  1170 + <TextView
  1171 + android:text="知识点掌握状态"
  1172 + android:textSize="13sp"
  1173 + android:textColor="@color/white"
  1174 + android:gravity="center"
  1175 + android:layout_weight="179"
  1176 + android:layout_width="0dp"
  1177 + android:layout_height="match_parent"/>
  1178 +
  1179 + <View
  1180 + android:background="#38B3A7"
  1181 + android:layout_width="1dp"
  1182 + android:layout_height="match_parent"/>
  1183 +
  1184 + <TextView
  1185 + android:text="正答率"
  1186 + android:textSize="13sp"
  1187 + android:textColor="@color/white"
  1188 + android:gravity="center"
  1189 + android:layout_width="48dp"
  1190 + android:layout_height="match_parent"/>
  1191 + </LinearLayout>
  1192 + <androidx.recyclerview.widget.RecyclerView
  1193 + android:id="@+id/rvWeekPoint"
  1194 + android:orientation="vertical"
  1195 + app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
  1196 + app:reverseLayout="false"
  1197 + android:layout_width="match_parent"
  1198 + android:layout_height="wrap_content"/>
  1199 + </LinearLayout>
  1200 +
  1201 + </LinearLayout>
1083 1202 </LinearLayout>
1084 1203 </HorizontalScrollView>
1085 1204  
... ...
app/src/main/res/layout/item_homework_detail.xml
... ... @@ -2,15 +2,15 @@
2 2 <LinearLayout
3 3 xmlns:android="http://schemas.android.com/apk/res/android"
4 4 xmlns:tools="http://schemas.android.com/tools"
  5 + android:id="@+id/root"
5 6 android:orientation="vertical"
6 7 android:background="@drawable/shape_radius_10"
7   - android:backgroundTint="@color/white"
8 8 android:paddingVertical="14dp"
9 9 android:layout_marginHorizontal="16dp"
10 10 android:layout_marginVertical="8dp"
11 11 android:layout_width="match_parent"
12 12 android:layout_height="wrap_content"
13   - tools:ignore="SmallSp">
  13 + tools:ignore="SmallSp,HardcodedText">
14 14  
15 15 <LinearLayout
16 16 android:orientation="horizontal"
... ... @@ -37,13 +37,58 @@
37 37 android:backgroundTint="#489AFA"
38 38 android:layout_width="wrap_content"
39 39 android:layout_height="wrap_content" />
  40 + <Space style="@style/empty_space"/>
  41 + <RadioGroup
  42 + android:id="@+id/radioGroup"
  43 + android:visibility="gone"
  44 + tools:visibility="visible"
  45 + android:orientation="horizontal"
  46 + android:weightSum="3"
  47 + android:gravity="center_vertical"
  48 + android:paddingHorizontal="10dp"
  49 + android:layout_gravity="bottom"
  50 + android:layout_width="wrap_content"
  51 + android:layout_height="wrap_content">
  52 + <RadioButton
  53 + android:id="@+id/rbRight"
  54 + android:text="正确"
  55 + android:textSize="12sp"
  56 + android:textColor="@color/white"
  57 + android:gravity="center"
  58 + android:button="@null"
  59 + android:background="@drawable/btn_feedback_right"
  60 + android:layout_marginHorizontal="8dp"
  61 + android:layout_width="64dp"
  62 + android:layout_height="20dp" />
  63 + <RadioButton
  64 + android:id="@+id/rbError"
  65 + android:text="错误"
  66 + android:textSize="12sp"
  67 + android:textColor="@color/white"
  68 + android:gravity="center"
  69 + android:button="@null"
  70 + android:background="@drawable/btn_feedback_error"
  71 + android:layout_marginHorizontal="8dp"
  72 + android:layout_width="64dp"
  73 + android:layout_height="20dp" />
  74 + <RadioButton
  75 + android:id="@+id/rbBlank"
  76 + android:text="未完成"
  77 + android:textSize="12sp"
  78 + android:textColor="@color/white"
  79 + android:gravity="center"
  80 + android:button="@null"
  81 + android:background="@drawable/btn_feedback_blank"
  82 + android:layout_marginHorizontal="8dp"
  83 + android:layout_width="64dp"
  84 + android:layout_height="20dp" />
  85 + </RadioGroup>
40 86 </LinearLayout>
41 87  
42 88 <ImageView
43 89 android:id="@+id/ivTopic"
44 90 android:adjustViewBounds="true"
45   - android:layout_marginStart="10dp"
46   - android:layout_marginEnd="4dp"
  91 + android:layout_marginHorizontal="10dp"
47 92 android:layout_marginTop="14dp"
48 93 android:layout_width="match_parent"
49 94 android:layout_height="wrap_content"
... ...
app/src/main/res/layout/item_huyou_week_point.xml
... ... @@ -0,0 +1,64 @@
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  3 + xmlns:tools="http://schemas.android.com/tools"
  4 + android:orientation="vertical"
  5 + android:layout_width="match_parent"
  6 + android:layout_height="36dp"
  7 + tools:ignore="SmallSp,RtlSymmetry,HardcodedText">
  8 + <View
  9 + android:background="#38B3A7"
  10 + android:layout_width="match_parent"
  11 + android:layout_height="1dp"/>
  12 +
  13 + <LinearLayout
  14 + android:orientation="horizontal"
  15 + android:layout_width="match_parent"
  16 + android:layout_height="match_parent">
  17 + <TextView
  18 + android:id="@+id/tvName"
  19 + tools:text="正数与负数"
  20 + android:textSize="12sp"
  21 + android:textColor="#333"
  22 + android:gravity="center_vertical"
  23 + android:maxLines="2"
  24 + android:paddingStart="6dp"
  25 + android:layout_weight="135"
  26 + android:layout_width="0dp"
  27 + android:layout_height="match_parent"/>
  28 + <View
  29 + android:background="#38B3A7"
  30 + android:layout_width="1dp"
  31 + android:layout_height="match_parent"/>
  32 + <FrameLayout
  33 + android:paddingStart="4dp"
  34 + android:layout_weight="179"
  35 + android:layout_width="0dp"
  36 + android:layout_height="match_parent">
  37 + <TextView
  38 + android:id="@+id/tvState"
  39 + tools:text="掌握薄弱"
  40 + android:textSize="12sp"
  41 + android:textColor="@color/white"
  42 + android:background="@drawable/shape_radius_2"
  43 + android:backgroundTint="#EA5127"
  44 + android:paddingHorizontal="3dp"
  45 + android:paddingVertical="1dp"
  46 + android:singleLine="true"
  47 + android:layout_gravity="center"
  48 + android:layout_width="wrap_content"
  49 + android:layout_height="wrap_content" />
  50 + </FrameLayout>
  51 + <View
  52 + android:background="#38B3A7"
  53 + android:layout_width="1dp"
  54 + android:layout_height="match_parent"/>
  55 + <TextView
  56 + android:id="@+id/tvHuyou"
  57 + android:text="-"
  58 + android:textSize="12sp"
  59 + android:textColor="#333"
  60 + android:gravity="center"
  61 + android:layout_width="48dp"
  62 + android:layout_height="match_parent"/>
  63 + </LinearLayout>
  64 +</LinearLayout>
0 65 \ No newline at end of file
... ...
libs/common/src/main/java/com/prws/common/bean/homework/Correction.java
... ... @@ -1,16 +0,0 @@
1   -package com.prws.common.bean.homework;
2   -
3   -public class Correction {
4   -
5   - public String brief;
6   -
7   - public int correction; // 0 对, 1 错
8   -
9   - public Correction() {
10   - }
11   -
12   - public Correction(String brief, int correction) {
13   - this.brief = brief;
14   - this.correction = correction;
15   - }
16   -}
libs/common/src/main/java/com/prws/common/bean/homework/CorrectionSer.java
... ... @@ -2,7 +2,7 @@ package com.prws.common.bean.homework;
2 2  
3 3 public class CorrectionSer {
4 4 public String brief;
5   - public int correction; // 0 对, 1 错
  5 + public int correction; // 0 对, 1 错, 2 未做题
6 6 public int state; // 1: 已听懂; 2: 基本听懂; 3: 一般听懂
7 7  
8 8 public CorrectionSer() {
... ...
libs/common/src/main/java/com/prws/common/bean/homework/HomeWork.java
... ... @@ -20,7 +20,6 @@ public class HomeWork implements Serializable {
20 20 public String answer;
21 21 public String points;
22 22  
23   - public boolean check = false; //选中为错题
24 23 public transient int index = 0;
25 24 public transient int state = 1;
26 25  
... ... @@ -39,6 +38,6 @@ public class HomeWork implements Serializable {
39 38 }
40 39  
41 40 public CorrectionSer toSer() {
42   - return new CorrectionSer(brief, check ? 1 : 0, state);
  41 + return new CorrectionSer(brief, correction, state);
43 42 }
44 43 }
... ...
libs/common/src/main/java/com/prws/common/bean/homework/StDetail.java
... ... @@ -21,6 +21,7 @@ public class StDetail {
21 21  
22 22 public int total;
23 23 public int correct;
  24 + public int unfinished;
24 25  
25 26 public float mondayCorrection;
26 27 public float tuesdayCorrection;
... ...
libs/common/src/main/java/com/prws/common/net/NetWorks.java
... ... @@ -58,7 +58,7 @@ import retrofit2.http.Url;
58 58 */
59 59 public class NetWorks extends RetrofitUtils {
60 60 //服务器路径
61   - public static final NetService service_url = getMachineRetrofit("https://mgr.hjx.com").create(NetService.class);
  61 + public static final NetService service_url = getMachineRetrofit(BuildConfig.SERVER_URL).create(NetService.class);
62 62  
63 63 //设缓存有效期为1天
64 64 protected static final long CACHE_STALE_SEC = 60 * 60 * 24 * 1;
... ...