Commit f97c55b37f21c88a4359178b246ae2930c2c91df

Authored by shixianjie
1 parent 58c15e2b27
Exists in master

教师评语长度限制

app/src/main/java/com/hjx/parent/HomeworkFeedbackActivity.java
1 package com.hjx.parent; 1 package com.hjx.parent;
2 2
3 import android.annotation.SuppressLint; 3 import android.annotation.SuppressLint;
4 import android.content.Intent; 4 import android.content.Intent;
5 import android.os.Bundle; 5 import android.os.Bundle;
6 import android.view.View; 6 import android.view.View;
7 import android.widget.ImageView; 7 import android.widget.ImageView;
8 import android.widget.RadioButton; 8 import android.widget.RadioButton;
9 import android.widget.Toast; 9 import android.widget.Toast;
10 10
11 import androidx.annotation.NonNull; 11 import androidx.annotation.NonNull;
12 import androidx.annotation.Nullable; 12 import androidx.annotation.Nullable;
13 13
14 import com.bumptech.glide.Glide; 14 import com.bumptech.glide.Glide;
15 import com.chad.library.adapter.base.BaseQuickAdapter; 15 import com.chad.library.adapter.base.BaseQuickAdapter;
16 import com.chad.library.adapter.base.BaseViewHolder; 16 import com.chad.library.adapter.base.BaseViewHolder;
17 import com.google.android.flexbox.FlexboxLayoutManager; 17 import com.google.android.flexbox.FlexboxLayoutManager;
18 import com.google.gson.Gson; 18 import com.google.gson.Gson;
19 import com.hjx.parent.databinding.ActivityHomeworkFeedbackBinding; 19 import com.hjx.parent.databinding.ActivityHomeworkFeedbackBinding;
20 import com.hjx.parent.rx.BaseRxActivity; 20 import com.hjx.parent.rx.BaseRxActivity;
21 import com.prws.common.bean.Student; 21 import com.prws.common.bean.Student;
22 import com.prws.common.bean.homework.Correction; 22 import com.prws.common.bean.homework.Correction;
23 import com.prws.common.bean.homework.CorrectionPoint; 23 import com.prws.common.bean.homework.CorrectionPoint;
24 import com.prws.common.bean.homework.HomeWork; 24 import com.prws.common.bean.homework.HomeWork;
25 import com.prws.common.bean.homework.HomeworkList; 25 import com.prws.common.bean.homework.HomeworkList;
26 import com.prws.common.bean.homework.KeyValue; 26 import com.prws.common.bean.homework.KeyValue;
27 import com.prws.common.net.NetWorks; 27 import com.prws.common.net.NetWorks;
28 28
29 import java.text.DecimalFormat; 29 import java.text.DecimalFormat;
30 import java.util.ArrayList; 30 import java.util.ArrayList;
31 import java.util.HashMap; 31 import java.util.HashMap;
32 import java.util.HashSet; 32 import java.util.HashSet;
33 import java.util.List; 33 import java.util.List;
34 import java.util.Map; 34 import java.util.Map;
35 import java.util.Set; 35 import java.util.Set;
36 36
37 public class HomeworkFeedbackActivity extends BaseRxActivity<ActivityHomeworkFeedbackBinding> { 37 public class HomeworkFeedbackActivity extends BaseRxActivity<ActivityHomeworkFeedbackBinding> {
38 private Student student; 38 private Student student;
39 private HomeworkList mData; 39 private HomeworkList mData;
40 private ArrayList<HomeWork> mList; 40 private ArrayList<HomeWork> mList;
41 private List<Correction> corrections = new ArrayList<>(); 41 private List<Correction> corrections = new ArrayList<>();
42 42
43 @SuppressWarnings("unchecked") 43 @SuppressWarnings("unchecked")
44 @Override 44 @Override
45 public void initView(Bundle savedInstanceState) { 45 public void initView(Bundle savedInstanceState) {
46 binding.toolbar.setNavigationOnClickListener(v -> onBackPressed()); 46 binding.toolbar.setNavigationOnClickListener(v -> onBackPressed());
47 student = (Student) getIntent().getSerializableExtra("student"); 47 student = (Student) getIntent().getSerializableExtra("student");
48 mData = (HomeworkList) getIntent().getSerializableExtra("data"); 48 mData = (HomeworkList) getIntent().getSerializableExtra("data");
49 mList = (ArrayList<HomeWork>) getIntent().getSerializableExtra("list"); 49 mList = (ArrayList<HomeWork>) getIntent().getSerializableExtra("list");
50 50
51 binding.tvStuName.setText(student.stuName); 51 binding.tvStuName.setText(student.stuName);
52 binding.tvGrade.setText(student.grade); 52 binding.tvGrade.setText(student.grade);
53 53
54 List<HomeWork> errorList = new ArrayList<>(); 54 List<HomeWork> errorList = new ArrayList<>();
55 int correctNo = 0; 55 int correctNo = 0;
56 for (HomeWork homeWork: mList) { 56 for (HomeWork homeWork: mList) {
57 homeWork.state = 1; 57 homeWork.state = 1;
58 homeWork.index = mList.indexOf(homeWork); 58 homeWork.index = mList.indexOf(homeWork);
59 corrections.add(new Correction(homeWork.brief, homeWork.check ? 1 : 0)); 59 corrections.add(new Correction(homeWork.brief, homeWork.check ? 1 : 0));
60 if (!homeWork.check) correctNo ++; 60 if (!homeWork.check) correctNo ++;
61 else errorList.add(homeWork); 61 else errorList.add(homeWork);
62 } 62 }
63 binding.tvPercent.setText(new DecimalFormat("0%").format(1f * correctNo / mList.size())); 63 binding.tvPercent.setText(new DecimalFormat("0%").format(1f * correctNo / mList.size()));
64 64
65 binding.rvCorrect.setLayoutManager(new FlexboxLayoutManager(this)); 65 binding.rvCorrect.setLayoutManager(new FlexboxLayoutManager(this));
66 NumberAdapter numberAdapter = new NumberAdapter(mList); 66 NumberAdapter numberAdapter = new NumberAdapter(mList);
67 binding.rvCorrect.setAdapter(numberAdapter); 67 binding.rvCorrect.setAdapter(numberAdapter);
68 binding.rvError.setVisibility(errorList.isEmpty() ? View.GONE : View.VISIBLE); 68 binding.rvError.setVisibility(errorList.isEmpty() ? View.GONE : View.VISIBLE);
69 binding.rvError.setAdapter(new EvalAdapter(errorList)); 69 binding.rvError.setAdapter(new EvalAdapter(errorList));
70 if (errorList.isEmpty()) { 70 if (errorList.isEmpty()) {
71 binding.flEval.setVisibility(View.GONE); 71 binding.flEval.setVisibility(View.GONE);
72 } 72 }
73 73
74 binding.btnDetail.setOnClickListener(v -> { 74 binding.btnDetail.setOnClickListener(v -> {
75 viewTopicDetail(0); 75 viewTopicDetail(0);
76 }); 76 });
77 numberAdapter.setOnItemClickListener((baseQuickAdapter, view, i) -> { 77 numberAdapter.setOnItemClickListener((baseQuickAdapter, view, i) -> {
78 viewTopicDetail(i); 78 viewTopicDetail(i);
79 }); 79 });
80 binding.btnPublish.setOnClickListener(v -> submit()); 80 binding.btnPublish.setOnClickListener(v -> submit());
81 } 81 }
82 82
83 private void viewTopicDetail(int position) { 83 private void viewTopicDetail(int position) {
84 Intent intent = new Intent(this, HomeworkTopicActivity.class); 84 Intent intent = new Intent(this, HomeworkTopicActivity.class);
85 intent.putExtra("list", mList); 85 intent.putExtra("list", mList);
86 intent.putExtra("position", position); 86 intent.putExtra("position", position);
87 startActivity(intent); 87 startActivity(intent);
88 } 88 }
89 89
90 @SuppressLint("CheckResult") 90 @SuppressLint("CheckResult")
91 private void submit() { 91 private void submit() {
92 Map<String, Object> body = new HashMap<>(); 92 Map<String, Object> body = new HashMap<>();
93 body.put("homeworkId", mData.getId()); 93 body.put("homeworkId", mData.getId());
94 body.put("comment", binding.etComment.getText().toString()); 94 body.put("comment", binding.etComment.getText().toString());
95 body.put("stuId", student.stuId); 95 body.put("stuId", student.stuId);
96 body.put("points", countPoint()); 96 body.put("points", countPoint());
97 body.put("correctionList", corrections); 97 body.put("correctionList", corrections);
98 NetWorks.service_url.uploadHomeworkFeedback(NetWorks.getHeader(), body) 98 NetWorks.service_url.uploadHomeworkFeedback(NetWorks.getHeader(), body)
99 .compose(transformSingle()) 99 .compose(transformSingle())
100 .subscribe((response, th) -> { 100 .subscribe((response, th) -> {
101 if (th != null) th.printStackTrace(); 101 if (th != null) th.printStackTrace();
102 if (response != null && response.getSuccess()) { 102 if (response != null && response.getSuccess()) {
103 Toast.makeText(this, "反馈成功", Toast.LENGTH_SHORT).show(); 103 Toast.makeText(this, "反馈成功", Toast.LENGTH_SHORT).show();
104 104
105 Intent intent = new Intent(this, HomeworkShareActivity.class); 105 Intent intent = new Intent(this, HomeworkShareActivity.class);
106 intent.putExtra("student", student); 106 intent.putExtra("student", student);
107 intent.putExtra("id", mData.getId()); 107 intent.putExtra("id", mData.getId());
108 intent.putExtra("grade", mData.getGrade()); 108 intent.putExtra("grade", mData.getGrade());
109 intent.putExtra("subject", mData.getSubject()); 109 intent.putExtra("subject", mData.getSubject());
110 startActivity(intent); 110 startActivity(intent);
111 111
112 setResult(RESULT_OK); 112 setResult(RESULT_OK);
113 finish(); 113 finish();
114 } else {
115 Toast.makeText(this, "反馈失败", Toast.LENGTH_SHORT).show();
114 } 116 }
115 }); 117 });
116 } 118 }
117 119
118 @SuppressLint("CheckResult") 120 @SuppressLint("CheckResult")
119 private List<CorrectionPoint> countPoint() { 121 private List<CorrectionPoint> countPoint() {
120 Set<KeyValue> set = new HashSet<>(); 122 Set<KeyValue> set = new HashSet<>();
121 Map<String, Integer> totalTimes = new HashMap<>(); 123 Map<String, Integer> totalTimes = new HashMap<>();
122 Map<String, Integer> correctTimes = new HashMap<>(); 124 Map<String, Integer> correctTimes = new HashMap<>();
123 Map<String, Integer> underTimes = new HashMap<>(); 125 Map<String, Integer> underTimes = new HashMap<>();
124 Map<String, Integer> baseTimes = new HashMap<>(); 126 Map<String, Integer> baseTimes = new HashMap<>();
125 Map<String, Integer> normalTimes = new HashMap<>(); 127 Map<String, Integer> normalTimes = new HashMap<>();
126 Gson gson = new Gson(); 128 Gson gson = new Gson();
127 for (HomeWork homeWork: mList) { 129 for (HomeWork homeWork: mList) {
128 homeWork.formatPoints(gson); 130 homeWork.formatPoints(gson);
129 131
130 set.addAll(homeWork.pointsObj); 132 set.addAll(homeWork.pointsObj);
131 for (KeyValue keyValue: homeWork.pointsObj) { 133 for (KeyValue keyValue: homeWork.pointsObj) {
132 String key = keyValue.Key; 134 String key = keyValue.Key;
133 if (totalTimes.containsKey(key)) { 135 if (totalTimes.containsKey(key)) {
134 totalTimes.put(key, totalTimes.get(key) + 1); 136 totalTimes.put(key, totalTimes.get(key) + 1);
135 } else { 137 } else {
136 totalTimes.put(key, 1); 138 totalTimes.put(key, 1);
137 } 139 }
138 if (!homeWork.check) { 140 if (!homeWork.check) {
139 if (correctTimes.containsKey(key)) { 141 if (correctTimes.containsKey(key)) {
140 correctTimes.put(key, correctTimes.get(key) + 1); 142 correctTimes.put(key, correctTimes.get(key) + 1);
141 } else { 143 } else {
142 correctTimes.put(key, 1); 144 correctTimes.put(key, 1);
143 } 145 }
144 } else if (homeWork.state == 1) { 146 } else if (homeWork.state == 1) {
145 if (underTimes.containsKey(key)) { 147 if (underTimes.containsKey(key)) {
146 underTimes.put(key, underTimes.get(key) + 1); 148 underTimes.put(key, underTimes.get(key) + 1);
147 } else { 149 } else {
148 underTimes.put(key, 1); 150 underTimes.put(key, 1);
149 } 151 }
150 } else if (homeWork.state == 2) { 152 } else if (homeWork.state == 2) {
151 if (baseTimes.containsKey(key)) { 153 if (baseTimes.containsKey(key)) {
152 baseTimes.put(key, baseTimes.get(key) + 1); 154 baseTimes.put(key, baseTimes.get(key) + 1);
153 } else { 155 } else {
154 baseTimes.put(key, 1); 156 baseTimes.put(key, 1);
155 } 157 }
156 } else if (homeWork.state == 3) { 158 } else if (homeWork.state == 3) {
157 if (normalTimes.containsKey(key)) { 159 if (normalTimes.containsKey(key)) {
158 normalTimes.put(key, normalTimes.get(key) + 1); 160 normalTimes.put(key, normalTimes.get(key) + 1);
159 } else { 161 } else {
160 normalTimes.put(key, 1); 162 normalTimes.put(key, 1);
161 } 163 }
162 } 164 }
163 } 165 }
164 } 166 }
165 List<CorrectionPoint> points = new ArrayList<>(); 167 List<CorrectionPoint> points = new ArrayList<>();
166 for (KeyValue obj: set) { 168 for (KeyValue obj: set) {
167 CorrectionPoint point = new CorrectionPoint(); 169 CorrectionPoint point = new CorrectionPoint();
168 point.pointId = obj.Key; 170 point.pointId = obj.Key;
169 point.pointName = obj.Value; 171 point.pointName = obj.Value;
170 point.totalCount = ifNull(totalTimes.get(obj.Key), 1); 172 point.totalCount = ifNull(totalTimes.get(obj.Key), 1);
171 point.correctCount = ifNull(correctTimes.get(obj.Key), 0); 173 point.correctCount = ifNull(correctTimes.get(obj.Key), 0);
172 point.understandCount = ifNull(underTimes.get(obj.Key), 0); 174 point.understandCount = ifNull(underTimes.get(obj.Key), 0);
173 point.basicCount = ifNull(baseTimes.get(obj.Key), 0); 175 point.basicCount = ifNull(baseTimes.get(obj.Key), 0);
174 point.normalCount = ifNull(normalTimes.get(obj.Key), 0); 176 point.normalCount = ifNull(normalTimes.get(obj.Key), 0);
175 177
176 points.add(point); 178 points.add(point);
177 } 179 }
178 180
179 return points; 181 return points;
180 } 182 }
181 183
182 private int ifNull(Integer src, int defaultVal) { 184 private int ifNull(Integer src, int defaultVal) {
183 if (src == null) return defaultVal; 185 if (src == null) return defaultVal;
184 else return src; 186 else return src;
185 } 187 }
186 188
187 189
188 @Override 190 @Override
189 protected ActivityHomeworkFeedbackBinding getViewBinding() { 191 protected ActivityHomeworkFeedbackBinding getViewBinding() {
190 return ActivityHomeworkFeedbackBinding.inflate(getLayoutInflater()); 192 return ActivityHomeworkFeedbackBinding.inflate(getLayoutInflater());
191 } 193 }
192 194
193 static class NumberAdapter extends BaseQuickAdapter<HomeWork, BaseViewHolder> { 195 static class NumberAdapter extends BaseQuickAdapter<HomeWork, BaseViewHolder> {
194 196
195 public NumberAdapter(List<HomeWork> list) { 197 public NumberAdapter(List<HomeWork> list) {
196 super(R.layout.item_feedback_num, list); 198 super(R.layout.item_feedback_num, list);
197 } 199 }
198 200
199 @Override 201 @Override
200 protected void convert(@NonNull BaseViewHolder holder, HomeWork homeWork) { 202 protected void convert(@NonNull BaseViewHolder holder, HomeWork homeWork) {
201 int position = getData().indexOf(homeWork); 203 int position = getData().indexOf(homeWork);
202 holder.setText(R.id.tvNum, String.valueOf(position + 1)); 204 holder.setText(R.id.tvNum, String.valueOf(position + 1));
203 if (homeWork.check) { 205 if (homeWork.check) {
204 holder.setImageResource(R.id.ivType, R.drawable.ic_wrong_small); 206 holder.setImageResource(R.id.ivType, R.drawable.ic_wrong_small);
205 } else { 207 } else {
206 holder.setImageResource(R.id.ivType, R.drawable.ic_correct_small); 208 holder.setImageResource(R.id.ivType, R.drawable.ic_correct_small);
207 } 209 }
208 } 210 }
209 } 211 }
210 212
211 static class EvalAdapter extends BaseQuickAdapter<HomeWork, BaseViewHolder> { 213 static class EvalAdapter extends BaseQuickAdapter<HomeWork, BaseViewHolder> {
212 214
213 public EvalAdapter(@Nullable List<HomeWork> data) { 215 public EvalAdapter(@Nullable List<HomeWork> data) {
214 super(R.layout.item_homework_eval, data); 216 super(R.layout.item_homework_eval, data);
215 } 217 }
216 218
217 @Override 219 @Override
218 protected void convert(@NonNull BaseViewHolder holder, HomeWork homeWork) { 220 protected void convert(@NonNull BaseViewHolder holder, HomeWork homeWork) {
219 holder.itemView.setClipToOutline(true); 221 holder.itemView.setClipToOutline(true);
220 holder.setText(R.id.tvNo, "题目" + (homeWork.index + 1)); 222 holder.setText(R.id.tvNo, "题目" + (homeWork.index + 1));
221 ImageView iv = holder.getView(R.id.ivTopic); 223 ImageView iv = holder.getView(R.id.ivTopic);
222 Glide.with(mContext).load(homeWork.url).into(iv); 224 Glide.with(mContext).load(homeWork.url).into(iv);
223 225
224 RadioButton chk1 = holder.getView(R.id.chk1); 226 RadioButton chk1 = holder.getView(R.id.chk1);
225 RadioButton chk2 = holder.getView(R.id.chk2); 227 RadioButton chk2 = holder.getView(R.id.chk2);
226 RadioButton chk3 = holder.getView(R.id.chk3); 228 RadioButton chk3 = holder.getView(R.id.chk3);
227 chk1.setOnCheckedChangeListener((v, b) -> { 229 chk1.setOnCheckedChangeListener((v, b) -> {
228 if (b) { 230 if (b) {
229 homeWork.state = 1; 231 homeWork.state = 1;
230 } 232 }
231 }); 233 });
232 chk2.setOnCheckedChangeListener((v, b) -> { 234 chk2.setOnCheckedChangeListener((v, b) -> {
233 if (b) { 235 if (b) {
234 homeWork.state = 2; 236 homeWork.state = 2;
235 } 237 }
236 }); 238 });
237 chk3.setOnCheckedChangeListener((v, b) -> { 239 chk3.setOnCheckedChangeListener((v, b) -> {
238 if (b) { 240 if (b) {
239 homeWork.state = 3; 241 homeWork.state = 3;
240 } 242 }
241 }); 243 });
242 chk1.setChecked(homeWork.state == 1); 244 chk1.setChecked(homeWork.state == 1);
243 chk2.setChecked(homeWork.state == 2); 245 chk2.setChecked(homeWork.state == 2);
244 chk3.setChecked(homeWork.state == 3); 246 chk3.setChecked(homeWork.state == 3);
245 } 247 }
246 } 248 }
247 } 249 }
248 250
app/src/main/res/layout/activity_homework_feedback.xml
1 <?xml version="1.0" encoding="utf-8"?> 1 <?xml version="1.0" encoding="utf-8"?>
2 <LinearLayout 2 <LinearLayout
3 xmlns:android="http://schemas.android.com/apk/res/android" 3 xmlns:android="http://schemas.android.com/apk/res/android"
4 xmlns:app="http://schemas.android.com/apk/res-auto" 4 xmlns:app="http://schemas.android.com/apk/res-auto"
5 xmlns:tools="http://schemas.android.com/tools" 5 xmlns:tools="http://schemas.android.com/tools"
6 android:orientation="vertical" 6 android:orientation="vertical"
7 android:layout_width="match_parent" 7 android:layout_width="match_parent"
8 android:layout_height="match_parent" 8 android:layout_height="match_parent"
9 tools:ignore="UseCompoundDrawables,HardcodedText,SmallSp,ContentDescription"> 9 tools:ignore="UseCompoundDrawables,HardcodedText,SmallSp,ContentDescription">
10 10
11 <androidx.appcompat.widget.Toolbar 11 <androidx.appcompat.widget.Toolbar
12 android:id="@+id/toolbar" 12 android:id="@+id/toolbar"
13 app:navigationIcon="@drawable/svg_back" 13 app:navigationIcon="@drawable/svg_back"
14 app:contentInsetStartWithNavigation="14dp" 14 app:contentInsetStartWithNavigation="14dp"
15 android:paddingStart="-8dp" 15 android:paddingStart="-8dp"
16 android:paddingEnd="-8dp" 16 android:paddingEnd="-8dp"
17 android:background="@color/white" 17 android:background="@color/white"
18 android:layout_width="match_parent" 18 android:layout_width="match_parent"
19 android:layout_height="40dp"> 19 android:layout_height="40dp">
20 <TextView 20 <TextView
21 android:text="第二步:教师评语" 21 android:text="第二步:教师评语"
22 android:textSize="18sp" 22 android:textSize="18sp"
23 android:textColor="#333" 23 android:textColor="#333"
24 android:textStyle="bold" 24 android:textStyle="bold"
25 android:layout_gravity="center" 25 android:layout_gravity="center"
26 android:layout_width="wrap_content" 26 android:layout_width="wrap_content"
27 android:layout_height="wrap_content"/> 27 android:layout_height="wrap_content"/>
28 <TextView 28 <TextView
29 android:id="@+id/btnPublish" 29 android:id="@+id/btnPublish"
30 android:text="发布" 30 android:text="发布"
31 android:textSize="13sp" 31 android:textSize="13sp"
32 android:textColor="#1C90F3" 32 android:textColor="#1C90F3"
33 android:textStyle="bold" 33 android:textStyle="bold"
34 android:layout_gravity="end|center_vertical" 34 android:layout_gravity="end|center_vertical"
35 android:layout_marginEnd="24dp" 35 android:layout_marginEnd="24dp"
36 android:layout_width="wrap_content" 36 android:layout_width="wrap_content"
37 android:layout_height="wrap_content"/> 37 android:layout_height="wrap_content"/>
38 </androidx.appcompat.widget.Toolbar> 38 </androidx.appcompat.widget.Toolbar>
39 39
40 <androidx.core.widget.NestedScrollView 40 <androidx.core.widget.NestedScrollView
41 android:layout_width="match_parent" 41 android:layout_width="match_parent"
42 android:layout_height="match_parent"> 42 android:layout_height="match_parent">
43 <LinearLayout 43 <LinearLayout
44 android:orientation="vertical" 44 android:orientation="vertical"
45 android:paddingHorizontal="15dp" 45 android:paddingHorizontal="15dp"
46 android:paddingBottom="20dp" 46 android:paddingBottom="20dp"
47 android:layout_width="match_parent" 47 android:layout_width="match_parent"
48 android:layout_height="wrap_content"> 48 android:layout_height="wrap_content">
49 49
50 <LinearLayout 50 <LinearLayout
51 android:orientation="vertical" 51 android:orientation="vertical"
52 android:background="@drawable/shape_radius_10" 52 android:background="@drawable/shape_radius_10"
53 android:backgroundTint="@color/white" 53 android:backgroundTint="@color/white"
54 android:layout_marginTop="15dp" 54 android:layout_marginTop="15dp"
55 android:layout_width="match_parent" 55 android:layout_width="match_parent"
56 android:layout_height="wrap_content"> 56 android:layout_height="wrap_content">
57 <androidx.appcompat.widget.AppCompatTextView 57 <androidx.appcompat.widget.AppCompatTextView
58 android:text="学生信息" 58 android:text="学生信息"
59 android:textSize="16sp" 59 android:textSize="16sp"
60 android:textColor="#333" 60 android:textColor="#333"
61 android:textStyle="bold" 61 android:textStyle="bold"
62 android:gravity="center_vertical" 62 android:gravity="center_vertical"
63 android:paddingHorizontal="15dp" 63 android:paddingHorizontal="15dp"
64 android:drawablePadding="5dp" 64 android:drawablePadding="5dp"
65 android:drawableStart="@drawable/svg_ic_stu_info" 65 android:drawableStart="@drawable/svg_ic_stu_info"
66 android:background="@drawable/shape_radius_top_10" 66 android:background="@drawable/shape_radius_top_10"
67 android:backgroundTint="#DAEBFE" 67 android:backgroundTint="#DAEBFE"
68 android:layout_width="match_parent" 68 android:layout_width="match_parent"
69 android:layout_height="40dp"/> 69 android:layout_height="40dp"/>
70 <LinearLayout 70 <LinearLayout
71 android:orientation="horizontal" 71 android:orientation="horizontal"
72 android:layout_marginHorizontal="15dp" 72 android:layout_marginHorizontal="15dp"
73 android:layout_marginVertical="18dp" 73 android:layout_marginVertical="18dp"
74 android:layout_width="match_parent" 74 android:layout_width="match_parent"
75 android:layout_height="wrap_content"> 75 android:layout_height="wrap_content">
76 <TextView 76 <TextView
77 android:text="学生姓名:" 77 android:text="学生姓名:"
78 android:textSize="14sp" 78 android:textSize="14sp"
79 android:textColor="#333" 79 android:textColor="#333"
80 android:layout_width="wrap_content" 80 android:layout_width="wrap_content"
81 android:layout_height="wrap_content"/> 81 android:layout_height="wrap_content"/>
82 <TextView 82 <TextView
83 android:id="@+id/tvStuName" 83 android:id="@+id/tvStuName"
84 tools:text="杨小凯" 84 tools:text="杨小凯"
85 android:textSize="14sp" 85 android:textSize="14sp"
86 android:textColor="#333" 86 android:textColor="#333"
87 android:layout_width="wrap_content" 87 android:layout_width="wrap_content"
88 android:layout_height="wrap_content"/> 88 android:layout_height="wrap_content"/>
89 <Space style="@style/empty_space"/> 89 <Space style="@style/empty_space"/>
90 <TextView 90 <TextView
91 android:text="年级:" 91 android:text="年级:"
92 android:textSize="14sp" 92 android:textSize="14sp"
93 android:textColor="#333" 93 android:textColor="#333"
94 android:layout_width="wrap_content" 94 android:layout_width="wrap_content"
95 android:layout_height="wrap_content"/> 95 android:layout_height="wrap_content"/>
96 <TextView 96 <TextView
97 android:id="@+id/tvGrade" 97 android:id="@+id/tvGrade"
98 tools:text="六年级" 98 tools:text="六年级"
99 android:textSize="14sp" 99 android:textSize="14sp"
100 android:textColor="#333" 100 android:textColor="#333"
101 android:layout_width="96dp" 101 android:layout_width="96dp"
102 android:layout_height="wrap_content"/> 102 android:layout_height="wrap_content"/>
103 </LinearLayout> 103 </LinearLayout>
104 </LinearLayout> 104 </LinearLayout>
105 105
106 <LinearLayout 106 <LinearLayout
107 android:orientation="vertical" 107 android:orientation="vertical"
108 android:background="@drawable/shape_radius_10" 108 android:background="@drawable/shape_radius_10"
109 android:backgroundTint="@color/white" 109 android:backgroundTint="@color/white"
110 android:paddingBottom="15dp" 110 android:paddingBottom="15dp"
111 android:layout_marginTop="15dp" 111 android:layout_marginTop="15dp"
112 android:layout_width="match_parent" 112 android:layout_width="match_parent"
113 android:layout_height="wrap_content"> 113 android:layout_height="wrap_content">
114 <androidx.appcompat.widget.AppCompatTextView 114 <androidx.appcompat.widget.AppCompatTextView
115 android:text="作业详情" 115 android:text="作业详情"
116 android:textSize="16sp" 116 android:textSize="16sp"
117 android:textColor="#333" 117 android:textColor="#333"
118 android:textStyle="bold" 118 android:textStyle="bold"
119 android:gravity="center_vertical" 119 android:gravity="center_vertical"
120 android:paddingHorizontal="15dp" 120 android:paddingHorizontal="15dp"
121 android:drawablePadding="5dp" 121 android:drawablePadding="5dp"
122 android:drawableStart="@drawable/svg_ic_correct" 122 android:drawableStart="@drawable/svg_ic_correct"
123 android:background="@drawable/shape_radius_top_10" 123 android:background="@drawable/shape_radius_top_10"
124 android:backgroundTint="#DAEBFE" 124 android:backgroundTint="#DAEBFE"
125 android:layout_width="match_parent" 125 android:layout_width="match_parent"
126 android:layout_height="40dp"/> 126 android:layout_height="40dp"/>
127 <LinearLayout 127 <LinearLayout
128 android:orientation="horizontal" 128 android:orientation="horizontal"
129 android:layout_marginHorizontal="15dp" 129 android:layout_marginHorizontal="15dp"
130 android:layout_marginTop="15dp" 130 android:layout_marginTop="15dp"
131 android:layout_width="match_parent" 131 android:layout_width="match_parent"
132 android:layout_height="wrap_content"> 132 android:layout_height="wrap_content">
133 <TextView 133 <TextView
134 android:text="正确率:" 134 android:text="正确率:"
135 android:textSize="14sp" 135 android:textSize="14sp"
136 android:textColor="#333" 136 android:textColor="#333"
137 android:layout_width="wrap_content" 137 android:layout_width="wrap_content"
138 android:layout_height="wrap_content"/> 138 android:layout_height="wrap_content"/>
139 <TextView 139 <TextView
140 android:id="@+id/tvPercent" 140 android:id="@+id/tvPercent"
141 tools:text="60%" 141 tools:text="60%"
142 android:textSize="14sp" 142 android:textSize="14sp"
143 android:textColor="#333" 143 android:textColor="#333"
144 android:layout_width="wrap_content" 144 android:layout_width="wrap_content"
145 android:layout_height="wrap_content"/> 145 android:layout_height="wrap_content"/>
146 <Space style="@style/empty_space"/> 146 <Space style="@style/empty_space"/>
147 <TextView 147 <TextView
148 android:text="答题结果" 148 android:text="答题结果"
149 android:textSize="14sp" 149 android:textSize="14sp"
150 android:textColor="#333" 150 android:textColor="#333"
151 android:layout_width="wrap_content" 151 android:layout_width="wrap_content"
152 android:layout_height="wrap_content"/> 152 android:layout_height="wrap_content"/>
153 <TextView 153 <TextView
154 android:id="@+id/btnDetail" 154 android:id="@+id/btnDetail"
155 android:text="(点击查看题目详情)" 155 android:text="(点击查看题目详情)"
156 android:textSize="14sp" 156 android:textSize="14sp"
157 android:textColor="#1C90F3" 157 android:textColor="#1C90F3"
158 android:layout_width="wrap_content" 158 android:layout_width="wrap_content"
159 android:layout_height="wrap_content"/> 159 android:layout_height="wrap_content"/>
160 </LinearLayout> 160 </LinearLayout>
161 161
162 <androidx.recyclerview.widget.RecyclerView 162 <androidx.recyclerview.widget.RecyclerView
163 android:id="@+id/rvCorrect" 163 android:id="@+id/rvCorrect"
164 tools:listitem="@layout/item_feedback_num" 164 tools:listitem="@layout/item_feedback_num"
165 tools:itemCount="1" 165 tools:itemCount="1"
166 android:layout_marginTop="15dp" 166 android:layout_marginTop="15dp"
167 android:layout_marginHorizontal="15dp" 167 android:layout_marginHorizontal="15dp"
168 android:layout_width="match_parent" 168 android:layout_width="match_parent"
169 android:layout_height="wrap_content"/> 169 android:layout_height="wrap_content"/>
170 <TextView 170 <TextView
171 android:text="错题已经加入到错题本,到错题本查看详情" 171 android:text="错题已经加入到错题本,到错题本查看详情"
172 android:textSize="12sp" 172 android:textSize="12sp"
173 android:textColor="#666" 173 android:textColor="#666"
174 android:layout_marginHorizontal="15dp" 174 android:layout_marginHorizontal="15dp"
175 android:layout_width="wrap_content" 175 android:layout_width="wrap_content"
176 android:layout_height="wrap_content"/> 176 android:layout_height="wrap_content"/>
177 </LinearLayout> 177 </LinearLayout>
178 178
179 <LinearLayout 179 <LinearLayout
180 android:id="@+id/flEval" 180 android:id="@+id/flEval"
181 android:orientation="vertical" 181 android:orientation="vertical"
182 android:background="@drawable/shape_radius_10" 182 android:background="@drawable/shape_radius_10"
183 android:backgroundTint="@color/white" 183 android:backgroundTint="@color/white"
184 android:layout_marginTop="15dp" 184 android:layout_marginTop="15dp"
185 android:layout_width="match_parent" 185 android:layout_width="match_parent"
186 android:layout_height="wrap_content"> 186 android:layout_height="wrap_content">
187 <androidx.appcompat.widget.AppCompatTextView 187 <androidx.appcompat.widget.AppCompatTextView
188 android:text="辅导后错题掌握评估" 188 android:text="辅导后错题掌握评估"
189 android:textSize="16sp" 189 android:textSize="16sp"
190 android:textColor="#333" 190 android:textColor="#333"
191 android:textStyle="bold" 191 android:textStyle="bold"
192 android:gravity="center_vertical" 192 android:gravity="center_vertical"
193 android:paddingHorizontal="15dp" 193 android:paddingHorizontal="15dp"
194 android:drawablePadding="5dp" 194 android:drawablePadding="5dp"
195 android:drawableStart="@drawable/svg_ic_paper" 195 android:drawableStart="@drawable/svg_ic_paper"
196 android:background="@drawable/shape_radius_top_10" 196 android:background="@drawable/shape_radius_top_10"
197 android:backgroundTint="#DAEBFE" 197 android:backgroundTint="#DAEBFE"
198 android:layout_width="match_parent" 198 android:layout_width="match_parent"
199 android:layout_height="40dp"/> 199 android:layout_height="40dp"/>
200 <androidx.recyclerview.widget.RecyclerView 200 <androidx.recyclerview.widget.RecyclerView
201 android:id="@+id/rvError" 201 android:id="@+id/rvError"
202 android:orientation="vertical" 202 android:orientation="vertical"
203 app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" 203 app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
204 android:layout_width="match_parent" 204 android:layout_width="match_parent"
205 android:layout_height="wrap_content"/> 205 android:layout_height="wrap_content"/>
206 </LinearLayout> 206 </LinearLayout>
207 207
208 <LinearLayout 208 <LinearLayout
209 android:orientation="vertical" 209 android:orientation="vertical"
210 android:background="@drawable/shape_radius_10" 210 android:background="@drawable/shape_radius_10"
211 android:backgroundTint="@color/white" 211 android:backgroundTint="@color/white"
212 android:layout_marginTop="15dp" 212 android:layout_marginTop="15dp"
213 android:layout_width="match_parent" 213 android:layout_width="match_parent"
214 android:layout_height="wrap_content"> 214 android:layout_height="wrap_content">
215 <androidx.appcompat.widget.AppCompatTextView 215 <androidx.appcompat.widget.AppCompatTextView
216 android:text="教师评语" 216 android:text="教师评语"
217 android:textSize="16sp" 217 android:textSize="16sp"
218 android:textColor="#333" 218 android:textColor="#333"
219 android:textStyle="bold" 219 android:textStyle="bold"
220 android:gravity="center_vertical" 220 android:gravity="center_vertical"
221 android:paddingHorizontal="15dp" 221 android:paddingHorizontal="15dp"
222 android:drawablePadding="5dp" 222 android:drawablePadding="5dp"
223 android:drawableStart="@drawable/svg_ic_comment" 223 android:drawableStart="@drawable/svg_ic_comment"
224 android:background="@drawable/shape_radius_top_10" 224 android:background="@drawable/shape_radius_top_10"
225 android:backgroundTint="#DAEBFE" 225 android:backgroundTint="#DAEBFE"
226 android:layout_width="match_parent" 226 android:layout_width="match_parent"
227 android:layout_height="40dp"/> 227 android:layout_height="40dp"/>
228 <EditText 228 <EditText
229 android:id="@+id/etComment" 229 android:id="@+id/etComment"
230 android:hint="非必填" 230 android:hint="非必填, 不超过300字"
231 android:maxLength="300"
231 android:textSize="13sp" 232 android:textSize="13sp"
232 android:textColor="#333" 233 android:textColor="#333"
233 android:textColorHint="#999" 234 android:textColorHint="#999"
234 android:gravity="start" 235 android:gravity="start"
235 android:background="@null" 236 android:background="@null"
236 android:layout_margin="14dp" 237 android:layout_margin="14dp"
237 android:layout_width="match_parent" 238 android:layout_width="match_parent"
238 android:layout_height="wrap_content" 239 android:layout_height="wrap_content"
239 tools:ignore="Autofill,LabelFor,TextFields" /> 240 tools:ignore="Autofill,LabelFor,TextFields" />
240 </LinearLayout> 241 </LinearLayout>
241 242
242 243
243 </LinearLayout> 244 </LinearLayout>
244 </androidx.core.widget.NestedScrollView> 245 </androidx.core.widget.NestedScrollView>
245 </LinearLayout> 246 </LinearLayout>