Compare View
Commits (2)
Showing
23 changed files
Show diff stats
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; | ||
23 | import com.prws.common.bean.homework.CorrectionPoint; | 22 | import com.prws.common.bean.homework.CorrectionPoint; |
24 | import com.prws.common.bean.homework.CorrectionSer; | 23 | import com.prws.common.bean.homework.CorrectionSer; |
25 | import com.prws.common.bean.homework.HomeWork; | 24 | import com.prws.common.bean.homework.HomeWork; |
26 | import com.prws.common.bean.homework.HomeworkList; | 25 | import com.prws.common.bean.homework.HomeworkList; |
27 | import com.prws.common.bean.homework.KeyValue; | 26 | import com.prws.common.bean.homework.KeyValue; |
28 | import com.prws.common.net.NetWorks; | 27 | import com.prws.common.net.NetWorks; |
29 | 28 | ||
30 | import java.text.DecimalFormat; | 29 | import java.text.DecimalFormat; |
31 | import java.text.SimpleDateFormat; | 30 | import java.text.SimpleDateFormat; |
32 | import java.util.ArrayList; | 31 | import java.util.ArrayList; |
33 | import java.util.HashMap; | 32 | import java.util.HashMap; |
34 | import java.util.HashSet; | 33 | import java.util.HashSet; |
35 | import java.util.List; | 34 | import java.util.List; |
36 | import java.util.Locale; | 35 | import java.util.Locale; |
37 | import java.util.Map; | 36 | import java.util.Map; |
38 | import java.util.Set; | 37 | import java.util.Set; |
39 | 38 | ||
40 | public class HomeworkFeedbackActivity extends BaseRxActivity<ActivityHomeworkFeedbackBinding> { | 39 | public class HomeworkFeedbackActivity extends BaseRxActivity<ActivityHomeworkFeedbackBinding> { |
41 | private Student student; | 40 | private Student student; |
42 | private HomeworkList mData; | 41 | private HomeworkList mData; |
43 | private ArrayList<HomeWork> mList; | 42 | private ArrayList<HomeWork> mList; |
44 | private List<Correction> corrections = new ArrayList<>(); | 43 | private List<CorrectionSer> corrections = new ArrayList<>(); |
45 | 44 | ||
46 | @SuppressWarnings("unchecked") | 45 | @SuppressWarnings("unchecked") |
47 | @Override | 46 | @Override |
48 | public void initView(Bundle savedInstanceState) { | 47 | public void initView(Bundle savedInstanceState) { |
49 | binding.toolbar.setNavigationOnClickListener(v -> onBackPressed()); | 48 | binding.toolbar.setNavigationOnClickListener(v -> onBackPressed()); |
50 | student = (Student) getIntent().getSerializableExtra("student"); | 49 | student = (Student) getIntent().getSerializableExtra("student"); |
51 | mData = (HomeworkList) getIntent().getSerializableExtra("data"); | 50 | mData = (HomeworkList) getIntent().getSerializableExtra("data"); |
52 | mList = (ArrayList<HomeWork>) getIntent().getSerializableExtra("list"); | 51 | mList = (ArrayList<HomeWork>) getIntent().getSerializableExtra("list"); |
53 | 52 | ||
54 | binding.tvStuName.setText(student.stuName); | 53 | binding.tvStuName.setText(student.stuName); |
55 | binding.tvGrade.setText(student.grade); | 54 | binding.tvGrade.setText(student.grade); |
56 | 55 | ||
56 | List<HomeWork> correctList = new ArrayList<>(); | ||
57 | List<HomeWork> errorList = new ArrayList<>(); | 57 | List<HomeWork> errorList = new ArrayList<>(); |
58 | int correctNo = 0; | 58 | List<HomeWork> blankList = new ArrayList<>(); |
59 | int correctNo = 0, blankNo = 0; | ||
59 | for (HomeWork homeWork: mList) { | 60 | for (HomeWork homeWork: mList) { |
60 | homeWork.state = 1; | 61 | homeWork.state = 1; |
61 | homeWork.index = mList.indexOf(homeWork); | 62 | homeWork.index = mList.indexOf(homeWork); |
62 | corrections.add(new Correction(homeWork.brief, homeWork.check ? 1 : 0)); | 63 | corrections.add(homeWork.toSer()); |
63 | if (!homeWork.check) correctNo ++; | 64 | if (homeWork.correction == 0) { |
64 | else errorList.add(homeWork); | 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 | binding.rvCorrect.setLayoutManager(new FlexboxLayoutManager(this)); | 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 | binding.rvCorrect.setAdapter(numberAdapter); | 87 | binding.rvCorrect.setAdapter(numberAdapter); |
88 | binding.rvBlank.setAdapter(blankAdapter); | ||
89 | |||
71 | binding.rvError.setVisibility(errorList.isEmpty() ? View.GONE : View.VISIBLE); | 90 | binding.rvError.setVisibility(errorList.isEmpty() ? View.GONE : View.VISIBLE); |
72 | binding.rvError.setAdapter(new EvalAdapter(errorList)); | 91 | binding.rvError.setAdapter(new EvalAdapter(errorList)); |
73 | if (errorList.isEmpty()) { | 92 | if (errorList.isEmpty()) { |
74 | binding.flEval.setVisibility(View.GONE); | 93 | binding.flEval.setVisibility(View.GONE); |
75 | } | 94 | } |
76 | 95 | ||
77 | binding.btnDetail.setOnClickListener(v -> { | 96 | binding.btnDetail.setOnClickListener(v -> { |
78 | viewTopicDetail(0); | 97 | viewTopicDetail(0); |
79 | }); | 98 | }); |
99 | binding.btnDetail2.setOnClickListener(v -> { | ||
100 | viewTopicDetail(0); | ||
101 | }); | ||
80 | numberAdapter.setOnItemClickListener((baseQuickAdapter, view, i) -> { | 102 | numberAdapter.setOnItemClickListener((baseQuickAdapter, view, i) -> { |
81 | viewTopicDetail(i); | 103 | viewTopicDetail(i); |
82 | }); | 104 | }); |
105 | blankAdapter.setOnItemClickListener((baseQuickAdapter, view, i) -> { | ||
106 | viewTopicDetail(i); | ||
107 | }); | ||
83 | binding.btnPublish.setOnClickListener(v -> submit()); | 108 | binding.btnPublish.setOnClickListener(v -> submit()); |
84 | } | 109 | } |
85 | 110 | ||
86 | private void viewTopicDetail(int position) { | 111 | private void viewTopicDetail(int position) { |
87 | Intent intent = new Intent(this, HomeworkTopicActivity.class); | 112 | Intent intent = new Intent(this, HomeworkTopicActivity.class); |
88 | intent.putExtra("list", mList); | 113 | intent.putExtra("list", mList); |
89 | intent.putExtra("position", position); | 114 | intent.putExtra("position", position); |
90 | startActivity(intent); | 115 | startActivity(intent); |
91 | } | 116 | } |
92 | 117 | ||
93 | @SuppressLint("CheckResult") | 118 | @SuppressLint("CheckResult") |
94 | private void submit() { | 119 | private void submit() { |
95 | Map<String, Object> body = new HashMap<>(); | 120 | Map<String, Object> body = new HashMap<>(); |
96 | body.put("homeworkId", mData.getId()); | 121 | body.put("homeworkId", mData.getId()); |
97 | body.put("comment", binding.etComment.getText().toString()); | 122 | body.put("comment", binding.etComment.getText().toString()); |
98 | body.put("stuId", student.stuId); | 123 | body.put("stuId", student.stuId); |
99 | body.put("points", countPoint()); | 124 | body.put("points", countPoint()); |
100 | body.put("correctionList", corrections); | 125 | body.put("correctionList", corrections); |
101 | body.put("extra", buildExtra()); | 126 | body.put("extra", buildExtra()); |
102 | NetWorks.service_url.uploadHomeworkFeedback(NetWorks.getHeader(), body) | 127 | NetWorks.service_url.uploadHomeworkFeedback(NetWorks.getHeader(), body) |
103 | .compose(transformSingle()) | 128 | .compose(transformSingle()) |
104 | .subscribe((response, th) -> { | 129 | .subscribe((response, th) -> { |
105 | if (th != null) th.printStackTrace(); | 130 | if (th != null) th.printStackTrace(); |
106 | if (response != null && response.getSuccess()) { | 131 | if (response != null && response.getSuccess()) { |
107 | Toast.makeText(this, "反馈成功", Toast.LENGTH_SHORT).show(); | 132 | Toast.makeText(this, "反馈成功", Toast.LENGTH_SHORT).show(); |
108 | 133 | ||
109 | Intent intent = new Intent(this, HomeworkShareActivity.class); | 134 | Intent intent = new Intent(this, HomeworkShareActivity.class); |
110 | intent.putExtra("student", student); | 135 | intent.putExtra("student", student); |
111 | intent.putExtra("id", mData.getId()); | 136 | intent.putExtra("id", mData.getId()); |
112 | intent.putExtra("grade", mData.getGrade()); | 137 | intent.putExtra("grade", mData.getGrade()); |
113 | intent.putExtra("subject", mData.getSubject()); | 138 | intent.putExtra("subject", mData.getSubject()); |
114 | String name = new SimpleDateFormat("yyyy年M月d日作业", Locale.CHINA).format(mData.uploadTime); | 139 | String name = new SimpleDateFormat("yyyy年M月d日作业", Locale.CHINA).format(mData.uploadTime); |
115 | intent.putExtra("name", name); | 140 | intent.putExtra("name", name); |
116 | startActivity(intent); | 141 | startActivity(intent); |
117 | 142 | ||
118 | setResult(RESULT_OK); | 143 | setResult(RESULT_OK); |
119 | finish(); | 144 | finish(); |
120 | } else { | 145 | } else { |
121 | Toast.makeText(this, "反馈失败", Toast.LENGTH_SHORT).show(); | 146 | Toast.makeText(this, "反馈失败", Toast.LENGTH_SHORT).show(); |
122 | } | 147 | } |
123 | }); | 148 | }); |
124 | } | 149 | } |
125 | 150 | ||
126 | private String buildExtra() { | 151 | private String buildExtra() { |
127 | if (mList == null || mList.isEmpty()) return null; | 152 | if (mList == null || mList.isEmpty()) return null; |
128 | List<CorrectionSer> maps = new ArrayList<>(); | 153 | List<CorrectionSer> maps = new ArrayList<>(); |
129 | for (HomeWork item: mList) { | 154 | for (HomeWork item: mList) { |
130 | maps.add(item.toSer()); | 155 | maps.add(item.toSer()); |
131 | } | 156 | } |
132 | Gson gson = new Gson(); | 157 | Gson gson = new Gson(); |
133 | return gson.toJson(maps); | 158 | return gson.toJson(maps); |
134 | } | 159 | } |
135 | 160 | ||
136 | @SuppressLint("CheckResult") | 161 | @SuppressLint("CheckResult") |
137 | private List<CorrectionPoint> countPoint() { | 162 | private List<CorrectionPoint> countPoint() { |
138 | Set<KeyValue> set = new HashSet<>(); | 163 | Set<KeyValue> set = new HashSet<>(); |
139 | Map<String, Integer> totalTimes = new HashMap<>(); | 164 | Map<String, Integer> totalTimes = new HashMap<>(); |
140 | Map<String, Integer> correctTimes = new HashMap<>(); | 165 | Map<String, Integer> correctTimes = new HashMap<>(); |
141 | Map<String, Integer> underTimes = new HashMap<>(); | 166 | Map<String, Integer> underTimes = new HashMap<>(); |
142 | Map<String, Integer> baseTimes = new HashMap<>(); | 167 | Map<String, Integer> baseTimes = new HashMap<>(); |
143 | Map<String, Integer> normalTimes = new HashMap<>(); | 168 | Map<String, Integer> normalTimes = new HashMap<>(); |
144 | Gson gson = new Gson(); | 169 | Gson gson = new Gson(); |
145 | for (HomeWork homeWork: mList) { | 170 | for (HomeWork homeWork: mList) { |
146 | homeWork.formatPoints(gson); | 171 | homeWork.formatPoints(gson); |
147 | 172 | ||
148 | set.addAll(homeWork.pointsObj); | 173 | set.addAll(homeWork.pointsObj); |
149 | for (KeyValue keyValue: homeWork.pointsObj) { | 174 | for (KeyValue keyValue: homeWork.pointsObj) { |
150 | String key = keyValue.Key; | 175 | String key = keyValue.Key; |
151 | if (totalTimes.containsKey(key)) { | 176 | if (totalTimes.containsKey(key)) { |
152 | totalTimes.put(key, totalTimes.get(key) + 1); | 177 | totalTimes.put(key, totalTimes.get(key) + 1); |
153 | } else { | 178 | } else { |
154 | totalTimes.put(key, 1); | 179 | totalTimes.put(key, 1); |
155 | } | 180 | } |
156 | if (!homeWork.check) { | 181 | if (homeWork.correction == 0) { |
157 | if (correctTimes.containsKey(key)) { | 182 | if (correctTimes.containsKey(key)) { |
158 | correctTimes.put(key, correctTimes.get(key) + 1); | 183 | correctTimes.put(key, correctTimes.get(key) + 1); |
159 | } else { | 184 | } else { |
160 | correctTimes.put(key, 1); | 185 | correctTimes.put(key, 1); |
161 | } | 186 | } |
162 | } else if (homeWork.state == 1) { | 187 | } else if (homeWork.correction == 1) { |
163 | if (underTimes.containsKey(key)) { | 188 | if (homeWork.state == 1) { |
164 | underTimes.put(key, underTimes.get(key) + 1); | 189 | if (underTimes.containsKey(key)) { |
165 | } else { | 190 | underTimes.put(key, underTimes.get(key) + 1); |
166 | underTimes.put(key, 1); | 191 | } else { |
167 | } | 192 | underTimes.put(key, 1); |
168 | } else if (homeWork.state == 2) { | 193 | } |
169 | if (baseTimes.containsKey(key)) { | 194 | } else if (homeWork.state == 2) { |
170 | baseTimes.put(key, baseTimes.get(key) + 1); | 195 | if (baseTimes.containsKey(key)) { |
171 | } else { | 196 | baseTimes.put(key, baseTimes.get(key) + 1); |
172 | baseTimes.put(key, 1); | 197 | } else { |
173 | } | 198 | baseTimes.put(key, 1); |
174 | } else if (homeWork.state == 3) { | 199 | } |
175 | if (normalTimes.containsKey(key)) { | 200 | } else if (homeWork.state == 3) { |
176 | normalTimes.put(key, normalTimes.get(key) + 1); | 201 | if (normalTimes.containsKey(key)) { |
177 | } else { | 202 | normalTimes.put(key, normalTimes.get(key) + 1); |
178 | normalTimes.put(key, 1); | 203 | } else { |
204 | normalTimes.put(key, 1); | ||
205 | } | ||
179 | } | 206 | } |
180 | } | 207 | } |
181 | } | 208 | } |
182 | } | 209 | } |
183 | List<CorrectionPoint> points = new ArrayList<>(); | 210 | List<CorrectionPoint> points = new ArrayList<>(); |
184 | for (KeyValue obj: set) { | 211 | for (KeyValue obj: set) { |
185 | CorrectionPoint point = new CorrectionPoint(); | 212 | CorrectionPoint point = new CorrectionPoint(); |
186 | point.pointId = obj.Key; | 213 | point.pointId = obj.Key; |
187 | point.pointName = obj.Value; | 214 | point.pointName = obj.Value; |
188 | point.totalCount = ifNull(totalTimes.get(obj.Key), 1); | 215 | point.totalCount = ifNull(totalTimes.get(obj.Key), 1); |
189 | point.correctCount = ifNull(correctTimes.get(obj.Key), 0); | 216 | point.correctCount = ifNull(correctTimes.get(obj.Key), 0); |
190 | point.understandCount = ifNull(underTimes.get(obj.Key), 0); | 217 | point.understandCount = ifNull(underTimes.get(obj.Key), 0); |
191 | point.basicCount = ifNull(baseTimes.get(obj.Key), 0); | 218 | point.basicCount = ifNull(baseTimes.get(obj.Key), 0); |
192 | point.normalCount = ifNull(normalTimes.get(obj.Key), 0); | 219 | point.normalCount = ifNull(normalTimes.get(obj.Key), 0); |
193 | 220 | ||
194 | points.add(point); | 221 | points.add(point); |
195 | } | 222 | } |
196 | 223 | ||
197 | return points; | 224 | return points; |
198 | } | 225 | } |
199 | 226 | ||
200 | private int ifNull(Integer src, int defaultVal) { | 227 | private int ifNull(Integer src, int defaultVal) { |
201 | if (src == null) return defaultVal; | 228 | if (src == null) return defaultVal; |
202 | else return src; | 229 | else return src; |
203 | } | 230 | } |
204 | 231 | ||
205 | 232 | ||
206 | @Override | 233 | @Override |
207 | protected ActivityHomeworkFeedbackBinding getViewBinding() { | 234 | protected ActivityHomeworkFeedbackBinding getViewBinding() { |
208 | return ActivityHomeworkFeedbackBinding.inflate(getLayoutInflater()); | 235 | return ActivityHomeworkFeedbackBinding.inflate(getLayoutInflater()); |
209 | } | 236 | } |
210 | 237 | ||
211 | static class NumberAdapter extends BaseQuickAdapter<HomeWork, BaseViewHolder> { | 238 | static class NumberAdapter extends BaseQuickAdapter<HomeWork, BaseViewHolder> { |
212 | 239 | ||
213 | public NumberAdapter(List<HomeWork> list) { | 240 | public NumberAdapter(List<HomeWork> list) { |
214 | super(R.layout.item_feedback_num, list); | 241 | super(R.layout.item_feedback_num, list); |
215 | } | 242 | } |
216 | 243 | ||
217 | @Override | 244 | @Override |
218 | protected void convert(@NonNull BaseViewHolder holder, HomeWork homeWork) { | 245 | protected void convert(@NonNull BaseViewHolder holder, HomeWork homeWork) { |
219 | int position = getData().indexOf(homeWork); | 246 | int position = getData().indexOf(homeWork); |
220 | holder.setText(R.id.tvNum, String.valueOf(position + 1)); | 247 | holder.setText(R.id.tvNum, String.valueOf(position + 1)); |
221 | if (homeWork.check) { | 248 | if (homeWork.correction == 1) { |
222 | holder.setImageResource(R.id.ivType, R.drawable.ic_wrong_small); | 249 | holder.setImageResource(R.id.ivType, R.drawable.ic_wrong_small); |
223 | } else { | 250 | } else if (homeWork.correction == 0){ |
224 | holder.setImageResource(R.id.ivType, R.drawable.ic_correct_small); | 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 | } |
228 | 257 | ||
229 | static class EvalAdapter extends BaseQuickAdapter<HomeWork, BaseViewHolder> { | 258 | static class EvalAdapter extends BaseQuickAdapter<HomeWork, BaseViewHolder> { |
230 | 259 | ||
231 | public EvalAdapter(@Nullable List<HomeWork> data) { | 260 | public EvalAdapter(@Nullable List<HomeWork> data) { |
232 | super(R.layout.item_homework_eval, data); | 261 | super(R.layout.item_homework_eval, data); |
233 | } | 262 | } |
234 | 263 | ||
235 | @Override | 264 | @Override |
236 | protected void convert(@NonNull BaseViewHolder holder, HomeWork homeWork) { | 265 | protected void convert(@NonNull BaseViewHolder holder, HomeWork homeWork) { |
237 | holder.itemView.setClipToOutline(true); | 266 | holder.itemView.setClipToOutline(true); |
238 | holder.setText(R.id.tvNo, "题目" + (homeWork.index + 1)); | 267 | holder.setText(R.id.tvNo, "题目" + (homeWork.index + 1)); |
239 | ImageView iv = holder.getView(R.id.ivTopic); | 268 | ImageView iv = holder.getView(R.id.ivTopic); |
240 | Glide.with(mContext).load(homeWork.url).into(iv); | 269 | Glide.with(mContext).load(homeWork.url).into(iv); |
241 | 270 | ||
242 | RadioButton chk1 = holder.getView(R.id.chk1); | 271 | RadioButton chk1 = holder.getView(R.id.chk1); |
243 | RadioButton chk2 = holder.getView(R.id.chk2); | 272 | RadioButton chk2 = holder.getView(R.id.chk2); |
244 | RadioButton chk3 = holder.getView(R.id.chk3); | 273 | RadioButton chk3 = holder.getView(R.id.chk3); |
245 | chk1.setOnCheckedChangeListener((v, b) -> { | 274 | chk1.setOnCheckedChangeListener((v, b) -> { |
246 | if (b) { | 275 | if (b) { |
247 | homeWork.state = 1; | 276 | homeWork.state = 1; |
248 | } | 277 | } |
249 | }); | 278 | }); |
250 | chk2.setOnCheckedChangeListener((v, b) -> { | 279 | chk2.setOnCheckedChangeListener((v, b) -> { |
251 | if (b) { | 280 | if (b) { |
252 | homeWork.state = 2; | 281 | homeWork.state = 2; |
253 | } | 282 | } |
254 | }); | 283 | }); |
255 | chk3.setOnCheckedChangeListener((v, b) -> { | 284 | chk3.setOnCheckedChangeListener((v, b) -> { |
256 | if (b) { | 285 | if (b) { |
257 | homeWork.state = 3; | 286 | homeWork.state = 3; |
258 | } | 287 | } |
259 | }); | 288 | }); |
260 | chk1.setChecked(homeWork.state == 1); | 289 | chk1.setChecked(homeWork.state == 1); |
261 | chk2.setChecked(homeWork.state == 2); | 290 | chk2.setChecked(homeWork.state == 2); |
262 | chk3.setChecked(homeWork.state == 3); | 291 | chk3.setChecked(homeWork.state == 3); |
263 | } | 292 | } |
264 | } | 293 | } |
265 | } | 294 | } |
app/src/main/java/com/hjx/parent/HomeworkSelectActivity.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.content.res.ColorStateList; | 5 | import android.content.res.ColorStateList; |
6 | import android.graphics.drawable.Drawable; | ||
7 | import android.os.Bundle; | 6 | import android.os.Bundle; |
8 | import android.view.View; | 7 | import android.view.View; |
9 | import android.widget.CheckBox; | ||
10 | import android.widget.ImageView; | 8 | import android.widget.ImageView; |
9 | import android.widget.RadioGroup; | ||
11 | import android.widget.TextView; | 10 | import android.widget.TextView; |
12 | 11 | ||
13 | import androidx.annotation.DrawableRes; | ||
14 | import androidx.annotation.NonNull; | 12 | import androidx.annotation.NonNull; |
15 | import androidx.annotation.Nullable; | 13 | import androidx.annotation.Nullable; |
16 | import androidx.core.content.res.ResourcesCompat; | ||
17 | import androidx.lifecycle.MutableLiveData; | ||
18 | 14 | ||
19 | import com.bumptech.glide.Glide; | 15 | import com.bumptech.glide.Glide; |
20 | import com.chad.library.adapter.base.BaseQuickAdapter; | 16 | import com.chad.library.adapter.base.BaseQuickAdapter; |
21 | import com.chad.library.adapter.base.BaseViewHolder; | 17 | import com.chad.library.adapter.base.BaseViewHolder; |
22 | import com.hjx.parent.databinding.ActivityHomeworkSelectBinding; | 18 | import com.hjx.parent.databinding.ActivityHomeworkSelectBinding; |
23 | import com.hjx.parent.function.Function1; | 19 | import com.hjx.parent.function.Function0; |
24 | import com.hjx.parent.rx.BaseRxActivity; | 20 | import com.hjx.parent.rx.BaseRxActivity; |
25 | import com.prws.common.bean.Student; | 21 | import com.prws.common.bean.Student; |
26 | import com.prws.common.bean.homework.HomeWork; | 22 | import com.prws.common.bean.homework.HomeWork; |
27 | import com.prws.common.bean.homework.HomeworkList; | 23 | import com.prws.common.bean.homework.HomeworkList; |
28 | 24 | ||
29 | import java.util.ArrayList; | 25 | import java.util.ArrayList; |
30 | 26 | ||
31 | public class HomeworkSelectActivity extends BaseRxActivity<ActivityHomeworkSelectBinding> { | 27 | public class HomeworkSelectActivity extends BaseRxActivity<ActivityHomeworkSelectBinding> { |
32 | 28 | ||
33 | private Student student; | 29 | private Student student; |
34 | private HomeworkList mData; | 30 | private HomeworkList mData; |
35 | private ArrayList<HomeWork> mList; | 31 | private ArrayList<HomeWork> mList; |
36 | private Adapter mAdapter = new Adapter(); | 32 | private Adapter mAdapter = new Adapter(); |
37 | 33 | ||
38 | MutableLiveData<Integer> selectNum = new MutableLiveData<>(0); | ||
39 | |||
40 | @SuppressLint("NotifyDataSetChanged") | 34 | @SuppressLint("NotifyDataSetChanged") |
41 | @SuppressWarnings("unchecked,ConstantConditions") | 35 | @SuppressWarnings("unchecked,ConstantConditions") |
42 | @Override | 36 | @Override |
43 | public void initView(Bundle savedInstanceState) { | 37 | public void initView(Bundle savedInstanceState) { |
44 | binding.toolbar.setNavigationOnClickListener(v -> onBackPressed()); | 38 | binding.toolbar.setNavigationOnClickListener(v -> onBackPressed()); |
45 | student = (Student) getIntent().getSerializableExtra("student"); | 39 | student = (Student) getIntent().getSerializableExtra("student"); |
46 | mData = (HomeworkList) getIntent().getSerializableExtra("data"); | 40 | mData = (HomeworkList) getIntent().getSerializableExtra("data"); |
47 | mList = (ArrayList<HomeWork>) getIntent().getSerializableExtra("list"); | 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 | mAdapter.setNewData(mList); | 47 | mAdapter.setNewData(mList); |
50 | binding.recyclerView.setAdapter(mAdapter); | 48 | binding.recyclerView.setAdapter(mAdapter); |
51 | 49 | ||
52 | mAdapter.selectCall = i -> selectNum.setValue(selectNum.getValue() + i); | 50 | mAdapter.selectCall = () -> { |
53 | selectNum.observe(this, i -> { | 51 | int right = 0, error = 0, blank = 0; |
54 | binding.tvNumber.setText(String.valueOf(i)); | 52 | for (HomeWork homeWork: mList) { |
55 | if (i == 0) { | 53 | if (homeWork.correction == 0) right ++; |
56 | binding.btnConfirm.setText("作业全对"); | 54 | else if (homeWork.correction == 1) error ++; |
57 | binding.btnConfirm.setBackgroundTintList(ColorStateList.valueOf(0xFF4ABC78)); | 55 | else if (homeWork.correction == 2) blank ++; |
58 | } else { | ||
59 | binding.btnConfirm.setText("下一步"); | ||
60 | binding.btnConfirm.setBackgroundTintList(ColorStateList.valueOf(0xFF1C90F3)); | ||
61 | } | 56 | } |
62 | binding.chkAll.setChecked(i == mList.size() && i != 0); | 57 | binding.tvNumber.setText(String.valueOf(error)); |
63 | }); | 58 | binding.tvBlankNumber.setText(String.valueOf(blank)); |
64 | 59 | // if (right == mList.size()) { | |
65 | binding.chkAll.setOnClickListener(v -> { | 60 | // binding.btnConfirm.setText("作业全对"); |
66 | if (mList.size() == 0) return; | 61 | // binding.btnConfirm.setBackgroundTintList(ColorStateList.valueOf(0xFF4ABC78)); |
67 | boolean b = binding.chkAll.isChecked(); | 62 | // } else { |
68 | for (HomeWork item: mList) { | 63 | // binding.btnConfirm.setText("下一步"); |
69 | item.check = b; | 64 | // binding.btnConfirm.setBackgroundTintList(ColorStateList.valueOf(0xFF1C90F3)); |
70 | } | 65 | // } |
71 | selectNum.setValue(b ? mList.size() : 0); | 66 | }; |
72 | mAdapter.notifyDataSetChanged(); | ||
73 | }); | ||
74 | 67 | ||
75 | binding.btnConfirm.setOnClickListener(v -> { | 68 | binding.btnConfirm.setOnClickListener(v -> { |
76 | Intent intent = new Intent(this, HomeworkFeedbackActivity.class); | 69 | Intent intent = new Intent(this, HomeworkFeedbackActivity.class); |
77 | intent.putExtra("data", mData); | 70 | intent.putExtra("data", mData); |
78 | intent.putExtra("list", mList); | 71 | intent.putExtra("list", mList); |
79 | intent.putExtra("student", student); | 72 | intent.putExtra("student", student); |
80 | startActivityForResult(intent, 0xA01); | 73 | startActivityForResult(intent, 0xA01); |
81 | }); | 74 | }); |
82 | } | 75 | } |
83 | 76 | ||
84 | @Override | 77 | @Override |
85 | protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) { | 78 | protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) { |
86 | super.onActivityResult(requestCode, resultCode, data); | 79 | super.onActivityResult(requestCode, resultCode, data); |
87 | if (requestCode == 0xA01 && resultCode == RESULT_OK) { | 80 | if (requestCode == 0xA01 && resultCode == RESULT_OK) { |
88 | setResult(RESULT_OK); | 81 | setResult(RESULT_OK); |
89 | finish(); | 82 | finish(); |
90 | } | 83 | } |
91 | } | 84 | } |
92 | 85 | ||
93 | @Override | 86 | @Override |
94 | protected ActivityHomeworkSelectBinding getViewBinding() { | 87 | protected ActivityHomeworkSelectBinding getViewBinding() { |
95 | return ActivityHomeworkSelectBinding.inflate(getLayoutInflater()); | 88 | return ActivityHomeworkSelectBinding.inflate(getLayoutInflater()); |
96 | } | 89 | } |
97 | 90 | ||
98 | 91 | ||
99 | static class Adapter extends BaseQuickAdapter<HomeWork, BaseViewHolder> { | 92 | static class Adapter extends BaseQuickAdapter<HomeWork, BaseViewHolder> { |
100 | public Adapter() { | 93 | public Adapter() { |
101 | super(R.layout.item_homework_detail); | 94 | super(R.layout.item_homework_detail); |
102 | } | 95 | } |
103 | public Function1<Integer> selectCall; | 96 | public Function0 selectCall; |
104 | 97 | ||
105 | @SuppressLint("SetTextI18n") | 98 | @SuppressLint("SetTextI18n") |
106 | @Override | 99 | @Override |
107 | protected void convert(@NonNull BaseViewHolder holder, HomeWork homeWork) { | 100 | protected void convert(@NonNull BaseViewHolder holder, HomeWork homeWork) { |
108 | TextView tvNumber = holder.getView(R.id.tvNumber); | 101 | TextView tvNumber = holder.getView(R.id.tvNumber); |
109 | ImageView imageView = holder.getView(R.id.ivTopic); | 102 | ImageView imageView = holder.getView(R.id.ivTopic); |
110 | int number = getData().indexOf(homeWork) + 1; | 103 | int number = getData().indexOf(homeWork) + 1; |
111 | tvNumber.setText("第" + number + "题"); | 104 | tvNumber.setText("第" + number + "题"); |
112 | Glide.with(mContext).load(homeWork.url).into(imageView); | 105 | Glide.with(mContext).load(homeWork.url).into(imageView); |
113 | 106 | ||
114 | if (homeWork.check) { | 107 | setBackground(homeWork, holder); |
115 | holder.itemView.setForeground(getDrawable(R.drawable.border_radius_10_red)); | 108 | RadioGroup radioGroup = holder.getView(R.id.radioGroup); |
116 | } else { | 109 | radioGroup.setVisibility(View.VISIBLE); |
117 | holder.itemView.setForeground(null); | 110 | |
118 | } | 111 | radioGroup.setOnCheckedChangeListener((group, checkedId) -> { |
119 | CheckBox checkBox = holder.getView(R.id.checkbox); | 112 | if (checkedId == R.id.rbRight) homeWork.correction = 0; |
120 | checkBox.setVisibility(View.VISIBLE); | 113 | else if (checkedId == R.id.rbError) homeWork.correction = 1; |
121 | checkBox.setOnCheckedChangeListener(null); | 114 | else if (checkedId == R.id.rbBlank) homeWork.correction = 2; |
122 | checkBox.setChecked(homeWork.check); | 115 | setBackground(homeWork, holder); |
123 | 116 | selectCall.invoke(); | |
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 | } | ||
135 | }); | 117 | }); |
136 | } | 118 | } |
137 | 119 | ||
138 | private Drawable getDrawable(@DrawableRes int res) { | 120 | private void setBackground(HomeWork homeWork, BaseViewHolder helper) { |
app/src/main/java/com/hjx/parent/HomeworkTopicActivity.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.res.ColorStateList; | 4 | import android.content.res.ColorStateList; |
5 | import android.os.Bundle; | 5 | import android.os.Bundle; |
6 | import android.view.View; | 6 | import android.view.View; |
7 | import android.widget.TextView; | 7 | import android.widget.TextView; |
8 | 8 | ||
9 | import androidx.annotation.NonNull; | 9 | import androidx.annotation.NonNull; |
10 | import androidx.annotation.Nullable; | 10 | import androidx.annotation.Nullable; |
11 | 11 | ||
12 | import com.bumptech.glide.Glide; | 12 | import com.bumptech.glide.Glide; |
13 | import com.chad.library.adapter.base.BaseQuickAdapter; | 13 | import com.chad.library.adapter.base.BaseQuickAdapter; |
14 | import com.chad.library.adapter.base.BaseViewHolder; | 14 | import com.chad.library.adapter.base.BaseViewHolder; |
15 | import com.google.gson.Gson; | 15 | import com.google.gson.Gson; |
16 | import com.hjx.parent.databinding.ActivityTopicDetailBinding; | 16 | import com.hjx.parent.databinding.ActivityTopicDetailBinding; |
17 | import com.hjx.parent.dialog.PhotoViewDialog; | 17 | import com.hjx.parent.dialog.PhotoViewDialog; |
18 | import com.hjx.parent.rx.BaseRxActivity; | 18 | import com.hjx.parent.rx.BaseRxActivity; |
19 | import com.prws.common.bean.homework.HomeWork; | 19 | import com.prws.common.bean.homework.HomeWork; |
20 | import com.prws.common.bean.homework.KeyValue; | 20 | import com.prws.common.bean.homework.KeyValue; |
21 | 21 | ||
22 | import java.util.ArrayList; | 22 | import java.util.ArrayList; |
23 | import java.util.List; | 23 | import java.util.List; |
24 | 24 | ||
25 | public class HomeworkTopicActivity extends BaseRxActivity<ActivityTopicDetailBinding> { | 25 | public class HomeworkTopicActivity extends BaseRxActivity<ActivityTopicDetailBinding> { |
26 | private ArrayList<HomeWork> mList; | 26 | private ArrayList<HomeWork> mList; |
27 | private int position; | 27 | private int position; |
28 | 28 | ||
29 | @SuppressWarnings("unchecked") | 29 | @SuppressWarnings("unchecked") |
30 | @Override | 30 | @Override |
31 | public void initView(Bundle savedInstanceState) { | 31 | public void initView(Bundle savedInstanceState) { |
32 | mList = (ArrayList<HomeWork>) getIntent().getSerializableExtra("list"); | 32 | mList = (ArrayList<HomeWork>) getIntent().getSerializableExtra("list"); |
33 | position = getIntent().getIntExtra("position", 0); | 33 | position = getIntent().getIntExtra("position", 0); |
34 | binding.toolbar.setNavigationOnClickListener(v -> onBackPressed()); | 34 | binding.toolbar.setNavigationOnClickListener(v -> onBackPressed()); |
35 | NumberAdapter adapter = new NumberAdapter(mList); | 35 | NumberAdapter adapter = new NumberAdapter(mList); |
36 | binding.rvNumber.setAdapter(adapter); | 36 | binding.rvNumber.setAdapter(adapter); |
37 | 37 | ||
38 | binding.btnPre.setOnClickListener(v -> showTopic(position - 1)); | 38 | binding.btnPre.setOnClickListener(v -> showTopic(position - 1)); |
39 | binding.btnNext.setOnClickListener(v -> showTopic(position + 1)); | 39 | binding.btnNext.setOnClickListener(v -> showTopic(position + 1)); |
40 | adapter.setOnItemClickListener((baseQuickAdapter, view, i) -> { | 40 | adapter.setOnItemClickListener((baseQuickAdapter, view, i) -> { |
41 | if (position == i) return; | 41 | if (position == i) return; |
42 | showTopic(i); | 42 | showTopic(i); |
43 | }); | 43 | }); |
44 | showTopic(position); | 44 | showTopic(position); |
45 | } | 45 | } |
46 | 46 | ||
47 | @SuppressLint("SetTextI18n") | 47 | @SuppressLint("SetTextI18n") |
48 | private void showTopic(int position) { | 48 | private void showTopic(int position) { |
49 | if (position < 0 || position >= mList.size()) return; | 49 | if (position < 0 || position >= mList.size()) return; |
50 | this.position = position; | 50 | this.position = position; |
51 | binding.btnPre.setEnabled(position > 0); | 51 | binding.btnPre.setEnabled(position > 0); |
52 | binding.btnNext.setEnabled(position < mList.size() - 1); | 52 | binding.btnNext.setEnabled(position < mList.size() - 1); |
53 | binding.tvTitle.setText((position + 1) + "/" + mList.size()); | 53 | binding.tvTitle.setText((position + 1) + "/" + mList.size()); |
54 | binding.tvNo.setText("题目" + (position + 1)); | 54 | binding.tvNo.setText("题目" + (position + 1)); |
55 | 55 | ||
56 | HomeWork homeWork = mList.get(position); | 56 | HomeWork homeWork = mList.get(position); |
57 | Glide.with(this).load(homeWork.url).into(binding.ivTopic); | 57 | Glide.with(this).load(homeWork.url).into(binding.ivTopic); |
58 | binding.ivTopic.setOnClickListener(v -> { | 58 | binding.ivTopic.setOnClickListener(v -> { |
59 | new PhotoViewDialog(this).show(homeWork.url); | 59 | new PhotoViewDialog(this).show(homeWork.url); |
60 | }); | 60 | }); |
61 | Glide.with(this).load(homeWork.analyseUrl).into(binding.ivAnalyse); | 61 | Glide.with(this).load(homeWork.analyseUrl).into(binding.ivAnalyse); |
62 | binding.ivAnalyse.setOnClickListener(v -> { | 62 | binding.ivAnalyse.setOnClickListener(v -> { |
63 | if (homeWork.analyseUrl == null || homeWork.analyseUrl.isEmpty()) return; | 63 | if (homeWork.analyseUrl == null || homeWork.analyseUrl.isEmpty()) return; |
64 | new PhotoViewDialog(this).show(homeWork.analyseUrl); | 64 | new PhotoViewDialog(this).show(homeWork.analyseUrl); |
65 | }); | 65 | }); |
66 | String answer = homeWork.answer == null ? "" : homeWork.answer | 66 | String answer = homeWork.answer == null ? "" : homeWork.answer |
67 | .replace("<br />", "\n") | 67 | .replace("<br />", "\n") |
68 | .replace("${", "") | 68 | .replace("${", "") |
69 | .replace("}$", ""); | 69 | .replace("}$", ""); |
70 | binding.tvAnswer.setText(answer); | 70 | binding.tvAnswer.setText(answer); |
71 | if (homeWork.pointsObj == null) homeWork.formatPoints(new Gson()); | 71 | if (homeWork.pointsObj == null) homeWork.formatPoints(new Gson()); |
72 | StringBuilder pointBuilder = new StringBuilder(); | 72 | StringBuilder pointBuilder = new StringBuilder(); |
73 | for (KeyValue point: homeWork.pointsObj) { | 73 | for (KeyValue point: homeWork.pointsObj) { |
74 | pointBuilder.append("\n").append(point.Value); | 74 | pointBuilder.append("\n").append(point.Value); |
75 | } | 75 | } |
76 | binding.tvPoint.setText(homeWork.pointsObj.size() == 0 ? "" : pointBuilder.substring(1)); | 76 | binding.tvPoint.setText(homeWork.pointsObj.size() == 0 ? "" : pointBuilder.substring(1)); |
77 | } | 77 | } |
78 | 78 | ||
79 | @Override | 79 | @Override |
80 | protected ActivityTopicDetailBinding getViewBinding() { | 80 | protected ActivityTopicDetailBinding getViewBinding() { |
81 | return ActivityTopicDetailBinding.inflate(getLayoutInflater()); | 81 | return ActivityTopicDetailBinding.inflate(getLayoutInflater()); |
82 | } | 82 | } |
83 | 83 | ||
84 | static class NumberAdapter extends BaseQuickAdapter<HomeWork, BaseViewHolder> { | 84 | static class NumberAdapter extends BaseQuickAdapter<HomeWork, BaseViewHolder> { |
85 | 85 | ||
86 | public NumberAdapter(@Nullable List<HomeWork> data) { | 86 | public NumberAdapter(@Nullable List<HomeWork> data) { |
87 | super(R.layout.item_topic_number, data); | 87 | super(R.layout.item_topic_number, data); |
88 | } | 88 | } |
89 | 89 | ||
90 | @Override | 90 | @Override |
91 | protected void convert(@NonNull BaseViewHolder holder, HomeWork homeWork) { | 91 | protected void convert(@NonNull BaseViewHolder holder, HomeWork homeWork) { |
92 | TextView textView = (TextView) holder.itemView; | 92 | TextView textView = (TextView) holder.itemView; |
93 | textView.setText(String.valueOf(getData().indexOf(homeWork) + 1)); | 93 | textView.setText(String.valueOf(getData().indexOf(homeWork) + 1)); |
94 | 94 | ||
95 | int color = homeWork.check ? 0xFFFF4133 : 0xFF4ABC78; | 95 | if (homeWork.correction == null || homeWork.correction == 2) { |
96 | textView.setBackgroundTintList(ColorStateList.valueOf(color)); | 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 | } |
100 | 105 |
app/src/main/java/com/hjx/parent/HuyouDetailActivity.java
1 | package com.hjx.parent; | 1 | package com.hjx.parent; |
2 | 2 | ||
3 | 3 | ||
4 | import android.annotation.SuppressLint; | 4 | import android.annotation.SuppressLint; |
5 | import android.content.Intent; | 5 | import android.content.Intent; |
6 | import android.content.res.ColorStateList; | 6 | import android.content.res.ColorStateList; |
7 | import android.graphics.Bitmap; | 7 | import android.graphics.Bitmap; |
8 | import android.net.Uri; | 8 | import android.net.Uri; |
9 | import android.os.Bundle; | 9 | import android.os.Bundle; |
10 | import android.text.Html; | 10 | import android.text.Html; |
11 | import android.view.View; | 11 | import android.view.View; |
12 | import android.widget.TextView; | 12 | import android.widget.TextView; |
13 | 13 | ||
14 | import androidx.annotation.NonNull; | 14 | import androidx.annotation.NonNull; |
15 | import androidx.annotation.Nullable; | 15 | import androidx.annotation.Nullable; |
16 | import androidx.core.content.res.ResourcesCompat; | 16 | import androidx.core.content.res.ResourcesCompat; |
17 | 17 | ||
18 | import com.bumptech.glide.Glide; | 18 | import com.bumptech.glide.Glide; |
19 | import com.chad.library.adapter.base.BaseQuickAdapter; | 19 | import com.chad.library.adapter.base.BaseQuickAdapter; |
20 | import com.chad.library.adapter.base.BaseViewHolder; | 20 | import com.chad.library.adapter.base.BaseViewHolder; |
21 | import com.github.mikephil.charting.components.Legend; | 21 | import com.github.mikephil.charting.components.Legend; |
22 | import com.github.mikephil.charting.components.XAxis; | 22 | import com.github.mikephil.charting.components.XAxis; |
23 | import com.github.mikephil.charting.components.YAxis; | 23 | import com.github.mikephil.charting.components.YAxis; |
24 | import com.github.mikephil.charting.data.Entry; | 24 | import com.github.mikephil.charting.data.Entry; |
25 | import com.github.mikephil.charting.data.LineData; | 25 | import com.github.mikephil.charting.data.LineData; |
26 | import com.github.mikephil.charting.data.LineDataSet; | 26 | import com.github.mikephil.charting.data.LineDataSet; |
27 | import com.github.mikephil.charting.formatter.ValueFormatter; | 27 | import com.github.mikephil.charting.formatter.ValueFormatter; |
28 | import com.gyf.immersionbar.ImmersionBar; | 28 | import com.gyf.immersionbar.ImmersionBar; |
29 | import com.hjx.parent.databinding.ActivityHuyouDetailBinding; | 29 | import com.hjx.parent.databinding.ActivityHuyouDetailBinding; |
30 | import com.hjx.parent.rx.BaseRxActivity; | 30 | import com.hjx.parent.rx.BaseRxActivity; |
31 | import com.prws.common.bean.Student; | 31 | import com.prws.common.bean.Student; |
32 | import com.prws.common.bean.homework.StDetail; | 32 | import com.prws.common.bean.homework.StDetail; |
33 | import com.prws.common.net.NetWorks; | 33 | import com.prws.common.net.NetWorks; |
34 | import com.prws.common.utils.BitmapUtils; | 34 | import com.prws.common.utils.BitmapUtils; |
35 | import com.prws.common.utils.ContentUtil; | 35 | import com.prws.common.utils.ContentUtil; |
36 | import com.trello.rxlifecycle2.android.RxLifecycleAndroid; | 36 | import com.trello.rxlifecycle2.android.RxLifecycleAndroid; |
37 | 37 | ||
38 | import java.text.DecimalFormat; | 38 | import java.text.DecimalFormat; |
39 | import java.text.SimpleDateFormat; | 39 | import java.text.SimpleDateFormat; |
40 | import java.util.ArrayList; | 40 | import java.util.ArrayList; |
41 | import java.util.Date; | 41 | import java.util.Date; |
42 | import java.util.List; | 42 | import java.util.List; |
43 | import java.util.Locale; | 43 | import java.util.Locale; |
44 | import java.util.TimeZone; | 44 | import java.util.TimeZone; |
45 | 45 | ||
46 | import io.reactivex.android.schedulers.AndroidSchedulers; | 46 | import io.reactivex.android.schedulers.AndroidSchedulers; |
47 | import io.reactivex.schedulers.Schedulers; | 47 | import io.reactivex.schedulers.Schedulers; |
48 | 48 | ||
49 | public class HuyouDetailActivity extends BaseRxActivity<ActivityHuyouDetailBinding> { | 49 | public class HuyouDetailActivity extends BaseRxActivity<ActivityHuyouDetailBinding> { |
50 | 50 | ||
51 | private String id; | 51 | private String id; |
52 | private int type; // 0:周 1:阶段 | 52 | private int type; // 0:周 1:阶段 |
53 | private Student student; | 53 | private Student student; |
54 | 54 | ||
55 | private StDetail mData; | 55 | private StDetail mData; |
56 | 56 | ||
57 | final String indent = " "; | 57 | final String indent = " "; |
58 | 58 | ||
59 | private boolean a4 = false; | 59 | private boolean a4 = false; |
60 | 60 | ||
61 | @Override | 61 | @Override |
62 | protected void onResume() { | 62 | protected void onResume() { |
63 | super.onResume(); | 63 | super.onResume(); |
64 | binding.root.postDelayed(() -> { | 64 | binding.root.postDelayed(() -> { |
65 | float scale = 1f * binding.getRoot().getWidth() / binding.root.getWidth(); | 65 | float scale = 1f * binding.getRoot().getWidth() / binding.root.getWidth(); |
66 | if (scale >= 1) return; | 66 | if (scale >= 1) return; |
67 | binding.root.setScaleX(scale); | 67 | binding.root.setScaleX(scale); |
68 | binding.root.setScaleY(scale); | 68 | binding.root.setScaleY(scale); |
69 | }, 100); | 69 | }, 100); |
70 | } | 70 | } |
71 | 71 | ||
72 | @SuppressLint("CheckResult") | 72 | @SuppressLint("CheckResult") |
73 | @Override | 73 | @Override |
74 | public void initView(Bundle savedInstanceState) { | 74 | public void initView(Bundle savedInstanceState) { |
75 | binding.btnBack.setOnClickListener(v -> onBackPressed()); | 75 | binding.btnBack.setOnClickListener(v -> onBackPressed()); |
76 | id = getIntent().getStringExtra("id"); | 76 | id = getIntent().getStringExtra("id"); |
77 | type = getIntent().getIntExtra("type", 0); | 77 | type = getIntent().getIntExtra("type", 0); |
78 | student = (Student) getIntent().getSerializableExtra("student"); | 78 | student = (Student) getIntent().getSerializableExtra("student"); |
79 | 79 | ||
80 | if (type == 1) { | 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 | binding.tvTitle.setText("阶段作业学习总结"); | 87 | |
82 | binding.viewWeekTable.setVisibility(View.GONE); | 88 | Glide.with(this).load(student.photo).into(binding.ivAvatar); |
83 | } else { | 89 | binding.tvStuName.setText(student.stuName); |
84 | binding.viewPointTotal.setVisibility(View.GONE); | 90 | |
85 | binding.viewTable.setVisibility(View.GONE); | 91 | setupChart(); |
86 | } | 92 | NetWorks.service_url.getHuyouDetail(NetWorks.getHeader(), id) |
87 | 93 | .subscribeOn(Schedulers.io()) | |
88 | Glide.with(this).load(student.photo).into(binding.ivAvatar); | 94 | .map(response -> response.getData()) |
89 | binding.tvStuName.setText(student.stuName); | 95 | .map(data -> { |
90 | 96 | if (type == 1) data.formatCollection(); | |
91 | setupChart(); | 97 | return data; |
92 | NetWorks.service_url.getHuyouDetail(NetWorks.getHeader(), id) | 98 | }) |
93 | .subscribeOn(Schedulers.io()) | 99 | .observeOn(AndroidSchedulers.mainThread()) |
94 | .map(response -> response.getData()) | 100 | .compose(RxLifecycleAndroid.bindActivity(getRxLifecycle())) |
95 | .map(data -> { | 101 | .subscribe((data, th) -> { |
96 | if (type == 1) data.formatCollection(); | 102 | mData = data; |
97 | return data; | 103 | if (th != null) th.printStackTrace(); |
98 | }) | 104 | if (data != null) showData(data); |
99 | .observeOn(AndroidSchedulers.mainThread()) | 105 | }); |
100 | .compose(RxLifecycleAndroid.bindActivity(getRxLifecycle())) | 106 | |
101 | .subscribe((data, th) -> { | 107 | binding.btnShare.setOnClickListener(v -> { |
102 | mData = data; | 108 | Uri shareUri = prepareShare(); |
103 | if (th != null) th.printStackTrace(); | 109 | if (shareUri != null) { |
104 | if (data != null) showData(data); | 110 | Intent shareIntent = new Intent(Intent.ACTION_SEND); |
105 | }); | 111 | shareIntent.setType("image/jpeg"); |
106 | 112 | shareIntent.putExtra(Intent.EXTRA_STREAM, shareUri); | |
107 | binding.btnShare.setOnClickListener(v -> { | 113 | shareIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION); |
108 | Uri shareUri = prepareShare(); | 114 | |
109 | if (shareUri != null) { | 115 | startActivity(shareIntent); |
110 | Intent shareIntent = new Intent(Intent.ACTION_SEND); | 116 | } |
111 | shareIntent.setType("image/jpeg"); | 117 | }); |
112 | shareIntent.putExtra(Intent.EXTRA_STREAM, shareUri); | 118 | |
113 | shareIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION); | 119 | binding.btnSwitch.setOnClickListener(v -> { |
114 | 120 | switchPage(); | |
115 | startActivity(shareIntent); | 121 | }); |
116 | } | 122 | |
117 | }); | 123 | } |
118 | 124 | ||
119 | binding.btnSwitch.setOnClickListener(v -> { | 125 | private SimpleDateFormat getFormatWithGmt8(String pattern) { |
120 | switchPage(); | 126 | SimpleDateFormat format = new SimpleDateFormat(pattern, Locale.CHINA); |
121 | }); | 127 | format.setTimeZone(TimeZone.getTimeZone("GMT+16")); |
122 | 128 | return format; | |
123 | } | 129 | } |
124 | 130 | ||
125 | private SimpleDateFormat getFormatWithGmt8(String pattern) { | 131 | @SuppressLint("SetTextI18n") |
126 | SimpleDateFormat format = new SimpleDateFormat(pattern, Locale.CHINA); | 132 | private void showData(StDetail data) { |
127 | format.setTimeZone(TimeZone.getTimeZone("GMT+16")); | 133 | binding.tvGrade.setText(data.grade); |
128 | return format; | 134 | binding.tvSubject.setText(data.homeworkSubject); |
129 | } | 135 | String start = getFormatWithGmt8("yyyy.M.d").format(data.startTime); |
130 | 136 | String end = new SimpleDateFormat(" - M.d", Locale.CHINA).format(data.endTime); | |
131 | @SuppressLint("SetTextI18n") | 137 | binding.tvDate.setText(start + end); |
132 | private void showData(StDetail data) { | 138 | |
133 | binding.tvGrade.setText(data.grade); | 139 | if (data.points == null) data.points = new ArrayList<>(); |
134 | binding.tvSubject.setText(data.homeworkSubject); | 140 | if (data.points.size() == 0) { |
135 | String start = getFormatWithGmt8("yyyy.M.d").format(data.startTime); | 141 | binding.cpBefore.setValue(0); |
136 | String end = new SimpleDateFormat(" - M.d", Locale.CHINA).format(data.endTime); | 142 | binding.cpAfter.setValue(0); |
137 | binding.tvDate.setText(start + end); | 143 | binding.pgBefore.setText("0"); |
138 | 144 | binding.pgAfter.setText("0"); | |
139 | if (data.points == null) data.points = new ArrayList<>(); | 145 | } else { |
140 | if (data.points.size() == 0) { | 146 | float before = 0; |
141 | binding.cpBefore.setValue(0); | 147 | float after = 0; |
142 | binding.cpAfter.setValue(0); | 148 | for (StDetail.Point point: data.points) { |
143 | binding.pgBefore.setText("0"); | 149 | before += point.beforeState; |
144 | binding.pgAfter.setText("0"); | 150 | after += point.afterState; |
145 | } else { | 151 | } |
146 | float before = 0; | 152 | before = (int) (100f * before / data.points.size() + 0.5f); |
147 | float after = 0; | 153 | after = (int) (100f * after / data.points.size() + 0.5f); |
148 | for (StDetail.Point point: data.points) { | 154 | binding.cpBefore.setValue(before); |
149 | before += point.beforeState; | 155 | binding.cpAfter.setValue(after); |
150 | after += point.afterState; | 156 | DecimalFormat format = new DecimalFormat("0"); |
151 | } | 157 | binding.pgBefore.setText(format.format(before)); |
152 | before = (int) (100f * before / data.points.size() + 0.5f); | 158 | binding.pgAfter.setText(format.format(after)); |
153 | after = (int) (100f * after / data.points.size() + 0.5f); | 159 | |
154 | binding.cpBefore.setValue(before); | 160 | String comment; |
155 | binding.cpAfter.setValue(after); | 161 | if (after >= 90) { |
156 | DecimalFormat format = new DecimalFormat("0"); | 162 | comment = "知识点掌握的比较扎实,多练习多巩固掌握一般的知识点会有很大帮助。"; |
157 | binding.pgBefore.setText(format.format(before)); | 163 | } else if (after >= 80) { |
158 | binding.pgAfter.setText(format.format(after)); | 164 | comment = "知识点掌握程度有进步,还要再继续学习,多练习,不断巩固。"; |
159 | 165 | } else if (after >= 60) { | |
160 | String comment; | 166 | comment = "薄弱知识点还有进步空间,再多做一些类似题目来巩固知识点,继续努力。"; |
161 | if (after >= 90) { | 167 | } else { |
162 | comment = "知识点掌握的比较扎实,多练习多巩固掌握一般的知识点会有很大帮助。"; | 168 | comment = "你的薄弱知识点还需要再深入了解,有不清楚的地方及时问老师,继续加油。"; |
163 | } else if (after >= 80) { | 169 | } |
164 | comment = "知识点掌握程度有进步,还要再继续学习,多练习,不断巩固。"; | 170 | String percent = new DecimalFormat("0%").format(after / 100); |
165 | } else if (after >= 60) { | 171 | String temp = indent + "通过学习,你的薄弱知识点掌握程度为 %s," + comment; |
166 | comment = "薄弱知识点还有进步空间,再多做一些类似题目来巩固知识点,继续努力。"; | 172 | temp = String.format(temp, fromColor(percent, "#F24E38")); |
167 | } else { | 173 | binding.tvWeakRate.setText(Html.fromHtml(temp, Html.FROM_HTML_MODE_COMPACT)); |
168 | comment = "你的薄弱知识点还需要再深入了解,有不清楚的地方及时问老师,继续加油。"; | 174 | } |
169 | } | 175 | |
170 | String percent = new DecimalFormat("0%").format(after / 100); | 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 | String temp = indent + "通过学习,你的薄弱知识点掌握程度为 %s," + comment; | 195 | binding.tvTotalCorrect.setText(String.valueOf(data.correct)); |
172 | temp = String.format(temp, fromColor(percent, "#F24E38")); | 196 | binding.tvTotalError.setText(String.valueOf(data.total - data.correct)); |
197 | binding.tvTotalBlank.setText(String.valueOf(data.unfinished)); | ||
173 | binding.tvWeakRate.setText(Html.fromHtml(temp, Html.FROM_HTML_MODE_COMPACT)); | 198 | if (data.total == 0) { |
174 | } | 199 | binding.tvRating.setText(""); |
175 | 200 | } else { | |
176 | int exNo = 0, goodNo = 0, normalNo = 0, weakNo = 0; | 201 | String rateComment; |
177 | float total = 0; | ||
178 | if (data.points != null) { | 202 | if (rate >= 90) { |
179 | for (StDetail.Point point: data.points) { | 203 | rateComment = "知识点掌握得比较优秀,多练习多巩固掌握一般的知识点会有很大帮助。"; |
180 | total += point.afterState; | 204 | } else if (rate >= 80) { |
181 | if (point.afterState >= 0.9) { | 205 | rateComment = "知识点掌握程度有进步,还要再继续学习,多练习,不断巩固。"; |
182 | exNo ++; | 206 | } else if (rate >= 60) { |
183 | } else if (point.afterState >= 0.8) { | 207 | rateComment = "薄弱知识点还有进步空间,再多做一些类似题目来巩固知识点,继续努力。"; |
184 | goodNo ++; | 208 | } else { |
185 | } else if (point.afterState >= 0.6) { | 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 | normalNo ++; | 219 | } |
220 | if (weakNo > 0) { | ||
221 | pointComment.append(",").append(weakNo).append(" 个知识点掌握的还需努力,这部分还要再加强学习"); | ||
222 | } | ||
223 | pointComment.append("。"); | ||
187 | } else { | 224 | String rateStr = new DecimalFormat("0%").format(rate / 100f); |
188 | weakNo ++; | 225 | String temp; |
189 | } | 226 | if (type == 0) { |
190 | } | 227 | temp = indent + "在本周作业中,你的综合正确率是 %s," + rateComment + pointComment + "在未来的学习中,请保持这份优秀,继续挑战更难的题目,勇攀高峰。"; |
191 | } | 228 | } else { |
192 | 229 | temp = indent + "你的综合正确率是 %s," + rateComment; | |
193 | float rate = 100f * data.correct / Math.max(data.total - data.unfinished, 1); | 230 | } |
194 | binding.tvTotalRate.setText(new DecimalFormat("0").format(rate)); | 231 | temp = String.format(temp, fromColor(rateStr, "#3BC3B6")); |
195 | binding.tvTotalCorrect.setText(String.valueOf(data.correct)); | 232 | binding.tvRating.setText(Html.fromHtml(temp, Html.FROM_HTML_MODE_COMPACT)); |
196 | binding.tvTotalError.setText(String.valueOf(data.total - data.correct)); | 233 | } |
197 | binding.tvTotalBlank.setText(String.valueOf(data.unfinished)); | 234 | |
198 | if (data.total == 0) { | 235 | List<Entry> entries = new ArrayList<>(); |
199 | binding.tvRating.setText(""); | 236 | if (type == 0) { |
200 | } else { | 237 | entries.add(new Entry(1, data.mondayCorrection)); |
201 | String rateComment; | 238 | entries.add(new Entry(2, data.tuesdayCorrection)); |
202 | if (rate >= 90) { | 239 | entries.add(new Entry(3, data.wednesdayCorrection)); |
203 | rateComment = "知识点掌握得比较优秀,多练习多巩固掌握一般的知识点会有很大帮助。"; | 240 | entries.add(new Entry(4, data.thursdayCorrection)); |
204 | } else if (rate >= 80) { | 241 | entries.add(new Entry(5, data.fridayCorrection)); |
205 | rateComment = "知识点掌握程度有进步,还要再继续学习,多练习,不断巩固。"; | 242 | } else { |
206 | } else if (rate >= 60) { | 243 | for (int i = 0; i < data.correctionList.size(); i ++) { |
207 | rateComment = "薄弱知识点还有进步空间,再多做一些类似题目来巩固知识点,继续努力。"; | 244 | StDetail.Correction c = data.correctionList.get(i); |
208 | } else { | 245 | entries.add(new Entry(i, c.correction)); |
209 | rateComment = "你的薄弱知识点还需要再深入了解,有不清楚的地方及时问老师,继续加油。"; | 246 | } |
210 | } | 247 | XAxis xAxis = binding.lineChart.getXAxis(); |
211 | 248 | xAxis.setLabelCount(Math.min(entries.size(), 5), true); | |
212 | String correctNumHt = fromColor(String.valueOf(data.correct), "#3BC3B6"); | 249 | xAxis.setValueFormatter(new ValueFormatter() { |
213 | String errNumHt = fromColor(String.valueOf(data.total - data.correct - data.unfinished), "#3BC3B6"); | 250 | SimpleDateFormat format = new SimpleDateFormat("M.d", Locale.CHINA); |
214 | StringBuilder pointComment = new StringBuilder("其中,答对题目 ") | 251 | @Override |
215 | .append(correctNumHt).append(" 个,答错题目 ") | 252 | public String getFormattedValue(float value) { |
216 | .append(errNumHt).append(" 个"); | 253 | int index = (int) value; |
217 | if (exNo > 0) { | 254 | if (index < 0 || index >= data.correctionList.size()) return ""; |
218 | pointComment.append(",").append(exNo).append(" 个知识点掌握的非常棒"); | 255 | Date date = data.correctionList.get(index).date; |
219 | } | 256 | return format.format(date); |
220 | if (weakNo > 0) { | 257 | } |
221 | pointComment.append(",").append(weakNo).append(" 个知识点掌握的还需努力,这部分还要再加强学习"); | 258 | }); |
222 | } | 259 | } |
223 | pointComment.append("。"); | 260 | |
224 | String rateStr = new DecimalFormat("0%").format(rate / 100f); | 261 | LineDataSet set = new LineDataSet(entries, ""); |
225 | String temp; | 262 | set.setColor(0xFF3BC3B6); |
226 | if (type == 0) { | 263 | set.setCircleColor(0xFF3BC3B6); |
227 | temp = indent + "在本周作业中,你的综合正确率是 %s," + rateComment + pointComment + "在未来的学习中,请保持这份优秀,继续挑战更难的题目,勇攀高峰。"; | 264 | set.setDrawFilled(true); |
228 | } else { | 265 | set.setDrawCircles(type == 0 || entries.size() == 1); |
229 | temp = indent + "你的综合正确率是 %s," + rateComment; | 266 | set.setDrawValues(false); |
230 | } | 267 | set.setHighlightEnabled(false); |
231 | temp = String.format(temp, fromColor(rateStr, "#3BC3B6")); | 268 | set.setDrawHighlightIndicators(false); |
232 | binding.tvRating.setText(Html.fromHtml(temp, Html.FROM_HTML_MODE_COMPACT)); | 269 | set.setFillDrawable(ResourcesCompat.getDrawable(getResources(), R.drawable.bg_line_chart_fill2, null)); |
233 | } | 270 | binding.lineChart.setData(new LineData(set)); |
234 | 271 | binding.lineChart.invalidate(); | |
235 | List<Entry> entries = new ArrayList<>(); | 272 | |
236 | if (type == 0) { | 273 | if (!data.points.isEmpty()) { |
237 | entries.add(new Entry(1, data.mondayCorrection)); | ||
238 | entries.add(new Entry(2, data.tuesdayCorrection)); | ||
239 | entries.add(new Entry(3, data.wednesdayCorrection)); | ||
240 | entries.add(new Entry(4, data.thursdayCorrection)); | ||
241 | entries.add(new Entry(5, data.fridayCorrection)); | ||
242 | } else { | ||
243 | for (int i = 0; i < data.correctionList.size(); i ++) { | ||
244 | StDetail.Correction c = data.correctionList.get(i); | ||
245 | entries.add(new Entry(i, c.correction)); | ||
246 | } | ||
247 | XAxis xAxis = binding.lineChart.getXAxis(); | ||
248 | xAxis.setLabelCount(Math.min(entries.size(), 5), true); | ||
249 | xAxis.setValueFormatter(new ValueFormatter() { | ||
250 | SimpleDateFormat format = new SimpleDateFormat("M.d", Locale.CHINA); | ||
251 | @Override | 274 | binding.tvExcellent.setText(String.valueOf(exNo)); |
252 | public String getFormattedValue(float value) { | 275 | binding.tvGood.setText(String.valueOf(goodNo)); |
253 | int index = (int) value; | 276 | binding.tvNormal.setText(String.valueOf(normalNo)); |
254 | if (index < 0 || index >= data.correctionList.size()) return ""; | 277 | binding.tvWeak.setText(String.valueOf(weakNo)); |
255 | Date date = data.correctionList.get(index).date; | 278 | |
256 | return format.format(date); | 279 | float exRate = 100f * exNo / data.points.size(); |
257 | } | 280 | float goodRate = 100f * goodNo / data.points.size(); |
258 | }); | 281 | float normalRate = 100f * normalNo / data.points.size(); |
259 | } | 282 | float weakRate = 100f * weakNo / data.points.size(); |
260 | 283 | binding.cpGood.setValue(goodRate + normalRate + weakRate); | |
261 | LineDataSet set = new LineDataSet(entries, ""); | 284 | binding.cpNormal.setValue(normalRate + weakRate); |
262 | set.setColor(0xFF3BC3B6); | 285 | binding.cpWeak.setValue(weakRate); |
263 | set.setCircleColor(0xFF3BC3B6); | 286 | binding.tvAvePoint.setText(new DecimalFormat("0").format(100f * total / data.points.size())); |
264 | set.setDrawFilled(true); | 287 | } |
265 | set.setDrawCircles(type == 0 || entries.size() == 1); | 288 | |
266 | set.setDrawValues(false); | 289 | List<StDetail.Point> points = new ArrayList<>(); |
267 | set.setHighlightEnabled(false); | 290 | for (StDetail.Point point: data.points) { |
268 | set.setDrawHighlightIndicators(false); | 291 | if (point.beforeState < 1) points.add(point); |
269 | set.setFillDrawable(ResourcesCompat.getDrawable(getResources(), R.drawable.bg_line_chart_fill2, null)); | 292 | } |
270 | binding.lineChart.setData(new LineData(set)); | 293 | binding.tableRoot.setClipToOutline(true); |
294 | binding.tableWeekRoot.setClipToOutline(true); | ||
271 | binding.lineChart.invalidate(); | 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 | if (!data.points.isEmpty()) { | 298 | binding.flPointDesc.setVisibility(points.isEmpty() ? View.GONE : View.VISIBLE); |
274 | binding.tvExcellent.setText(String.valueOf(exNo)); | 299 | binding.flEmptyPoints.setVisibility(points.isEmpty() ? View.VISIBLE : View.GONE); |
275 | binding.tvGood.setText(String.valueOf(goodNo)); | 300 | } |
276 | binding.tvNormal.setText(String.valueOf(normalNo)); | 301 | |
277 | binding.tvWeak.setText(String.valueOf(weakNo)); | 302 | private void setupChart() { |
278 | 303 | binding.lineChart.getLegend().setForm(Legend.LegendForm.NONE); | |
279 | float exRate = 100f * exNo / data.points.size(); | 304 | binding.lineChart.setScaleEnabled(false); |
280 | float goodRate = 100f * goodNo / data.points.size(); | 305 | binding.lineChart.setTouchEnabled(false); |
281 | float normalRate = 100f * normalNo / data.points.size(); | 306 | binding.lineChart.setDescription(null); |
282 | float weakRate = 100f * weakNo / data.points.size(); | 307 | binding.lineChart.getAxisRight().setEnabled(false); |
283 | binding.cpGood.setValue(goodRate + normalRate + weakRate); | 308 | YAxis yAxis = binding.lineChart.getAxisLeft(); |
284 | binding.cpNormal.setValue(normalRate + weakRate); | 309 | yAxis.setDrawAxisLine(false); |
285 | binding.cpWeak.setValue(weakRate); | 310 | yAxis.setDrawGridLines(true); |
286 | binding.tvAvePoint.setText(new DecimalFormat("0").format(100f * total / data.points.size())); | 311 | yAxis.setGridColor(0xFFDDDDDD); |
287 | } | 312 | yAxis.setTextColor(0xFF333333); |
288 | 313 | if (type == 0) { | |
289 | List<StDetail.Point> points = new ArrayList<>(); | 314 | yAxis.setTextSize(16); |
290 | for (StDetail.Point point: data.points) { | 315 | yAxis.setXOffset(16); |
291 | if (point.beforeState < 1) points.add(point); | 316 | } else { |
292 | } | 317 | yAxis.setTextSize(13); |
293 | binding.tableRoot.setClipToOutline(true); | 318 | } |
294 | binding.tableWeekRoot.setClipToOutline(true); | 319 | yAxis.setAxisMinimum(0); |
295 | binding.rvPoint.setAdapter(new Adapter(points)); | 320 | yAxis.setAxisMaximum(1); |
296 | binding.rvWeekPoint.setAdapter(new WeekAdapter(data.points)); | 321 | yAxis.setLabelCount(5, true); |
297 | binding.tableRoot.setVisibility(points.isEmpty() ? View.GONE : View.VISIBLE); | 322 | yAxis.setValueFormatter(new ValueFormatter() { |
298 | binding.flPointDesc.setVisibility(points.isEmpty() ? View.GONE : View.VISIBLE); | 323 | @Override |
299 | binding.flEmptyPoints.setVisibility(points.isEmpty() ? View.VISIBLE : View.GONE); | 324 | public String getFormattedValue(float value) { |
300 | } | 325 | return new DecimalFormat("0%").format(value); |
301 | 326 | } | |
302 | private void setupChart() { | 327 | }); |
303 | binding.lineChart.getLegend().setForm(Legend.LegendForm.NONE); | 328 | |
304 | binding.lineChart.setScaleEnabled(false); | 329 | XAxis xAxis = binding.lineChart.getXAxis(); |
305 | binding.lineChart.setTouchEnabled(false); | 330 | xAxis.setPosition(XAxis.XAxisPosition.BOTTOM); |
306 | binding.lineChart.setDescription(null); | 331 | xAxis.setDrawAxisLine(false); |
307 | binding.lineChart.getAxisRight().setEnabled(false); | 332 | xAxis.setDrawGridLines(false); |
308 | YAxis yAxis = binding.lineChart.getAxisLeft(); | 333 | xAxis.setTextColor(0xFF333333); |
309 | yAxis.setDrawAxisLine(false); | 334 | xAxis.setTextSize(16); |
310 | yAxis.setDrawGridLines(true); | 335 | xAxis.setYOffset(16); |
311 | yAxis.setGridColor(0xFFDDDDDD); | 336 | if (type == 0) { |
312 | yAxis.setTextColor(0xFF333333); | 337 | xAxis.setAxisMinimum(0.5f); |
313 | if (type == 0) { | 338 | xAxis.setAxisMaximum(5.5f); |
314 | yAxis.setTextSize(16); | 339 | xAxis.setLabelCount(11, true); |
315 | yAxis.setXOffset(16); | 340 | xAxis.setValueFormatter(new ValueFormatter() { |
316 | } else { | 341 | @Override |
317 | yAxis.setTextSize(13); | 342 | public String getFormattedValue(float value) { |
318 | } | 343 | if (value == 1) { |
319 | yAxis.setAxisMinimum(0); | 344 | return "周一"; |
320 | yAxis.setAxisMaximum(1); | 345 | } else if (value == 2) { |
321 | yAxis.setLabelCount(5, true); | 346 | return "周二"; |
322 | yAxis.setValueFormatter(new ValueFormatter() { | 347 | } else if (value == 3) { |
323 | @Override | 348 | return "周三"; |
324 | public String getFormattedValue(float value) { | 349 | } else if (value == 4) { |
325 | return new DecimalFormat("0%").format(value); | 350 | return "周四"; |
326 | } | 351 | } else if (value == 5) { |
327 | }); | 352 | return "周五"; |
328 | 353 | } | |
329 | XAxis xAxis = binding.lineChart.getXAxis(); | 354 | return ""; |
330 | xAxis.setPosition(XAxis.XAxisPosition.BOTTOM); | 355 | } |
331 | xAxis.setDrawAxisLine(false); | 356 | }); |
332 | xAxis.setDrawGridLines(false); | 357 | } else { |
333 | xAxis.setTextColor(0xFF333333); | 358 | xAxis.setTextSize(13); |
334 | xAxis.setTextSize(16); | 359 | } |
335 | xAxis.setYOffset(16); | 360 | } |
336 | if (type == 0) { | 361 | |
337 | xAxis.setAxisMinimum(0.5f); | 362 | private String fromColor(String str, String color) { |
338 | xAxis.setAxisMaximum(5.5f); | 363 | return String.format("<font color='%s'><b>%s</b></font>", color, str); |
339 | xAxis.setLabelCount(11, true); | 364 | } |
340 | xAxis.setValueFormatter(new ValueFormatter() { | 365 | |
341 | @Override | 366 | private void switchPage() { |
342 | public String getFormattedValue(float value) { | 367 | Intent intent = new Intent(getIntent()); |
343 | if (value == 1) { | 368 | intent.putExtra("a4", !a4); |
344 | return "周一"; | 369 | startActivity(intent); |
345 | } else if (value == 2) { | 370 | finish(); |
346 | return "周二"; | 371 | } |
347 | } else if (value == 3) { | 372 | |
348 | return "周三"; | 373 | private Uri prepareShare() { |
349 | } else if (value == 4) { | 374 | try { |
350 | return "周四"; | 375 | binding.toolbar.setVisibility(View.INVISIBLE); |
351 | } else if (value == 5) { | 376 | Bitmap bitmap = BitmapUtils.shotView(binding.root); |
352 | return "周五"; | 377 | binding.toolbar.setVisibility(View.VISIBLE); |
353 | } | 378 | |
354 | return ""; | 379 | String fileName = student.stuName + "_周作业学习报告_" + System.currentTimeMillis(); |
355 | } | 380 | return ContentUtil.saveBitmapToGallery(this, bitmap, fileName); |
356 | }); | 381 | } catch (Exception e) { |
357 | } else { | 382 | e.printStackTrace(); |
358 | xAxis.setTextSize(13); | 383 | } |
359 | } | 384 | return null; |
360 | } | 385 | } |
361 | 386 | ||
362 | private String fromColor(String str, String color) { | 387 | @Override |
363 | return String.format("<font color='%s'><b>%s</b></font>", color, str); | 388 | protected ActivityHuyouDetailBinding getViewBinding() { |
364 | } | 389 | a4 = getIntent().getBooleanExtra("a4", false); |
365 | 390 | View view; | |
366 | private void switchPage() { | 391 | if (a4) view = getLayoutInflater().inflate(R.layout.activity_huyou_detail_a4, null); |
367 | Intent intent = new Intent(getIntent()); | 392 | else view = getLayoutInflater().inflate(R.layout.activity_huyou_detail, null); |
368 | intent.putExtra("a4", !a4); | 393 | return ActivityHuyouDetailBinding.bind(view); |
369 | startActivity(intent); | 394 | } |
370 | finish(); | 395 | |
371 | } | 396 | public static class Adapter extends BaseQuickAdapter<StDetail.Point, BaseViewHolder> { |
372 | 397 | ||
373 | private Uri prepareShare() { | 398 | public Adapter(@Nullable List<StDetail.Point> data) { |
374 | try { | 399 | super(R.layout.item_huyou_point, data); |
375 | binding.toolbar.setVisibility(View.INVISIBLE); | 400 | } |
376 | Bitmap bitmap = BitmapUtils.shotView(binding.root); | 401 | |
377 | binding.toolbar.setVisibility(View.VISIBLE); | 402 | @Override |
378 | 403 | protected void convert(@NonNull BaseViewHolder holder, StDetail.Point point) { | |
379 | String fileName = student.stuName + "_周作业学习报告_" + System.currentTimeMillis(); | 404 | DecimalFormat format1 = new DecimalFormat("0%"); |
380 | return ContentUtil.saveBitmapToGallery(this, bitmap, fileName); | 405 | DecimalFormat format2 = new DecimalFormat("0"); |
381 | } catch (Exception e) { | 406 | holder.setText(R.id.tvName, point.pointName); |
382 | e.printStackTrace(); | 407 | holder.setText(R.id.tvBefore, format1.format(point.beforeState)); |
383 | } | 408 | holder.setText(R.id.tvAfter, format1.format(point.afterState)); |
384 | return null; | 409 | holder.setText(R.id.tvGap, format2.format(point.gap * 100)); |
385 | } | 410 | holder.setGone(R.id.ivFlag, getData().indexOf(point) == 0); |
386 | 411 | holder.<TextView>getView(R.id.tvName).setTooltipText(point.pointName); | |
387 | @Override | 412 | |
388 | protected ActivityHuyouDetailBinding getViewBinding() { | 413 | TextView before = holder.getView(R.id.tvBeforeState); |
389 | a4 = getIntent().getBooleanExtra("a4", false); | 414 | TextView after = holder.getView(R.id.tvAfterState); |
390 | View view; | 415 | |
391 | if (a4) view = getLayoutInflater().inflate(R.layout.activity_huyou_detail_a4, null); | 416 | if (point.beforeState >= 0.9) { |
392 | else view = getLayoutInflater().inflate(R.layout.activity_huyou_detail, null); | 417 | before.setText("掌握优秀"); |
393 | return ActivityHuyouDetailBinding.bind(view); | 418 | before.setBackgroundTintList(ColorStateList.valueOf(0xFF4FBB7A)); |
394 | } | 419 | } else if (point.beforeState >= 0.8) { |
395 | 420 | before.setText("掌握良好"); | |
396 | public static class Adapter extends BaseQuickAdapter<StDetail.Point, BaseViewHolder> { | 421 | before.setBackgroundTintList(ColorStateList.valueOf(0xFF489AFA)); |
397 | 422 | } else if (point.beforeState >= 0.6) { | |
398 | public Adapter(@Nullable List<StDetail.Point> data) { | 423 | before.setText("掌握一般"); |
399 | super(R.layout.item_huyou_point, data); | 424 | before.setBackgroundTintList(ColorStateList.valueOf(0xFFF58725)); |
400 | } | 425 | } else { |
401 | 426 | before.setText("掌握薄弱"); | |
402 | @Override | 427 | before.setBackgroundTintList(ColorStateList.valueOf(0xFFEA5127)); |
403 | protected void convert(@NonNull BaseViewHolder holder, StDetail.Point point) { | 428 | } |
404 | DecimalFormat format1 = new DecimalFormat("0%"); | 429 | if (point.afterState >= 0.9) { |
405 | DecimalFormat format2 = new DecimalFormat("0"); | 430 | after.setText("掌握优秀"); |
406 | holder.setText(R.id.tvName, point.pointName); | 431 | after.setBackgroundTintList(ColorStateList.valueOf(0xFF4FBB7A)); |
407 | holder.setText(R.id.tvBefore, format1.format(point.beforeState)); | 432 | } else if (point.afterState >= 0.8) { |
408 | holder.setText(R.id.tvAfter, format1.format(point.afterState)); | 433 | after.setText("掌握良好"); |
409 | holder.setText(R.id.tvGap, format2.format(point.gap * 100)); | 434 | after.setBackgroundTintList(ColorStateList.valueOf(0xFF489AFA)); |
410 | holder.setGone(R.id.ivFlag, getData().indexOf(point) == 0); | 435 | } else if (point.afterState >= 0.6) { |
411 | holder.<TextView>getView(R.id.tvName).setTooltipText(point.pointName); | 436 | after.setText("掌握一般"); |
412 | 437 | after.setBackgroundTintList(ColorStateList.valueOf(0xFFF58725)); | |
413 | TextView before = holder.getView(R.id.tvBeforeState); | 438 | } else { |
414 | TextView after = holder.getView(R.id.tvAfterState); | 439 | after.setText("掌握薄弱"); |
415 | 440 | after.setBackgroundTintList(ColorStateList.valueOf(0xFFEA5127)); | |
416 | if (point.beforeState >= 0.9) { | 441 | } |
417 | before.setText("掌握优秀"); | 442 | |
418 | before.setBackgroundTintList(ColorStateList.valueOf(0xFF4FBB7A)); | 443 | holder.setText(R.id.tvHuyou, format1.format(point.correctness)); |
419 | } else if (point.beforeState >= 0.8) { | 444 | } |
420 | before.setText("掌握良好"); | 445 | |
421 | before.setBackgroundTintList(ColorStateList.valueOf(0xFF489AFA)); | 446 | } |
422 | } else if (point.beforeState >= 0.6) { | 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)); |
app/src/main/res/drawable/bg_feedback_blank.xml
File was created | 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> |
app/src/main/res/drawable/bg_feedback_error.xml
File was created | 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> |
app/src/main/res/drawable/bg_feedback_right.xml
File was created | 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> |
app/src/main/res/drawable/btn_feedback_blank.xml
File was created | 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> |
app/src/main/res/drawable/btn_feedback_error.xml
File was created | 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> |
app/src/main/res/drawable/btn_feedback_right.xml
File was created | 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> |
app/src/main/res/drawable/png_icon_daily_blank.png
6.23 KB
app/src/main/res/drawable/shape_radius_10.xml
1 | <?xml version="1.0" encoding="utf-8"?> | 1 | <?xml version="1.0" encoding="utf-8"?> |
2 | <shape xmlns:android="http://schemas.android.com/apk/res/android"> | 2 | <shape xmlns:android="http://schemas.android.com/apk/res/android"> |
3 | <corners android:radius="10dp"/> | 3 | <corners android:radius="10dp"/> |
4 | <solid android:color="@color/white"/> | ||
4 | </shape> | 5 | </shape> |
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 | </LinearLayout> | 146 | </LinearLayout> |
147 | |||
147 | <LinearLayout | 148 | <LinearLayout |
148 | android:orientation="horizontal" | 149 | android:orientation="horizontal" |
149 | android:layout_marginHorizontal="15dp" | 150 | android:layout_marginHorizontal="15dp" |
150 | android:layout_marginTop="15dp" | 151 | android:layout_marginTop="15dp" |
151 | android:layout_width="match_parent" | 152 | android:layout_width="match_parent" |
152 | android:layout_height="wrap_content"> | 153 | android:layout_height="wrap_content"> |
153 | <TextView | 154 | <TextView |
154 | android:text="答题结果" | 155 | android:text="答题结果" |
155 | android:textSize="14sp" | 156 | android:textSize="14sp" |
156 | android:textColor="#333" | 157 | android:textColor="#333" |
157 | android:layout_width="wrap_content" | 158 | android:layout_width="wrap_content" |
158 | android:layout_height="wrap_content"/> | 159 | android:layout_height="wrap_content"/> |
159 | <TextView | 160 | <TextView |
160 | android:id="@+id/btnDetail" | 161 | android:id="@+id/btnDetail" |
161 | android:text="(点击查看题目详情)" | 162 | android:text="(点击查看题目详情)" |
162 | android:textSize="14sp" | 163 | android:textSize="14sp" |
163 | android:textColor="#1C90F3" | 164 | android:textColor="#1C90F3" |
164 | android:layout_width="wrap_content" | 165 | android:layout_width="wrap_content" |
165 | android:layout_height="wrap_content"/> | 166 | android:layout_height="wrap_content"/> |
166 | </LinearLayout> | 167 | </LinearLayout> |
167 | 168 | ||
168 | <androidx.recyclerview.widget.RecyclerView | 169 | <androidx.recyclerview.widget.RecyclerView |
169 | android:id="@+id/rvCorrect" | 170 | android:id="@+id/rvCorrect" |
170 | tools:listitem="@layout/item_feedback_num" | 171 | tools:listitem="@layout/item_feedback_num" |
171 | tools:itemCount="1" | 172 | tools:itemCount="1" |
172 | android:layout_marginTop="15dp" | 173 | android:layout_marginTop="15dp" |
173 | android:layout_marginHorizontal="15dp" | 174 | android:layout_marginHorizontal="15dp" |
174 | android:layout_width="match_parent" | 175 | android:layout_width="match_parent" |
175 | android:layout_height="wrap_content"/> | 176 | android:layout_height="wrap_content"/> |
176 | <TextView | 177 | |
177 | android:text="错题已经加入到错题本,到错题本查看详情" | 178 | <LinearLayout |
178 | android:textSize="12sp" | 179 | android:id="@+id/viewBlank" |
179 | android:textColor="#666" | 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 | android:layout_marginHorizontal="15dp" | 205 | android:layout_marginHorizontal="15dp" |
181 | android:layout_width="wrap_content" | 206 | android:layout_width="match_parent" |
182 | android:layout_height="wrap_content"/> | 207 | android:layout_height="wrap_content"/> |
183 | </LinearLayout> | 208 | </LinearLayout> |
184 | 209 | ||
185 | <LinearLayout | 210 | <LinearLayout |
186 | android:id="@+id/flEval" | 211 | android:id="@+id/flEval" |
187 | android:orientation="vertical" | 212 | android:orientation="vertical" |
188 | android:background="@drawable/shape_radius_10" | 213 | android:background="@drawable/shape_radius_10" |
189 | android:backgroundTint="@color/white" | 214 | android:backgroundTint="@color/white" |
190 | android:layout_marginTop="15dp" | 215 | android:layout_marginTop="15dp" |
191 | android:paddingBottom="16dp" | 216 | android:paddingBottom="16dp" |
192 | android:layout_width="match_parent" | 217 | android:layout_width="match_parent" |
193 | android:layout_height="wrap_content"> | 218 | android:layout_height="wrap_content"> |
194 | <androidx.appcompat.widget.AppCompatTextView | 219 | <androidx.appcompat.widget.AppCompatTextView |
195 | android:text="辅导后错题掌握评估" | 220 | android:text="辅导后错题掌握评估" |
196 | android:textSize="16sp" | 221 | android:textSize="16sp" |
197 | android:textColor="#333" | 222 | android:textColor="#333" |
198 | android:textStyle="bold" | 223 | android:textStyle="bold" |
199 | android:gravity="center_vertical" | 224 | android:gravity="center_vertical" |
200 | android:paddingHorizontal="15dp" | 225 | android:paddingHorizontal="15dp" |
201 | android:drawablePadding="5dp" | 226 | android:drawablePadding="5dp" |
202 | android:drawableStart="@drawable/svg_ic_paper" | 227 | android:drawableStart="@drawable/svg_ic_paper" |
203 | android:background="@drawable/shape_radius_top_10" | 228 | android:background="@drawable/shape_radius_top_10" |
204 | android:backgroundTint="#DAEBFE" | 229 | android:backgroundTint="#DAEBFE" |
205 | android:layout_width="match_parent" | 230 | android:layout_width="match_parent" |
206 | android:layout_height="40dp"/> | 231 | android:layout_height="40dp"/> |
207 | <androidx.recyclerview.widget.RecyclerView | 232 | <androidx.recyclerview.widget.RecyclerView |
208 | android:id="@+id/rvError" | 233 | android:id="@+id/rvError" |
209 | android:orientation="vertical" | 234 | android:orientation="vertical" |
210 | app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" | 235 | app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" |
211 | android:layout_width="match_parent" | 236 | android:layout_width="match_parent" |
212 | android:layout_height="wrap_content"/> | 237 | android:layout_height="wrap_content"/> |
213 | </LinearLayout> | 238 | </LinearLayout> |
214 | 239 | ||
215 | <LinearLayout | 240 | <LinearLayout |
216 | android:orientation="vertical" | 241 | android:orientation="vertical" |
217 | android:background="@drawable/shape_radius_10" | 242 | android:background="@drawable/shape_radius_10" |
218 | android:backgroundTint="@color/white" | 243 | android:backgroundTint="@color/white" |
219 | android:layout_marginTop="15dp" | 244 | android:layout_marginTop="15dp" |
220 | android:layout_width="match_parent" | 245 | android:layout_width="match_parent" |
221 | android:layout_height="wrap_content"> | 246 | android:layout_height="wrap_content"> |
222 | <androidx.appcompat.widget.AppCompatTextView | 247 | <androidx.appcompat.widget.AppCompatTextView |
223 | android:text="教师评语" | 248 | android:text="教师评语" |
224 | android:textSize="16sp" | 249 | android:textSize="16sp" |
225 | android:textColor="#333" | 250 | android:textColor="#333" |
226 | android:textStyle="bold" | 251 | android:textStyle="bold" |
227 | android:gravity="center_vertical" | 252 | android:gravity="center_vertical" |
228 | android:paddingHorizontal="15dp" | 253 | android:paddingHorizontal="15dp" |
229 | android:drawablePadding="5dp" | 254 | android:drawablePadding="5dp" |
230 | android:drawableStart="@drawable/svg_ic_comment" | 255 | android:drawableStart="@drawable/svg_ic_comment" |
231 | android:background="@drawable/shape_radius_top_10" | 256 | android:background="@drawable/shape_radius_top_10" |
232 | android:backgroundTint="#DAEBFE" | 257 | android:backgroundTint="#DAEBFE" |
233 | android:layout_width="match_parent" | 258 | android:layout_width="match_parent" |
234 | android:layout_height="40dp"/> | 259 | android:layout_height="40dp"/> |
235 | <EditText | 260 | <EditText |
236 | android:id="@+id/etComment" | 261 | android:id="@+id/etComment" |
237 | android:hint="非必填, 不超过300字" | 262 | android:hint="非必填, 不超过300字" |
238 | android:maxLength="300" | 263 | android:maxLength="300" |
239 | android:textSize="13sp" | 264 | android:textSize="13sp" |
240 | android:textColor="#333" | 265 | android:textColor="#333" |
241 | android:textColorHint="#999" | 266 | android:textColorHint="#999" |
242 | android:gravity="start" | 267 | android:gravity="start" |
243 | android:background="@null" | 268 | android:background="@null" |
244 | android:layout_margin="14dp" | 269 | android:layout_margin="14dp" |
245 | android:layout_width="match_parent" | 270 | android:layout_width="match_parent" |
246 | android:layout_height="wrap_content" | 271 | android:layout_height="wrap_content" |
247 | tools:ignore="Autofill,LabelFor,TextFields" /> | 272 | tools:ignore="Autofill,LabelFor,TextFields" /> |
248 | </LinearLayout> | 273 | </LinearLayout> |
249 | 274 | ||
250 | 275 | ||
251 | </LinearLayout> | 276 | </LinearLayout> |
252 | </androidx.core.widget.NestedScrollView> | 277 | </androidx.core.widget.NestedScrollView> |
253 | </LinearLayout> | 278 | </LinearLayout> |
app/src/main/res/layout/activity_homework_select.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="HardcodedText"> | 9 | tools:ignore="HardcodedText"> |
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 | </androidx.appcompat.widget.Toolbar> | 28 | </androidx.appcompat.widget.Toolbar> |
29 | 29 | ||
30 | <LinearLayout | 30 | <LinearLayout |
31 | android:orientation="horizontal" | 31 | android:orientation="horizontal" |
32 | android:layout_marginHorizontal="16dp" | 32 | android:layout_marginHorizontal="16dp" |
33 | android:layout_marginTop="16dp" | 33 | android:layout_marginTop="16dp" |
34 | android:layout_marginBottom="8dp" | 34 | android:layout_marginBottom="8dp" |
35 | android:layout_width="match_parent" | 35 | android:layout_width="match_parent" |
36 | android:layout_height="wrap_content"> | 36 | android:layout_height="wrap_content"> |
37 | <CheckBox | 37 | <Space style="@style/empty_space"/> |
38 | android:id="@+id/chkAll" | 38 | <TextView |
39 | android:text="全选" | 39 | android:id="@+id/tvNumber" |
40 | android:text="0" | ||
40 | android:textSize="13sp" | 41 | android:textSize="13sp" |
41 | android:textColor="#333" | 42 | android:textColor="#1C90F3" |
42 | android:button="@drawable/chk_circle" | ||
43 | android:gravity="center_vertical" | ||
44 | android:paddingStart="8dp" | ||
45 | android:paddingEnd="0dp" | ||
46 | android:layout_width="wrap_content" | 43 | android:layout_width="wrap_content" |
47 | android:layout_height="wrap_content"/> | 44 | android:layout_height="wrap_content"/> |
48 | <Space style="@style/empty_space"/> | ||
49 | <TextView | 45 | <TextView |
50 | android:text="已选择 " | 46 | android:text=" 道错题, " |
51 | android:textSize="13sp" | 47 | android:textSize="13sp" |
52 | android:textColor="#333" | 48 | android:textColor="#333" |
53 | android:layout_width="wrap_content" | 49 | android:layout_width="wrap_content" |
54 | android:layout_height="wrap_content"/> | 50 | android:layout_height="wrap_content"/> |
55 | <TextView | 51 | <TextView |
56 | android:id="@+id/tvNumber" | 52 | android:id="@+id/tvBlankNumber" |
57 | android:text="0" | 53 | android:text="0" |
58 | android:textSize="13sp" | 54 | android:textSize="13sp" |
59 | android:textColor="#1C90F3" | 55 | android:textColor="#1C90F3" |
60 | android:layout_width="wrap_content" | 56 | android:layout_width="wrap_content" |
61 | android:layout_height="wrap_content"/> | 57 | android:layout_height="wrap_content"/> |
62 | <TextView | 58 | <TextView |
63 | android:text=" 道错题" | 59 | android:text=" 道未做题" |
64 | android:textSize="13sp" | 60 | android:textSize="13sp" |
65 | android:textColor="#333" | 61 | android:textColor="#333" |
66 | android:layout_width="wrap_content" | 62 | android:layout_width="wrap_content" |
67 | android:layout_height="wrap_content"/> | 63 | android:layout_height="wrap_content"/> |
68 | </LinearLayout> | 64 | </LinearLayout> |
69 | 65 | ||
70 | <androidx.recyclerview.widget.RecyclerView | 66 | <androidx.recyclerview.widget.RecyclerView |
71 | android:id="@+id/recyclerView" | 67 | android:id="@+id/recyclerView" |
72 | android:orientation="vertical" | 68 | android:orientation="vertical" |
73 | app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" | 69 | app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" |
74 | android:layout_width="match_parent" | 70 | android:layout_width="match_parent" |
75 | android:layout_height="0px" | 71 | android:layout_height="0px" |
76 | android:layout_weight="1"/> | 72 | android:layout_weight="1"/> |
77 | 73 | ||
78 | <FrameLayout | 74 | <FrameLayout |
79 | android:background="@color/white" | 75 | android:background="@color/white" |
80 | android:paddingTop="8dp" | 76 | android:paddingTop="8dp" |
81 | android:paddingBottom="16dp" | 77 | android:paddingBottom="16dp" |
82 | android:layout_width="match_parent" | 78 | android:layout_width="match_parent" |
83 | android:layout_height="wrap_content"> | 79 | android:layout_height="wrap_content"> |
84 | <TextView | 80 | <TextView |
85 | android:id="@+id/btnConfirm" | 81 | android:id="@+id/btnConfirm" |
86 | android:text="作业全对" | 82 | android:text="下一步" |
87 | android:textSize="16sp" | 83 | android:textSize="16sp" |
88 | android:textColor="@color/white" | 84 | android:textColor="@color/white" |
89 | android:gravity="center" | 85 | android:gravity="center" |
90 | android:layout_gravity="center" | 86 | android:layout_gravity="center" |
91 | android:background="@drawable/shape_radius_5" | 87 | android:background="@drawable/shape_radius_5" |
92 | android:backgroundTint="#4ABC78" | 88 | android:backgroundTint="#1C90F3" |
93 | android:layout_width="265dp" | 89 | android:layout_width="265dp" |
94 | android:layout_height="36dp"/> | 90 | android:layout_height="36dp"/> |
95 | </FrameLayout> | 91 | </FrameLayout> |
app/src/main/res/layout/activity_huyou_detail.xml
1 | <?xml version="1.0" encoding="utf-8"?> | 1 | <?xml version="1.0" encoding="utf-8"?> |
2 | <FrameLayout | 2 | <FrameLayout |
3 | xmlns:android="http://schemas.android.com/apk/res/android" | 3 | xmlns:android="http://schemas.android.com/apk/res/android" |
4 | xmlns:tools="http://schemas.android.com/tools" | 4 | xmlns:tools="http://schemas.android.com/tools" |
5 | xmlns:app="http://schemas.android.com/apk/res-auto" | 5 | xmlns:app="http://schemas.android.com/apk/res-auto" |
6 | android:layout_width="match_parent" | 6 | android:layout_width="match_parent" |
7 | android:layout_height="match_parent" | 7 | android:layout_height="match_parent" |
8 | tools:ignore="HardcodedText,ContentDescription,SmallSp,UseCompoundDrawables,RtlSymmetry"> | 8 | tools:ignore="HardcodedText,ContentDescription,SmallSp,UseCompoundDrawables,RtlSymmetry"> |
9 | <androidx.core.widget.NestedScrollView | 9 | <androidx.core.widget.NestedScrollView |
10 | android:layout_gravity="center_horizontal" | 10 | android:layout_gravity="center_horizontal" |
11 | android:layout_width="wrap_content" | 11 | android:layout_width="wrap_content" |
12 | android:layout_height="match_parent"> | 12 | android:layout_height="match_parent"> |
13 | 13 | ||
14 | <LinearLayout | 14 | <LinearLayout |
15 | android:id="@+id/root" | 15 | android:id="@+id/root" |
16 | android:orientation="vertical" | 16 | android:orientation="vertical" |
17 | android:background="#CEF1EC" | 17 | android:background="#CEF1EC" |
18 | android:paddingBottom="24dp" | ||
18 | android:paddingBottom="24dp" | 19 | android:layout_width="378dp" |
19 | android:layout_width="378dp" | 20 | android:layout_height="match_parent"> |
20 | android:layout_height="match_parent"> | 21 | |
21 | 22 | <FrameLayout | |
22 | <FrameLayout | 23 | android:orientation="horizontal" |
23 | android:orientation="horizontal" | 24 | android:paddingHorizontal="16dp" |
24 | android:paddingHorizontal="16dp" | 25 | android:layout_marginTop="16dp" |
25 | android:layout_marginTop="16dp" | 26 | android:layout_width="match_parent" |
26 | android:layout_width="match_parent" | 27 | android:layout_height="wrap_content"> |
27 | android:layout_height="wrap_content"> | 28 | <LinearLayout |
28 | <LinearLayout | 29 | android:id="@+id/toolbar" |
29 | android:id="@+id/toolbar" | 30 | android:layout_gravity="center_vertical" |
30 | android:layout_gravity="center_vertical" | 31 | android:layout_width="match_parent" |
31 | android:layout_width="match_parent" | 32 | android:layout_height="wrap_content"> |
32 | android:layout_height="wrap_content"> | 33 | <TextView |
33 | <TextView | 34 | android:id="@+id/btnBack" |
34 | android:id="@+id/btnBack" | 35 | android:text="返回" |
35 | android:text="返回" | 36 | android:textSize="16sp" |
36 | android:textSize="16sp" | 37 | android:textColor="#333" |
37 | android:textColor="#333" | 38 | android:layout_width="wrap_content" |
38 | android:layout_width="wrap_content" | 39 | android:layout_height="wrap_content"/> |
39 | android:layout_height="wrap_content"/> | 40 | <Space style="@style/empty_space"/> |
40 | <Space style="@style/empty_space"/> | 41 | <TextView |
41 | <TextView | 42 | android:id="@+id/btnSwitch" |
42 | android:id="@+id/btnSwitch" | 43 | android:text="A4版" |
43 | android:text="A4版" | 44 | android:textSize="16sp" |
44 | android:textSize="16sp" | 45 | android:textColor="#333" |
45 | android:textColor="#333" | 46 | android:layout_width="wrap_content" |
46 | android:layout_width="wrap_content" | 47 | android:layout_height="wrap_content"/> |
47 | android:layout_height="wrap_content"/> | 48 | <TextView |
48 | <TextView | 49 | android:id="@+id/btnShare" |
49 | android:id="@+id/btnShare" | 50 | android:text="分享" |
50 | android:text="分享" | 51 | android:textSize="16sp" |
51 | android:textSize="16sp" | 52 | android:textColor="#333" |
52 | android:textColor="#333" | 53 | android:layout_marginStart="8dp" |
53 | android:layout_marginStart="8dp" | 54 | android:layout_width="wrap_content" |
54 | android:layout_width="wrap_content" | 55 | android:layout_height="wrap_content"/> |
55 | android:layout_height="wrap_content"/> | 56 | <TextView |
56 | <TextView | 57 | android:id="@+id/btnSame" |
57 | android:id="@+id/btnSame" | 58 | android:visibility="gone" |
58 | android:visibility="gone" | 59 | android:text="举一反三" |
59 | android:text="举一反三" | 60 | android:textSize="16sp" |
60 | android:textSize="16sp" | 61 | android:textColor="#333" |
61 | android:textColor="#333" | 62 | android:layout_gravity="center_vertical|end" |
62 | android:layout_gravity="center_vertical|end" | 63 | android:layout_width="wrap_content" |
63 | android:layout_width="wrap_content" | 64 | android:layout_height="wrap_content"/> |
64 | android:layout_height="wrap_content"/> | 65 | </LinearLayout> |
65 | </LinearLayout> | 66 | <TextView |
66 | <TextView | 67 | android:id="@+id/tvTitle" |
67 | android:id="@+id/tvTitle" | 68 | android:text="周作业学习报告" |
68 | android:text="周作业学习报告" | 69 | android:textSize="18sp" |
69 | android:textSize="18sp" | 70 | android:textColor="#333" |
70 | android:textColor="#333" | 71 | android:textStyle="bold" |
71 | android:textStyle="bold" | 72 | android:layout_gravity="center_horizontal" |
72 | android:layout_gravity="center_horizontal" | 73 | android:layout_width="wrap_content" |
73 | android:layout_width="wrap_content" | 74 | android:layout_height="wrap_content" /> |
74 | android:layout_height="wrap_content" /> | 75 | </FrameLayout> |
75 | </FrameLayout> | 76 | |
76 | 77 | ||
77 | 78 | <ImageView | |
78 | <ImageView | 79 | android:src="@drawable/png_huyou_top_bg" |
79 | android:src="@drawable/png_huyou_top_bg" | 80 | android:elevation="1dp" |
80 | android:elevation="1dp" | 81 | android:layout_gravity="end" |
81 | android:layout_gravity="end" | 82 | android:layout_marginHorizontal="16dp" |
82 | android:layout_marginHorizontal="16dp" | 83 | android:layout_width="102dp" |
83 | android:layout_width="102dp" | 84 | android:layout_height="90dp"/> |
84 | android:layout_height="90dp"/> | 85 | |
85 | 86 | <LinearLayout | |
86 | <LinearLayout | 87 | android:orientation="vertical" |
87 | android:orientation="vertical" | 88 | android:background="@drawable/png_info_bg" |
88 | android:background="@drawable/png_info_bg" | 89 | android:padding="16dp" |
89 | android:padding="16dp" | 90 | android:layout_marginHorizontal="16dp" |
90 | android:layout_marginHorizontal="16dp" | 91 | android:layout_marginTop="-60dp" |
91 | android:layout_marginTop="-60dp" | 92 | android:layout_width="match_parent" |
92 | android:layout_width="match_parent" | 93 | android:layout_height="144dp"> |
93 | android:layout_height="144dp"> | 94 | <LinearLayout |
94 | <LinearLayout | 95 | android:orientation="horizontal" |
95 | android:orientation="horizontal" | 96 | android:layout_width="match_parent" |
96 | android:layout_width="match_parent" | 97 | android:layout_height="wrap_content"> |
97 | android:layout_height="wrap_content"> | 98 | <androidx.constraintlayout.utils.widget.ImageFilterView |
98 | <androidx.constraintlayout.utils.widget.ImageFilterView | 99 | android:id="@+id/ivAvatar" |
99 | android:id="@+id/ivAvatar" | 100 | tools:background="#2491FF" |
100 | tools:background="#2491FF" | 101 | app:round="40dp" |
101 | app:round="40dp" | 102 | android:layout_width="40dp" |
102 | android:layout_width="40dp" | 103 | android:layout_height="40dp"/> |
103 | android:layout_height="40dp"/> | 104 | <LinearLayout |
104 | <LinearLayout | 105 | android:orientation="vertical" |
105 | android:orientation="vertical" | 106 | android:layout_gravity="center_vertical" |
106 | android:layout_gravity="center_vertical" | 107 | android:layout_marginStart="10dp" |
107 | android:layout_marginStart="10dp" | 108 | android:layout_width="wrap_content" |
108 | android:layout_width="wrap_content" | 109 | android:layout_height="wrap_content"> |
109 | android:layout_height="wrap_content"> | 110 | <TextView |
110 | <TextView | 111 | android:id="@+id/tvStuName" |
111 | android:id="@+id/tvStuName" | 112 | tools:text="杨同学 " |
112 | tools:text="杨同学 " | 113 | android:textSize="14sp" |
113 | android:textSize="14sp" | 114 | android:textColor="#333" |
114 | android:textColor="#333" | 115 | android:textStyle="bold" |
115 | android:textStyle="bold" | 116 | android:layout_width="wrap_content" |
116 | android:layout_width="wrap_content" | 117 | android:layout_height="wrap_content"/> |
117 | android:layout_height="wrap_content"/> | 118 | <TextView |
118 | <TextView | 119 | android:id="@+id/tvGrade" |
119 | android:id="@+id/tvGrade" | 120 | tools:text="七年级" |
120 | tools:text="七年级" | 121 | android:textSize="13sp" |
121 | android:textSize="13sp" | 122 | android:textColor="#666" |
122 | android:textColor="#666" | 123 | android:textStyle="bold" |
123 | android:textStyle="bold" | 124 | android:layout_width="wrap_content" |
124 | android:layout_width="wrap_content" | 125 | android:layout_height="wrap_content"/> |
125 | android:layout_height="wrap_content"/> | 126 | </LinearLayout> |
126 | </LinearLayout> | 127 | </LinearLayout> |
127 | </LinearLayout> | 128 | <LinearLayout |
128 | <LinearLayout | 129 | android:orientation="horizontal" |
129 | android:orientation="horizontal" | 130 | android:background="@drawable/shape_radius_10" |
130 | android:background="@drawable/shape_radius_10" | 131 | android:backgroundTint="#F4FAFF" |
131 | android:backgroundTint="#F4FAFF" | 132 | android:layout_marginTop="12dp" |
132 | android:layout_marginTop="12dp" | 133 | android:layout_width="match_parent" |
133 | android:layout_width="match_parent" | 134 | android:layout_height="60dp"> |
134 | android:layout_height="60dp"> | 135 | <LinearLayout |
135 | <LinearLayout | 136 | android:orientation="vertical" |
136 | android:orientation="vertical" | 137 | android:gravity="center" |
137 | android:gravity="center" | 138 | android:layout_width="0dp" |
138 | android:layout_width="0dp" | 139 | android:layout_height="match_parent" |
139 | android:layout_height="match_parent" | 140 | android:layout_weight="1"> |
140 | android:layout_weight="1"> | 141 | <LinearLayout |
141 | <LinearLayout | 142 | android:paddingEnd="20dp" |
142 | android:paddingEnd="20dp" | 143 | android:gravity="center_vertical" |
143 | android:gravity="center_vertical" | 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 | <ImageView |
146 | <ImageView | 147 | android:src="@drawable/png_iv_subject" |
147 | android:src="@drawable/png_iv_subject" | 148 | android:layout_marginEnd="5dp" |
148 | android:layout_marginEnd="5dp" | 149 | android:layout_width="16dp" |
149 | android:layout_width="16dp" | 150 | android:layout_height="14dp"/> |
150 | android:layout_height="14dp"/> | 151 | <TextView |
151 | <TextView | 152 | android:text="学科" |
152 | android:text="学科" | 153 | android:textSize="12sp" |
153 | android:textSize="12sp" | 154 | android:textColor="#333" |
154 | android:textColor="#333" | 155 | android:textStyle="bold" |
155 | android:textStyle="bold" | 156 | android:layout_width="wrap_content" |
156 | android:layout_width="wrap_content" | 157 | android:layout_height="wrap_content"/> |
157 | android:layout_height="wrap_content"/> | 158 | </LinearLayout> |
158 | </LinearLayout> | 159 | <TextView |
159 | <TextView | 160 | android:id="@+id/tvSubject" |
160 | android:id="@+id/tvSubject" | 161 | tools:text="数学" |
161 | tools:text="数学" | 162 | android:textSize="12sp" |
162 | android:textSize="12sp" | 163 | android:textColor="#3BC3B6" |
163 | android:textColor="#3BC3B6" | 164 | android:textStyle="bold" |
164 | android:textStyle="bold" | 165 | android:layout_marginTop="8dp" |
165 | android:layout_marginTop="8dp" | 166 | android:layout_width="wrap_content" |
166 | android:layout_width="wrap_content" | 167 | android:layout_height="wrap_content"/> |
167 | android:layout_height="wrap_content"/> | 168 | </LinearLayout> |
168 | </LinearLayout> | 169 | <LinearLayout |
169 | <LinearLayout | 170 | android:orientation="vertical" |
170 | android:orientation="vertical" | 171 | android:gravity="center" |
171 | android:gravity="center" | 172 | android:layout_width="0dp" |
172 | android:layout_width="0dp" | 173 | android:layout_height="match_parent" |
173 | android:layout_height="match_parent" | 174 | android:layout_weight="1"> |
174 | android:layout_weight="1"> | 175 | <LinearLayout |
175 | <LinearLayout | 176 | android:paddingEnd="20dp" |
176 | android:paddingEnd="20dp" | 177 | android:gravity="center_vertical" |
177 | android:gravity="center_vertical" | 178 | android:layout_width="wrap_content" |
178 | android:layout_width="wrap_content" | 179 | android:layout_height="wrap_content"> |
179 | android:layout_height="wrap_content"> | 180 | <ImageView |
180 | <ImageView | 181 | android:src="@drawable/png_ic_during" |
181 | android:src="@drawable/png_ic_during" | 182 | android:layout_marginEnd="5dp" |
182 | android:layout_marginEnd="5dp" | 183 | android:layout_width="14dp" |
183 | android:layout_width="14dp" | 184 | android:layout_height="13dp"/> |
184 | android:layout_height="13dp"/> | 185 | <TextView |
185 | <TextView | 186 | android:text="周期" |
186 | android:text="周期" | 187 | android:textSize="12sp" |
187 | android:textSize="12sp" | 188 | android:textColor="#333" |
188 | android:textColor="#333" | 189 | android:textStyle="bold" |
189 | android:textStyle="bold" | 190 | android:layout_width="wrap_content" |
190 | android:layout_width="wrap_content" | 191 | android:layout_height="wrap_content"/> |
191 | android:layout_height="wrap_content"/> | 192 | </LinearLayout> |
192 | </LinearLayout> | 193 | <TextView |
193 | <TextView | 194 | android:id="@+id/tvDate" |
194 | android:id="@+id/tvDate" | 195 | tools:text="2024.09.01-2024.09.30" |
195 | tools:text="2024.09.01-2024.09.30" | 196 | android:textSize="12sp" |
196 | android:textSize="12sp" | 197 | android:textColor="#3BC3B6" |
197 | android:textColor="#3BC3B6" | 198 | android:textStyle="bold" |
198 | android:textStyle="bold" | 199 | android:layout_marginTop="8dp" |
199 | android:layout_marginTop="8dp" | 200 | android:layout_width="wrap_content" |
200 | android:layout_width="wrap_content" | 201 | android:layout_height="wrap_content"/> |
201 | android:layout_height="wrap_content"/> | 202 | </LinearLayout> |
202 | </LinearLayout> | 203 | </LinearLayout> |
203 | </LinearLayout> | 204 | </LinearLayout> |
204 | </LinearLayout> | 205 | |
205 | 206 | <LinearLayout | |
207 | android:id="@+id/viewPointTotal" | ||
206 | <LinearLayout | 208 | android:orientation="vertical" |
207 | android:id="@+id/viewPointTotal" | 209 | android:background="@drawable/shape_radius_10" |
208 | android:orientation="vertical" | 210 | android:backgroundTint="@color/white" |
209 | android:background="@drawable/shape_radius_10" | 211 | android:padding="16dp" |
210 | android:backgroundTint="@color/white" | 212 | android:layout_marginHorizontal="16dp" |
211 | android:padding="16dp" | 213 | android:layout_marginTop="12dp" |
212 | android:layout_marginHorizontal="16dp" | 214 | android:layout_width="match_parent" |
213 | android:layout_marginTop="12dp" | 215 | android:layout_height="wrap_content"> |
214 | android:layout_width="match_parent" | 216 | <TextView |
215 | android:layout_height="wrap_content"> | 217 | android:text="知识点总评" |
216 | <TextView | 218 | android:textSize="16sp" |
217 | android:text="知识点总评" | 219 | android:textColor="#333333" |
218 | android:textSize="16sp" | 220 | android:textStyle="bold" |
219 | android:textColor="#333333" | 221 | android:background="@drawable/bg_hy_weak_title" |
220 | android:textStyle="bold" | 222 | android:paddingStart="20dp" |
221 | android:background="@drawable/bg_hy_weak_title" | 223 | android:paddingEnd="4dp" |
222 | android:paddingStart="20dp" | 224 | android:layout_gravity="center_horizontal" |
223 | android:paddingEnd="4dp" | 225 | android:layout_width="wrap_content" |
224 | android:layout_gravity="center_horizontal" | 226 | android:layout_height="wrap_content"/> |
225 | android:layout_width="wrap_content" | 227 | <LinearLayout |
226 | android:layout_height="wrap_content"/> | 228 | android:orientation="horizontal" |
227 | <LinearLayout | 229 | android:layout_marginTop="28dp" |
228 | android:orientation="horizontal" | 230 | android:layout_width="match_parent" |
229 | android:layout_marginTop="28dp" | 231 | android:layout_height="wrap_content"> |
230 | android:layout_width="match_parent" | 232 | <LinearLayout |
231 | android:layout_height="wrap_content"> | 233 | android:orientation="vertical" |
232 | <LinearLayout | 234 | android:layout_width="0dp" |
233 | android:orientation="vertical" | 235 | android:layout_height="wrap_content" |
234 | android:layout_width="0dp" | 236 | android:layout_weight="1"> |
235 | android:layout_height="wrap_content" | 237 | <TextView |
236 | android:layout_weight="1"> | 238 | android:text="学习前" |
237 | <TextView | 239 | android:textSize="12sp" |
238 | android:text="学习前" | 240 | android:textColor="#333" |
239 | android:textSize="12sp" | 241 | android:layout_gravity="center_horizontal" |
240 | android:textColor="#333" | 242 | android:layout_width="wrap_content" |
241 | android:layout_gravity="center_horizontal" | 243 | android:layout_height="wrap_content"/> |
242 | android:layout_width="wrap_content" | 244 | <FrameLayout |
243 | android:layout_height="wrap_content"/> | 245 | android:background="@drawable/png_huyou_progress_bg" |
244 | <FrameLayout | 246 | android:padding="8dp" |
245 | android:background="@drawable/png_huyou_progress_bg" | 247 | android:layout_gravity="center_horizontal" |
246 | android:padding="8dp" | 248 | android:layout_marginTop="16dp" |
247 | android:layout_gravity="center_horizontal" | 249 | android:layout_width="126dp" |
248 | android:layout_marginTop="16dp" | 250 | android:layout_height="126dp"> |
249 | android:layout_width="126dp" | 251 | <com.littlejie.circleprogress.CircleProgress |
250 | android:layout_height="126dp"> | 252 | android:id="@+id/cpBefore" |
251 | <com.littlejie.circleprogress.CircleProgress | 253 | app:arcWidth="15dp" |
252 | android:id="@+id/cpBefore" | 254 | app:bgArcWidth="15dp" |
253 | app:arcWidth="15dp" | 255 | app:arcColors="#F36A27" |
254 | app:bgArcWidth="15dp" | 256 | app:bgArcColor="#FFF1EA" |
255 | app:arcColors="#F36A27" | 257 | app:startAngle="-90" |
256 | app:bgArcColor="#FFF1EA" | 258 | app:sweepAngle="360" |
257 | app:startAngle="-90" | 259 | app:maxValue="100" |
258 | app:sweepAngle="360" | 260 | app:value="0" |
259 | app:maxValue="100" | 261 | app:hintColor="@color/transparent" |
260 | app:value="0" | 262 | app:unitColor="@color/transparent" |
261 | app:hintColor="@color/transparent" | 263 | app:valueColor="@color/transparent" |
262 | app:unitColor="@color/transparent" | 264 | android:layout_width="match_parent" |
263 | app:valueColor="@color/transparent" | 265 | android:layout_height="match_parent"/> |
264 | android:layout_width="match_parent" | 266 | <LinearLayout |
265 | android:layout_height="match_parent"/> | 267 | android:orientation="vertical" |
266 | <LinearLayout | 268 | android:gravity="center_horizontal" |
267 | android:orientation="vertical" | 269 | android:layout_gravity="center" |
268 | android:gravity="center_horizontal" | 270 | android:layout_width="wrap_content" |
269 | android:layout_gravity="center" | 271 | android:layout_height="wrap_content"> |
270 | android:layout_width="wrap_content" | 272 | <LinearLayout |
271 | android:layout_height="wrap_content"> | 273 | android:layout_width="wrap_content" |
272 | <LinearLayout | 274 | android:layout_height="wrap_content"> |
273 | android:layout_width="wrap_content" | 275 | <TextView |
274 | android:layout_height="wrap_content"> | 276 | android:id="@+id/pgBefore" |
275 | <TextView | 277 | tools:text="88" |
276 | android:id="@+id/pgBefore" | 278 | android:textSize="25sp" |
277 | tools:text="88" | 279 | android:textColor="#EA5127" |
278 | android:textSize="25sp" | 280 | android:textStyle="bold" |
279 | android:textColor="#EA5127" | 281 | android:layout_width="wrap_content" |
280 | android:textStyle="bold" | 282 | android:layout_height="wrap_content"/> |
281 | android:layout_width="wrap_content" | 283 | <TextView |
282 | android:layout_height="wrap_content"/> | 284 | android:text="%" |
283 | <TextView | 285 | android:textSize="12sp" |
284 | android:text="%" | 286 | android:textColor="#EA5127" |
285 | android:textSize="12sp" | 287 | android:layout_width="wrap_content" |
286 | android:textColor="#EA5127" | 288 | android:layout_height="wrap_content"/> |
287 | android:layout_width="wrap_content" | 289 | </LinearLayout> |
288 | android:layout_height="wrap_content"/> | 290 | <TextView |
289 | </LinearLayout> | 291 | android:text="整体掌握程度" |
290 | <TextView | 292 | android:textSize="10sp" |
291 | android:text="整体掌握程度" | 293 | android:textColor="#333" |
292 | android:textSize="10sp" | 294 | android:textStyle="bold" |
293 | android:textColor="#333" | 295 | android:layout_marginTop="-2dp" |
294 | android:textStyle="bold" | 296 | android:layout_width="wrap_content" |
295 | android:layout_marginTop="-2dp" | 297 | android:layout_height="wrap_content"/> |
296 | android:layout_width="wrap_content" | 298 | </LinearLayout> |
297 | android:layout_height="wrap_content"/> | 299 | </FrameLayout> |
298 | </LinearLayout> | 300 | </LinearLayout> |
299 | </FrameLayout> | 301 | <LinearLayout |
300 | </LinearLayout> | 302 | android:orientation="vertical" |
301 | <LinearLayout | 303 | android:layout_width="0dp" |
302 | android:orientation="vertical" | 304 | android:layout_height="wrap_content" |
303 | android:layout_width="0dp" | 305 | android:layout_weight="1"> |
304 | android:layout_height="wrap_content" | 306 | <TextView |
305 | android:layout_weight="1"> | 307 | android:text="学习后" |
306 | <TextView | 308 | android:textSize="12sp" |
307 | android:text="学习后" | 309 | android:textColor="#333" |
308 | android:textSize="12sp" | 310 | android:layout_gravity="center_horizontal" |
309 | android:textColor="#333" | 311 | android:layout_width="wrap_content" |
310 | android:layout_gravity="center_horizontal" | 312 | android:layout_height="wrap_content"/> |
311 | android:layout_width="wrap_content" | 313 | <FrameLayout |
312 | android:layout_height="wrap_content"/> | 314 | android:background="@drawable/png_huyou_progress_bg" |
313 | <FrameLayout | 315 | android:padding="8dp" |
314 | android:background="@drawable/png_huyou_progress_bg" | 316 | android:layout_gravity="center_horizontal" |
315 | android:padding="8dp" | 317 | android:layout_marginTop="16dp" |
316 | android:layout_gravity="center_horizontal" | 318 | android:layout_width="126dp" |
317 | android:layout_marginTop="16dp" | 319 | android:layout_height="126dp"> |
318 | android:layout_width="126dp" | 320 | <com.littlejie.circleprogress.CircleProgress |
319 | android:layout_height="126dp"> | 321 | android:id="@+id/cpAfter" |
320 | <com.littlejie.circleprogress.CircleProgress | 322 | app:arcWidth="15dp" |
321 | android:id="@+id/cpAfter" | 323 | app:bgArcWidth="15dp" |
322 | app:arcWidth="15dp" | 324 | app:arcColors="#3BC3B6" |
323 | app:bgArcWidth="15dp" | 325 | app:bgArcColor="#C2FCF6" |
324 | app:arcColors="#3BC3B6" | 326 | app:startAngle="-90" |
325 | app:bgArcColor="#C2FCF6" | 327 | app:sweepAngle="360" |
326 | app:startAngle="-90" | 328 | app:maxValue="100" |
327 | app:sweepAngle="360" | 329 | app:value="0" |
328 | app:maxValue="100" | 330 | app:hintColor="@color/transparent" |
329 | app:value="0" | 331 | app:unitColor="@color/transparent" |
330 | app:hintColor="@color/transparent" | 332 | app:valueColor="@color/transparent" |
331 | app:unitColor="@color/transparent" | 333 | android:layout_width="match_parent" |
332 | app:valueColor="@color/transparent" | 334 | android:layout_height="match_parent"/> |
333 | android:layout_width="match_parent" | 335 | <LinearLayout |
334 | android:layout_height="match_parent"/> | 336 | android:orientation="vertical" |
335 | <LinearLayout | 337 | android:gravity="center_horizontal" |
336 | android:orientation="vertical" | 338 | android:layout_gravity="center" |
337 | android:gravity="center_horizontal" | 339 | android:layout_width="wrap_content" |
338 | android:layout_gravity="center" | 340 | android:layout_height="wrap_content"> |
339 | android:layout_width="wrap_content" | 341 | <LinearLayout |
340 | android:layout_height="wrap_content"> | 342 | android:layout_width="wrap_content" |
341 | <LinearLayout | 343 | android:layout_height="wrap_content"> |
342 | android:layout_width="wrap_content" | 344 | <TextView |
343 | android:layout_height="wrap_content"> | 345 | android:id="@+id/pgAfter" |
344 | <TextView | 346 | tools:text="88" |
345 | android:id="@+id/pgAfter" | 347 | android:textSize="25sp" |
346 | tools:text="88" | 348 | android:textColor="#3BC3B6" |
347 | android:textSize="25sp" | 349 | android:textStyle="bold" |
348 | android:textColor="#3BC3B6" | 350 | android:layout_width="wrap_content" |
349 | android:textStyle="bold" | 351 | android:layout_height="wrap_content"/> |
350 | android:layout_width="wrap_content" | 352 | <TextView |
351 | android:layout_height="wrap_content"/> | 353 | android:text="%" |
352 | <TextView | 354 | android:textSize="12sp" |
353 | android:text="%" | 355 | android:textColor="#3BC3B6" |
354 | android:textSize="12sp" | 356 | android:layout_width="wrap_content" |
355 | android:textColor="#3BC3B6" | 357 | android:layout_height="wrap_content"/> |
356 | android:layout_width="wrap_content" | 358 | </LinearLayout> |
357 | android:layout_height="wrap_content"/> | 359 | <TextView |
358 | </LinearLayout> | 360 | android:text="整体掌握程度" |
359 | <TextView | 361 | android:textSize="10sp" |
360 | android:text="整体掌握程度" | 362 | android:textColor="#333" |
361 | android:textSize="10sp" | 363 | android:textStyle="bold" |
362 | android:textColor="#333" | 364 | android:layout_marginTop="-2dp" |
363 | android:textStyle="bold" | 365 | android:layout_width="wrap_content" |
364 | android:layout_marginTop="-2dp" | 366 | android:layout_height="wrap_content"/> |
365 | android:layout_width="wrap_content" | 367 | </LinearLayout> |
366 | android:layout_height="wrap_content"/> | 368 | </FrameLayout> |
367 | </LinearLayout> | 369 | </LinearLayout> |
368 | </FrameLayout> | 370 | </LinearLayout> |
369 | </LinearLayout> | 371 | |
370 | </LinearLayout> | 372 | <FrameLayout |
371 | 373 | android:layout_marginTop="20dp" | |
372 | <FrameLayout | 374 | android:layout_width="match_parent" |
373 | android:layout_marginTop="20dp" | 375 | android:layout_height="wrap_content"> |
374 | android:layout_width="match_parent" | 376 | <ImageView |
375 | android:layout_height="wrap_content"> | 377 | android:src="@drawable/png_hy_weak_comment" |
376 | <ImageView | 378 | android:layout_width="16dp" |
377 | android:src="@drawable/png_hy_weak_comment" | 379 | android:layout_height="18dp"/> |
378 | android:layout_width="16dp" | 380 | <TextView |
379 | android:layout_height="18dp"/> | 381 | android:id="@+id/tvWeakRate" |
380 | <TextView | 382 | android:textSize="16sp" |
381 | android:id="@+id/tvWeakRate" | 383 | android:textColor="#333" |
382 | android:textSize="16sp" | 384 | android:lineSpacingMultiplier="1.3" |
383 | android:textColor="#333" | 385 | android:layout_width="wrap_content" |
384 | android:lineSpacingMultiplier="1.3" | 386 | android:layout_height="wrap_content"/> |
385 | android:layout_width="wrap_content" | 387 | </FrameLayout> |
386 | android:layout_height="wrap_content"/> | 388 | </LinearLayout> |
387 | </FrameLayout> | 389 | |
388 | </LinearLayout> | 390 | <LinearLayout |
389 | 391 | android:orientation="vertical" | |
390 | <LinearLayout | 392 | android:background="@drawable/shape_radius_10" |
391 | android:orientation="vertical" | 393 | android:backgroundTint="@color/white" |
392 | android:background="@drawable/shape_radius_10" | 394 | android:padding="16dp" |
393 | android:backgroundTint="@color/white" | 395 | android:layout_marginHorizontal="16dp" |
394 | android:padding="16dp" | 396 | android:layout_marginTop="12dp" |
395 | android:layout_marginHorizontal="16dp" | 397 | android:layout_width="match_parent" |
396 | android:layout_marginTop="12dp" | 398 | android:layout_height="wrap_content"> |
397 | android:layout_width="match_parent" | 399 | |
398 | android:layout_height="wrap_content"> | 400 | <TextView |
399 | 401 | android:text="作业概括" | |
400 | <TextView | 402 | android:textSize="16sp" |
401 | android:text="作业概括" | 403 | android:textColor="#333333" |
402 | android:textSize="16sp" | 404 | android:textStyle="bold" |
403 | android:textColor="#333333" | 405 | android:background="@drawable/bg_hy_summary_title" |
404 | android:textStyle="bold" | 406 | android:paddingStart="28dp" |
405 | android:background="@drawable/bg_hy_summary_title" | 407 | android:paddingEnd="4dp" |
406 | android:paddingStart="28dp" | 408 | android:layout_gravity="center_horizontal" |
407 | android:paddingEnd="4dp" | 409 | android:layout_width="wrap_content" |
408 | android:layout_gravity="center_horizontal" | 410 | android:layout_height="wrap_content"/> |
409 | android:layout_width="wrap_content" | 411 | <LinearLayout |
410 | android:layout_height="wrap_content"/> | 412 | android:orientation="horizontal" |
411 | <LinearLayout | 413 | android:background="@drawable/shape_radius_5" |
412 | android:orientation="horizontal" | 414 | android:backgroundTint="#F4FAFF" |
413 | android:background="@drawable/shape_radius_5" | 415 | android:layout_width="match_parent" |
414 | android:backgroundTint="#F4FAFF" | 416 | android:layout_height="80dp" |
415 | android:layout_width="match_parent" | 417 | android:layout_marginTop="16dp"> |
416 | android:layout_height="80dp" | 418 | <LinearLayout |
417 | android:layout_marginTop="16dp"> | 419 | android:orientation="vertical" |
418 | <LinearLayout | 420 | android:gravity="center" |
419 | android:orientation="vertical" | 421 | android:layout_width="0dp" |
420 | android:gravity="center" | 422 | android:layout_height="match_parent" |
421 | android:layout_width="0dp" | 423 | android:layout_weight="1.1"> |
422 | android:layout_height="match_parent" | 424 | <LinearLayout |
423 | android:layout_weight="1.1"> | 425 | android:orientation="horizontal" |
424 | <LinearLayout | 426 | android:gravity="center_vertical" |
425 | android:orientation="horizontal" | 427 | android:layout_width="wrap_content" |
426 | android:gravity="center_vertical" | 428 | android:layout_height="wrap_content"> |
427 | android:layout_width="wrap_content" | 429 | <ImageView |
428 | android:layout_height="wrap_content"> | 430 | android:src="@drawable/png_icon_statistical_accuracy" |
429 | <ImageView | 431 | android:layout_width="12dp" |
430 | android:src="@drawable/png_icon_statistical_accuracy" | 432 | android:layout_height="13dp"/> |
431 | android:layout_width="12dp" | 433 | <TextView |
432 | android:layout_height="13dp"/> | 434 | android:text="作业正确率" |
433 | <TextView | 435 | android:textSize="11sp" |
434 | android:text="作业正确率" | 436 | android:textColor="#333" |
435 | android:textSize="11sp" | 437 | android:textStyle="bold" |
436 | android:textColor="#333" | 438 | android:layout_marginStart="4dp" |
437 | android:textStyle="bold" | 439 | android:layout_width="wrap_content" |
438 | android:layout_marginStart="4dp" | 440 | android:layout_height="wrap_content"/> |
439 | android:layout_width="wrap_content" | 441 | </LinearLayout> |
440 | android:layout_height="wrap_content"/> | 442 | <LinearLayout |
441 | </LinearLayout> | 443 | android:orientation="horizontal" |
442 | <LinearLayout | 444 | android:layout_marginTop="8dp" |
443 | android:orientation="horizontal" | 445 | android:layout_width="wrap_content" |
444 | android:layout_marginTop="8dp" | 446 | android:layout_height="wrap_content"> |
445 | android:layout_width="wrap_content" | 447 | <TextView |
446 | android:layout_height="wrap_content"> | 448 | android:id="@+id/tvTotalRate" |
447 | <TextView | 449 | tools:text="88" |
448 | android:id="@+id/tvTotalRate" | 450 | android:textSize="14sp" |
449 | tools:text="88" | 451 | android:textColor="#3BC3B6" |
450 | android:textSize="14sp" | 452 | android:textStyle="bold" |
451 | android:textColor="#3BC3B6" | 453 | android:layout_width="wrap_content" |
452 | android:textStyle="bold" | 454 | android:layout_height="wrap_content"/> |
453 | android:layout_width="wrap_content" | 455 | <TextView |
454 | android:layout_height="wrap_content"/> | 456 | android:text="%" |
455 | <TextView | 457 | android:textSize="9sp" |
456 | android:text="%" | 458 | android:textColor="#3BC3B6" |
457 | android:textSize="9sp" | 459 | android:textStyle="bold" |
458 | android:textColor="#3BC3B6" | 460 | android:layout_width="wrap_content" |
459 | android:textStyle="bold" | 461 | android:layout_height="wrap_content"/> |
460 | android:layout_width="wrap_content" | 462 | </LinearLayout> |
461 | android:layout_height="wrap_content"/> | 463 | </LinearLayout> |
462 | </LinearLayout> | ||
463 | </LinearLayout> | ||
464 | <LinearLayout | ||
465 | android:orientation="vertical" | ||
466 | android:gravity="center" | ||
467 | android:layout_width="0dp" | 464 | <LinearLayout |
468 | android:layout_height="match_parent" | 465 | android:orientation="vertical" |
469 | android:layout_weight="1"> | 466 | android:gravity="center" |
470 | <LinearLayout | 467 | android:layout_width="0dp" |
471 | android:orientation="horizontal" | 468 | android:layout_height="match_parent" |
472 | android:gravity="center_vertical" | 469 | android:layout_weight="1"> |
473 | android:layout_width="wrap_content" | 470 | <LinearLayout |
474 | android:layout_height="wrap_content"> | 471 | android:orientation="horizontal" |
475 | <ImageView | 472 | android:gravity="center_vertical" |
476 | android:src="@drawable/png_icon_statistical_correct" | 473 | android:layout_width="wrap_content" |
477 | android:layout_width="12dp" | 474 | android:layout_height="wrap_content"> |
478 | android:layout_height="13dp"/> | 475 | <ImageView |
479 | <TextView | 476 | android:src="@drawable/png_icon_statistical_correct" |
480 | android:text="答对题数" | 477 | android:layout_width="12dp" |
481 | android:textSize="11sp" | 478 | android:layout_height="13dp"/> |
482 | android:textColor="#333" | 479 | <TextView |
483 | android:textStyle="bold" | 480 | android:text="答对题数" |
484 | android:layout_marginStart="4dp" | 481 | android:textSize="11sp" |
485 | android:layout_width="wrap_content" | 482 | android:textColor="#333" |
486 | android:layout_height="wrap_content"/> | 483 | android:textStyle="bold" |
487 | </LinearLayout> | 484 | android:layout_marginStart="4dp" |
488 | <LinearLayout | 485 | android:layout_width="wrap_content" |
489 | android:orientation="horizontal" | 486 | android:layout_height="wrap_content"/> |
490 | android:layout_marginTop="8dp" | 487 | </LinearLayout> |
491 | android:layout_width="wrap_content" | 488 | <LinearLayout |
492 | android:layout_height="wrap_content"> | 489 | android:orientation="horizontal" |
493 | <TextView | 490 | android:layout_marginTop="8dp" |
494 | android:id="@+id/tvTotalCorrect" | 491 | android:layout_width="wrap_content" |
495 | tools:text="88" | 492 | android:layout_height="wrap_content"> |
496 | android:textSize="14sp" | 493 | <TextView |
497 | android:textColor="#3BC3B6" | 494 | android:id="@+id/tvTotalCorrect" |
498 | android:textStyle="bold" | 495 | tools:text="88" |
499 | android:layout_width="wrap_content" | 496 | android:textSize="14sp" |
500 | android:layout_height="wrap_content"/> | 497 | android:textColor="#3BC3B6" |
501 | <TextView | 498 | android:textStyle="bold" |
502 | android:text="道" | 499 | android:layout_width="wrap_content" |
503 | android:textSize="9sp" | 500 | android:layout_height="wrap_content"/> |
504 | android:textColor="#3BC3B6" | 501 | <TextView |
505 | android:textStyle="bold" | 502 | android:text="道" |
506 | android:layout_width="wrap_content" | 503 | android:textSize="9sp" |
507 | android:layout_height="wrap_content"/> | 504 | android:textColor="#3BC3B6" |
508 | </LinearLayout> | 505 | android:textStyle="bold" |
509 | </LinearLayout> | 506 | android:layout_width="wrap_content" |
510 | <LinearLayout | 507 | android:layout_height="wrap_content"/> |
511 | android:orientation="vertical" | 508 | </LinearLayout> |
512 | android:gravity="center" | 509 | </LinearLayout> |
513 | android:layout_width="0dp" | ||
514 | android:layout_height="match_parent" | ||
515 | android:layout_weight="1"> | ||
516 | <LinearLayout | ||
517 | android:orientation="horizontal" | ||
518 | android:gravity="center_vertical" | 510 | <LinearLayout |
519 | android:layout_width="wrap_content" | 511 | android:orientation="vertical" |
520 | android:layout_height="wrap_content"> | 512 | android:gravity="center" |
521 | <ImageView | 513 | android:layout_width="0dp" |
522 | android:src="@drawable/png_icon_statistical_error" | 514 | android:layout_height="match_parent" |
523 | android:layout_width="12dp" | 515 | android:layout_weight="1"> |
524 | android:layout_height="13dp"/> | 516 | <LinearLayout |
525 | <TextView | 517 | android:orientation="horizontal" |
526 | android:text="答错题数" | 518 | android:gravity="center_vertical" |
527 | android:textSize="11sp" | 519 | android:layout_width="wrap_content" |
528 | android:textColor="#333" | 520 | android:layout_height="wrap_content"> |
529 | android:textStyle="bold" | 521 | <ImageView |
530 | android:layout_marginStart="4dp" | 522 | android:src="@drawable/png_icon_statistical_error" |
531 | android:layout_width="wrap_content" | 523 | android:layout_width="12dp" |
532 | android:layout_height="wrap_content"/> | 524 | android:layout_height="13dp"/> |
533 | </LinearLayout> | 525 | <TextView |
534 | <LinearLayout | 526 | android:text="答错题数" |
535 | android:orientation="horizontal" | 527 | android:textSize="11sp" |
536 | android:layout_marginTop="8dp" | 528 | android:textColor="#333" |
537 | android:layout_width="wrap_content" | 529 | android:textStyle="bold" |
538 | android:layout_height="wrap_content"> | 530 | android:layout_marginStart="4dp" |
539 | <TextView | 531 | android:layout_width="wrap_content" |
540 | android:id="@+id/tvTotalError" | 532 | android:layout_height="wrap_content"/> |
541 | tools:text="88" | 533 | </LinearLayout> |
542 | android:textSize="14sp" | 534 | <LinearLayout |
543 | android:textColor="#3BC3B6" | 535 | android:orientation="horizontal" |
544 | android:textStyle="bold" | 536 | android:layout_marginTop="8dp" |
545 | android:layout_width="wrap_content" | 537 | android:layout_width="wrap_content" |
546 | android:layout_height="wrap_content"/> | 538 | android:layout_height="wrap_content"> |
547 | <TextView | 539 | <TextView |
548 | android:text="道" | 540 | android:id="@+id/tvTotalError" |
549 | android:textSize="9sp" | 541 | tools:text="88" |
550 | android:textColor="#3BC3B6" | 542 | android:textSize="14sp" |
551 | android:textStyle="bold" | 543 | android:textColor="#3BC3B6" |
552 | android:layout_width="wrap_content" | 544 | android:textStyle="bold" |
553 | android:layout_height="wrap_content"/> | 545 | android:layout_width="wrap_content" |
554 | </LinearLayout> | 546 | android:layout_height="wrap_content"/> |
555 | </LinearLayout> | 547 | <TextView |
556 | <LinearLayout | 548 | android:text="道" |
557 | android:orientation="vertical" | 549 | android:textSize="9sp" |
558 | android:gravity="center" | 550 | android:textColor="#3BC3B6" |
559 | android:layout_width="0dp" | 551 | android:textStyle="bold" |
560 | android:layout_height="match_parent" | 552 | android:layout_width="wrap_content" |
561 | android:layout_weight="1"> | 553 | android:layout_height="wrap_content"/> |
562 | <LinearLayout | 554 | </LinearLayout> |
563 | android:orientation="horizontal" | 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 | android:gravity="center_vertical" | 602 | </LinearLayout> |
565 | android:layout_width="wrap_content" | 603 | |
566 | android:layout_height="wrap_content"> | 604 | <TextView |
567 | <ImageView | 605 | android:text="每日作业正确率" |
568 | android:src="@drawable/png_icon_daily_blank" | 606 | android:textSize="13sp" |
569 | android:layout_width="12dp" | 607 | android:textColor="#333" |
570 | android:layout_height="13dp"/> | 608 | android:textStyle="bold" |
571 | <TextView | 609 | android:layout_gravity="center_horizontal" |
572 | android:text="未做题数" | 610 | android:layout_marginTop="16dp" |
573 | android:textSize="11sp" | 611 | android:layout_width="wrap_content" |
574 | android:textColor="#333" | 612 | android:layout_height="wrap_content"/> |
575 | android:textStyle="bold" | 613 | <com.github.mikephil.charting.charts.LineChart |
576 | android:layout_marginStart="4dp" | 614 | android:id="@+id/lineChart" |
577 | android:layout_width="wrap_content" | 615 | android:layout_marginStart="-8dp" |
578 | android:layout_height="wrap_content"/> | 616 | android:layout_width="match_parent" |
579 | </LinearLayout> | 617 | android:layout_height="220dp"/> |
580 | <LinearLayout | 618 | <FrameLayout |
581 | android:orientation="horizontal" | 619 | android:layout_marginVertical="20dp" |
582 | android:layout_marginTop="8dp" | 620 | android:layout_width="match_parent" |
583 | android:layout_width="wrap_content" | 621 | android:layout_height="wrap_content"> |
584 | android:layout_height="wrap_content"> | 622 | <ImageView |
585 | <TextView | 623 | android:src="@drawable/png_hy_summary_comment" |
586 | android:id="@+id/tvTotalBlank" | 624 | android:layout_width="22dp" |
587 | tools:text="88" | 625 | android:layout_height="22dp"/> |
588 | android:textSize="14sp" | 626 | <TextView |
589 | android:textColor="#3BC3B6" | 627 | android:id="@+id/tvRating" |
590 | android:textStyle="bold" | 628 | android:textSize="16sp" |
591 | android:layout_width="wrap_content" | 629 | android:textColor="#333" |
592 | android:layout_height="wrap_content"/> | 630 | android:lineSpacingMultiplier="1.3" |
593 | <TextView | 631 | android:layout_marginTop="2dp" |
594 | android:text="道" | 632 | android:layout_width="match_parent" |
595 | android:textSize="9sp" | 633 | android:layout_height="wrap_content"/> |
596 | android:textColor="#3BC3B6" | 634 | </FrameLayout> |
597 | android:textStyle="bold" | 635 | </LinearLayout> |
598 | android:layout_width="wrap_content" | 636 | |
599 | android:layout_height="wrap_content"/> | 637 | <Space |
600 | </LinearLayout> | 638 | android:id="@+id/splitLine" |
601 | </LinearLayout> | 639 | android:layout_marginTop="6dp" |
602 | </LinearLayout> | 640 | android:layout_width="match_parent" |
603 | 641 | android:layout_height="0dp"/> | |
604 | <TextView | 642 | |
605 | android:text="每日作业正确率" | 643 | <LinearLayout |
606 | android:textSize="13sp" | 644 | android:orientation="vertical" |
607 | android:textColor="#333" | 645 | android:background="@drawable/shape_radius_10" |
608 | android:textStyle="bold" | 646 | android:backgroundTint="@color/white" |
609 | android:layout_gravity="center_horizontal" | 647 | android:padding="16dp" |
610 | android:layout_marginTop="16dp" | 648 | android:layout_marginHorizontal="16dp" |
611 | android:layout_width="wrap_content" | 649 | android:layout_marginTop="6dp" |
612 | android:layout_height="wrap_content"/> | 650 | android:layout_width="match_parent" |
613 | <com.github.mikephil.charting.charts.LineChart | 651 | android:layout_height="wrap_content"> |
614 | android:id="@+id/lineChart" | 652 | <TextView |
615 | android:layout_marginStart="-8dp" | 653 | android:text="知识点掌握情况" |
616 | android:layout_width="match_parent" | 654 | android:textSize="16sp" |
617 | android:layout_height="220dp"/> | 655 | android:textColor="#333333" |
618 | <FrameLayout | 656 | android:textStyle="bold" |
619 | android:layout_marginVertical="20dp" | 657 | android:background="@drawable/bg_hy_point_title" |
620 | android:layout_width="match_parent" | 658 | android:paddingStart="28dp" |
621 | android:layout_height="wrap_content"> | 659 | android:paddingEnd="4dp" |
622 | <ImageView | 660 | android:layout_gravity="center_horizontal" |
623 | android:src="@drawable/png_hy_summary_comment" | 661 | android:layout_width="wrap_content" |
624 | android:layout_width="22dp" | 662 | android:layout_height="wrap_content"/> |
625 | android:layout_height="22dp"/> | 663 | |
626 | <TextView | 664 | <LinearLayout |
627 | android:id="@+id/tvRating" | 665 | android:orientation="horizontal" |
628 | android:textSize="16sp" | 666 | android:layout_width="match_parent" |
629 | android:textColor="#333" | 667 | android:layout_height="120dp" |
630 | android:lineSpacingMultiplier="1.3" | 668 | android:layout_marginTop="20dp"> |
631 | android:layout_marginTop="2dp" | 669 | <LinearLayout |
632 | android:layout_width="match_parent" | 670 | android:orientation="vertical" |
633 | android:layout_height="wrap_content"/> | 671 | android:background="@drawable/shape_radius_10" |
634 | </FrameLayout> | 672 | android:backgroundTint="#F4FAFF" |
635 | </LinearLayout> | 673 | android:gravity="center_horizontal" |
636 | 674 | android:paddingTop="10dp" | |
637 | <Space | 675 | android:layout_width="0dp" |
638 | android:id="@+id/splitLine" | 676 | android:layout_height="match_parent" |
639 | android:layout_marginTop="6dp" | 677 | android:layout_weight="1"> |
640 | android:layout_width="match_parent" | 678 | <ImageView |
641 | android:layout_height="0dp"/> | 679 | android:src="@drawable/png_ic_excellent" |
642 | 680 | android:backgroundTint="#3BC3B6" | |
643 | <LinearLayout | 681 | android:background="@drawable/bg_circle" |
644 | android:orientation="vertical" | 682 | android:padding="8dp" |
645 | android:background="@drawable/shape_radius_10" | 683 | android:layout_width="40dp" |
646 | android:backgroundTint="@color/white" | 684 | android:layout_height="40dp"/> |
647 | android:padding="16dp" | 685 | <TextView |
648 | android:layout_marginHorizontal="16dp" | 686 | android:id="@+id/tvExcellent" |
649 | android:layout_marginTop="6dp" | 687 | android:text="-" |
650 | android:layout_width="match_parent" | 688 | android:textColor="#3BC3B6" |
651 | android:layout_height="wrap_content"> | 689 | android:textSize="25sp" |
652 | <TextView | 690 | android:textStyle="bold" |
653 | android:text="知识点掌握情况" | 691 | android:layout_marginTop="4dp" |
654 | android:textSize="16sp" | 692 | android:layout_width="wrap_content" |
655 | android:textColor="#333333" | 693 | android:layout_height="wrap_content"/> |
656 | android:textStyle="bold" | 694 | <TextView |
657 | android:background="@drawable/bg_hy_point_title" | 695 | android:text="掌握优秀" |
658 | android:paddingStart="28dp" | 696 | android:textSize="15sp" |
659 | android:paddingEnd="4dp" | 697 | android:textColor="#333" |
660 | android:layout_gravity="center_horizontal" | 698 | android:textStyle="bold" |
661 | android:layout_width="wrap_content" | 699 | android:layout_width="wrap_content" |
662 | android:layout_height="wrap_content"/> | 700 | android:layout_height="wrap_content"/> |
663 | 701 | </LinearLayout> | |
664 | <LinearLayout | 702 | <LinearLayout |
665 | android:orientation="horizontal" | 703 | android:orientation="vertical" |
666 | android:layout_width="match_parent" | 704 | android:background="@drawable/shape_radius_10" |
667 | android:layout_height="120dp" | 705 | android:backgroundTint="#F4FAFF" |
668 | android:layout_marginTop="20dp"> | 706 | android:gravity="center_horizontal" |
669 | <LinearLayout | 707 | android:paddingTop="10dp" |
670 | android:orientation="vertical" | 708 | android:layout_marginStart="14dp" |
671 | android:background="@drawable/shape_radius_10" | 709 | android:layout_width="0dp" |
672 | android:backgroundTint="#F4FAFF" | 710 | android:layout_height="match_parent" |
673 | android:gravity="center_horizontal" | 711 | android:layout_weight="1"> |
674 | android:paddingTop="10dp" | 712 | <ImageView |
675 | android:layout_width="0dp" | 713 | android:src="@drawable/png_ic_good" |
676 | android:layout_height="match_parent" | 714 | android:backgroundTint="#489AFA" |
677 | android:layout_weight="1"> | 715 | android:background="@drawable/bg_circle" |
678 | <ImageView | 716 | android:padding="8dp" |
679 | android:src="@drawable/png_ic_excellent" | 717 | android:layout_width="40dp" |
680 | android:backgroundTint="#3BC3B6" | 718 | android:layout_height="40dp"/> |
681 | android:background="@drawable/bg_circle" | 719 | <TextView |
682 | android:padding="8dp" | 720 | android:id="@+id/tvGood" |
683 | android:layout_width="40dp" | 721 | android:text="-" |
684 | android:layout_height="40dp"/> | 722 | android:textColor="#489AFA" |
685 | <TextView | 723 | android:textSize="25sp" |
686 | android:id="@+id/tvExcellent" | 724 | android:textStyle="bold" |
687 | android:text="-" | 725 | android:layout_marginTop="4dp" |
688 | android:textColor="#3BC3B6" | 726 | android:layout_width="wrap_content" |
689 | android:textSize="25sp" | 727 | android:layout_height="wrap_content"/> |
690 | android:textStyle="bold" | 728 | <TextView |
691 | android:layout_marginTop="4dp" | 729 | android:text="掌握良好" |
692 | android:layout_width="wrap_content" | 730 | android:textSize="15sp" |
693 | android:layout_height="wrap_content"/> | 731 | android:textColor="#333" |
694 | <TextView | 732 | android:textStyle="bold" |
695 | android:text="掌握优秀" | 733 | android:layout_width="wrap_content" |
696 | android:textSize="15sp" | 734 | android:layout_height="wrap_content"/> |
697 | android:textColor="#333" | 735 | </LinearLayout> |
698 | android:textStyle="bold" | 736 | <LinearLayout |
699 | android:layout_width="wrap_content" | 737 | android:orientation="vertical" |
700 | android:layout_height="wrap_content"/> | 738 | android:background="@drawable/shape_radius_10" |
701 | </LinearLayout> | 739 | android:backgroundTint="#F4FAFF" |
702 | <LinearLayout | 740 | android:gravity="center_horizontal" |
703 | android:orientation="vertical" | 741 | android:paddingTop="10dp" |
704 | android:background="@drawable/shape_radius_10" | 742 | android:layout_marginStart="14dp" |
705 | android:backgroundTint="#F4FAFF" | 743 | android:layout_width="0dp" |
706 | android:gravity="center_horizontal" | 744 | android:layout_height="match_parent" |
707 | android:paddingTop="10dp" | 745 | android:layout_weight="1"> |
708 | android:layout_marginStart="14dp" | 746 | <ImageView |
709 | android:layout_width="0dp" | 747 | android:src="@drawable/png_ic_normal" |
710 | android:layout_height="match_parent" | 748 | android:backgroundTint="#F58725" |
711 | android:layout_weight="1"> | 749 | android:background="@drawable/bg_circle" |
712 | <ImageView | 750 | android:padding="8dp" |
713 | android:src="@drawable/png_ic_good" | 751 | android:layout_width="40dp" |
714 | android:backgroundTint="#489AFA" | 752 | android:layout_height="40dp"/> |
715 | android:background="@drawable/bg_circle" | 753 | <TextView |
716 | android:padding="8dp" | 754 | android:id="@+id/tvNormal" |
717 | android:layout_width="40dp" | 755 | android:text="-" |
718 | android:layout_height="40dp"/> | 756 | android:textColor="#F58725" |
719 | <TextView | 757 | android:textSize="25sp" |
720 | android:id="@+id/tvGood" | 758 | android:textStyle="bold" |
721 | android:text="-" | 759 | android:layout_marginTop="4dp" |
722 | android:textColor="#489AFA" | 760 | android:layout_width="wrap_content" |
723 | android:textSize="25sp" | 761 | android:layout_height="wrap_content"/> |
724 | android:textStyle="bold" | 762 | <TextView |
725 | android:layout_marginTop="4dp" | 763 | android:text="掌握一般" |
726 | android:layout_width="wrap_content" | 764 | android:textSize="15sp" |
727 | android:layout_height="wrap_content"/> | 765 | android:textColor="#333" |
728 | <TextView | 766 | android:textStyle="bold" |
729 | android:text="掌握良好" | 767 | android:layout_width="wrap_content" |
730 | android:textSize="15sp" | 768 | android:layout_height="wrap_content"/> |
731 | android:textColor="#333" | 769 | </LinearLayout> |
732 | android:textStyle="bold" | 770 | <LinearLayout |
733 | android:layout_width="wrap_content" | 771 | android:orientation="vertical" |
734 | android:layout_height="wrap_content"/> | 772 | android:background="@drawable/shape_radius_10" |
735 | </LinearLayout> | 773 | android:backgroundTint="#F4FAFF" |
736 | <LinearLayout | 774 | android:gravity="center_horizontal" |
737 | android:orientation="vertical" | 775 | android:paddingTop="10dp" |
738 | android:background="@drawable/shape_radius_10" | 776 | android:layout_marginStart="14dp" |
739 | android:backgroundTint="#F4FAFF" | 777 | android:layout_width="0dp" |
740 | android:gravity="center_horizontal" | 778 | android:layout_height="match_parent" |
741 | android:paddingTop="10dp" | 779 | android:layout_weight="1"> |
742 | android:layout_marginStart="14dp" | 780 | <ImageView |
743 | android:layout_width="0dp" | 781 | android:src="@drawable/png_ic_weak" |
744 | android:layout_height="match_parent" | 782 | android:backgroundTint="#EA5127" |
745 | android:layout_weight="1"> | 783 | android:background="@drawable/bg_circle" |
746 | <ImageView | 784 | android:padding="8dp" |
747 | android:src="@drawable/png_ic_normal" | 785 | android:layout_width="40dp" |
748 | android:backgroundTint="#F58725" | 786 | android:layout_height="40dp"/> |
749 | android:background="@drawable/bg_circle" | 787 | <TextView |
750 | android:padding="8dp" | 788 | android:id="@+id/tvWeak" |
751 | android:layout_width="40dp" | 789 | android:text="-" |
752 | android:layout_height="40dp"/> | 790 | android:textColor="#EA5127" |
753 | <TextView | 791 | android:textSize="25sp" |
754 | android:id="@+id/tvNormal" | 792 | android:textStyle="bold" |
755 | android:text="-" | 793 | android:layout_marginTop="4dp" |
756 | android:textColor="#F58725" | 794 | android:layout_width="wrap_content" |
757 | android:textSize="25sp" | 795 | android:layout_height="wrap_content"/> |
758 | android:textStyle="bold" | 796 | <TextView |
759 | android:layout_marginTop="4dp" | 797 | android:text="掌握薄弱" |
760 | android:layout_width="wrap_content" | 798 | android:textSize="15sp" |
761 | android:layout_height="wrap_content"/> | 799 | android:textColor="#333" |
762 | <TextView | 800 | android:textStyle="bold" |
763 | android:text="掌握一般" | 801 | android:layout_width="wrap_content" |
764 | android:textSize="15sp" | 802 | android:layout_height="wrap_content"/> |
765 | android:textColor="#333" | 803 | </LinearLayout> |
766 | android:textStyle="bold" | 804 | </LinearLayout> |
767 | android:layout_width="wrap_content" | 805 | |
768 | android:layout_height="wrap_content"/> | 806 | <FrameLayout |
769 | </LinearLayout> | 807 | android:layout_gravity="center_horizontal" |
770 | <LinearLayout | 808 | android:layout_marginTop="20dp" |
771 | android:orientation="vertical" | 809 | android:layout_width="180dp" |
772 | android:background="@drawable/shape_radius_10" | 810 | android:layout_height="180dp"> |
773 | android:backgroundTint="#F4FAFF" | 811 | <com.littlejie.circleprogress.CircleProgress |
774 | android:gravity="center_horizontal" | 812 | android:id="@+id/cpBase" |
775 | android:paddingTop="10dp" | 813 | app:value="0" |
776 | android:layout_marginStart="14dp" | 814 | app:arcWidth="35dp" |
777 | android:layout_width="0dp" | 815 | app:bgArcWidth="35dp" |
778 | android:layout_height="match_parent" | 816 | app:bgArcColor="#3BC3B6" |
779 | android:layout_weight="1"> | 817 | app:startAngle="0" |
780 | <ImageView | 818 | app:sweepAngle="360" |
781 | android:src="@drawable/png_ic_weak" | 819 | app:hintColor="@color/transparent" |
782 | android:backgroundTint="#EA5127" | 820 | app:unitColor="@color/transparent" |
783 | android:background="@drawable/bg_circle" | 821 | app:valueColor="@color/transparent" |
784 | android:padding="8dp" | 822 | android:layout_width="match_parent" |
785 | android:layout_width="40dp" | 823 | android:layout_height="match_parent"/> |
786 | android:layout_height="40dp"/> | 824 | <com.littlejie.circleprogress.CircleProgress |
787 | <TextView | 825 | android:id="@+id/cpGood" |
788 | android:id="@+id/tvWeak" | 826 | app:value="0" |
789 | android:text="-" | 827 | app:arcWidth="35dp" |
790 | android:textColor="#EA5127" | 828 | app:bgArcWidth="35dp" |
791 | android:textSize="25sp" | 829 | app:arcColors="#489AFA" |
792 | android:textStyle="bold" | 830 | app:bgArcColor="@color/transparent" |
793 | android:layout_marginTop="4dp" | 831 | app:startAngle="0" |
794 | android:layout_width="wrap_content" | 832 | app:sweepAngle="360" |
795 | android:layout_height="wrap_content"/> | 833 | app:hintColor="@color/transparent" |
796 | <TextView | 834 | app:unitColor="@color/transparent" |
797 | android:text="掌握薄弱" | 835 | app:valueColor="@color/transparent" |
798 | android:textSize="15sp" | 836 | android:layout_width="match_parent" |
799 | android:textColor="#333" | 837 | android:layout_height="match_parent"/> |
800 | android:textStyle="bold" | 838 | <com.littlejie.circleprogress.CircleProgress |
801 | android:layout_width="wrap_content" | 839 | android:id="@+id/cpNormal" |
802 | android:layout_height="wrap_content"/> | 840 | app:value="0" |
803 | </LinearLayout> | 841 | app:arcWidth="35dp" |
804 | </LinearLayout> | 842 | app:bgArcWidth="35dp" |
805 | 843 | app:arcColors="#F58725" | |
806 | <FrameLayout | 844 | app:bgArcColor="@color/transparent" |
807 | android:layout_gravity="center_horizontal" | 845 | app:startAngle="0" |
808 | android:layout_marginTop="20dp" | 846 | app:sweepAngle="360" |
809 | android:layout_width="180dp" | 847 | app:hintColor="@color/transparent" |
810 | android:layout_height="180dp"> | 848 | app:unitColor="@color/transparent" |
811 | <com.littlejie.circleprogress.CircleProgress | 849 | app:valueColor="@color/transparent" |
812 | android:id="@+id/cpBase" | 850 | android:layout_width="match_parent" |
813 | app:value="0" | 851 | android:layout_height="match_parent"/> |
814 | app:arcWidth="35dp" | 852 | <com.littlejie.circleprogress.CircleProgress |
815 | app:bgArcWidth="35dp" | 853 | android:id="@+id/cpWeak" |
816 | app:bgArcColor="#3BC3B6" | 854 | app:value="0" |
817 | app:startAngle="0" | 855 | app:arcWidth="35dp" |
818 | app:sweepAngle="360" | 856 | app:bgArcWidth="35dp" |
819 | app:hintColor="@color/transparent" | 857 | app:arcColors="#EA5127" |
820 | app:unitColor="@color/transparent" | 858 | app:bgArcColor="@color/transparent" |
821 | app:valueColor="@color/transparent" | 859 | app:startAngle="0" |
822 | android:layout_width="match_parent" | 860 | app:sweepAngle="360" |
823 | android:layout_height="match_parent"/> | 861 | app:hintColor="@color/transparent" |
824 | <com.littlejie.circleprogress.CircleProgress | 862 | app:unitColor="@color/transparent" |
825 | android:id="@+id/cpGood" | 863 | app:valueColor="@color/transparent" |
826 | app:value="0" | 864 | android:layout_width="match_parent" |
827 | app:arcWidth="35dp" | 865 | android:layout_height="match_parent"/> |
828 | app:bgArcWidth="35dp" | 866 | |
829 | app:arcColors="#489AFA" | 867 | <LinearLayout |
830 | app:bgArcColor="@color/transparent" | 868 | android:orientation="vertical" |
831 | app:startAngle="0" | 869 | android:gravity="center_horizontal" |
832 | app:sweepAngle="360" | 870 | android:layout_gravity="center" |
833 | app:hintColor="@color/transparent" | 871 | android:layout_width="wrap_content" |
834 | app:unitColor="@color/transparent" | 872 | android:layout_height="wrap_content"> |
835 | app:valueColor="@color/transparent" | 873 | <LinearLayout |
836 | android:layout_width="match_parent" | 874 | android:layout_width="wrap_content" |
837 | android:layout_height="match_parent"/> | 875 | android:layout_height="wrap_content"> |
838 | <com.littlejie.circleprogress.CircleProgress | 876 | <TextView |
839 | android:id="@+id/cpNormal" | 877 | android:id="@+id/tvAvePoint" |
840 | app:value="0" | 878 | tools:text="88" |
841 | app:arcWidth="35dp" | 879 | android:textSize="25sp" |
842 | app:bgArcWidth="35dp" | 880 | android:textColor="#3BC3B6" |
843 | app:arcColors="#F58725" | 881 | android:textStyle="bold" |
844 | app:bgArcColor="@color/transparent" | 882 | android:layout_width="wrap_content" |
845 | app:startAngle="0" | 883 | android:layout_height="wrap_content"/> |
846 | app:sweepAngle="360" | 884 | <TextView |
847 | app:hintColor="@color/transparent" | 885 | android:text="%" |
848 | app:unitColor="@color/transparent" | 886 | android:textSize="12sp" |
849 | app:valueColor="@color/transparent" | 887 | android:textColor="#3BC3B6" |
850 | android:layout_width="match_parent" | 888 | android:layout_width="wrap_content" |
851 | android:layout_height="match_parent"/> | 889 | android:layout_height="wrap_content"/> |
852 | <com.littlejie.circleprogress.CircleProgress | 890 | </LinearLayout> |
853 | android:id="@+id/cpWeak" | 891 | <TextView |
854 | app:value="0" | 892 | android:text="综合掌握程度" |
855 | app:arcWidth="35dp" | 893 | android:textSize="10sp" |
856 | app:bgArcWidth="35dp" | 894 | android:textColor="#333" |
857 | app:arcColors="#EA5127" | 895 | android:textStyle="bold" |
858 | app:bgArcColor="@color/transparent" | 896 | android:layout_marginTop="-2dp" |
859 | app:startAngle="0" | 897 | android:layout_width="wrap_content" |
860 | app:sweepAngle="360" | 898 | android:layout_height="wrap_content"/> |
861 | app:hintColor="@color/transparent" | 899 | </LinearLayout> |
862 | app:unitColor="@color/transparent" | 900 | </FrameLayout> |
863 | app:valueColor="@color/transparent" | 901 | </LinearLayout> |
864 | android:layout_width="match_parent" | 902 | |
865 | android:layout_height="match_parent"/> | 903 | <LinearLayout |
904 | android:id="@+id/viewTable" | ||
866 | 905 | android:orientation="vertical" | |
867 | <LinearLayout | 906 | android:background="@drawable/shape_radius_10" |
868 | android:orientation="vertical" | 907 | android:backgroundTint="@color/white" |
869 | android:gravity="center_horizontal" | 908 | android:padding="16dp" |
870 | android:layout_gravity="center" | 909 | android:layout_marginHorizontal="16dp" |
871 | android:layout_width="wrap_content" | 910 | android:layout_marginTop="12dp" |
872 | android:layout_height="wrap_content"> | 911 | android:layout_width="match_parent" |
873 | <LinearLayout | 912 | android:layout_height="wrap_content"> |
874 | android:layout_width="wrap_content" | 913 | <TextView |
875 | android:layout_height="wrap_content"> | 914 | android:text="学习效果分析" |
876 | <TextView | 915 | android:textSize="16sp" |
877 | android:id="@+id/tvAvePoint" | 916 | android:textColor="#333333" |
878 | tools:text="88" | 917 | android:textStyle="bold" |
879 | android:textSize="25sp" | 918 | android:background="@drawable/bg_hy_analyse_title" |
880 | android:textColor="#3BC3B6" | 919 | android:paddingStart="24dp" |
881 | android:textStyle="bold" | 920 | android:paddingEnd="4dp" |
882 | android:layout_width="wrap_content" | 921 | android:layout_gravity="center_horizontal" |
883 | android:layout_height="wrap_content"/> | 922 | android:layout_width="wrap_content" |
884 | <TextView | 923 | android:layout_height="wrap_content"/> |
885 | android:text="%" | 924 | |
886 | android:textSize="12sp" | 925 | <LinearLayout |
887 | android:textColor="#3BC3B6" | 926 | android:id="@+id/flEmptyPoints" |
888 | android:layout_width="wrap_content" | 927 | android:visibility="gone" |
889 | android:layout_height="wrap_content"/> | 928 | android:orientation="vertical" |
890 | </LinearLayout> | 929 | android:gravity="center_horizontal" |
891 | <TextView | 930 | android:layout_marginTop="50dp" |
892 | android:text="综合掌握程度" | 931 | android:layout_width="match_parent" |
893 | android:textSize="10sp" | 932 | android:layout_height="wrap_content"> |
894 | android:textColor="#333" | 933 | <ImageView |
895 | android:textStyle="bold" | 934 | android:src="@drawable/png_huyou_points_empty" |
896 | android:layout_marginTop="-2dp" | 935 | android:layout_width="195dp" |
897 | android:layout_width="wrap_content" | 936 | android:layout_height="145dp"/> |
898 | android:layout_height="wrap_content"/> | 937 | <TextView |
899 | </LinearLayout> | 938 | android:text="你太棒了!" |
900 | </FrameLayout> | 939 | android:textSize="20sp" |
901 | </LinearLayout> | 940 | android:textColor="#999" |
902 | 941 | android:layout_marginVertical="16dp" | |
903 | <LinearLayout | 942 | android:layout_width="wrap_content" |
904 | android:id="@+id/viewTable" | 943 | android:layout_height="wrap_content"/> |
905 | android:orientation="vertical" | 944 | </LinearLayout> |
906 | android:background="@drawable/shape_radius_10" | 945 | |
907 | android:backgroundTint="@color/white" | 946 | <LinearLayout |
908 | android:padding="16dp" | 947 | android:id="@+id/tableRoot" |
909 | android:layout_marginHorizontal="16dp" | 948 | android:orientation="vertical" |
910 | android:layout_marginTop="12dp" | 949 | android:background="@drawable/bg_huyou_table_bg" |
911 | android:layout_width="match_parent" | 950 | android:layout_marginTop="16dp" |
912 | android:layout_height="wrap_content"> | 951 | android:layout_width="match_parent" |
913 | <TextView | 952 | android:layout_height="wrap_content"> |
914 | android:text="学习效果分析" | 953 | <LinearLayout |
915 | android:textSize="16sp" | 954 | android:orientation="horizontal" |
916 | android:textColor="#333333" | 955 | android:background="#50CEC2" |
917 | android:textStyle="bold" | 956 | android:layout_width="match_parent" |
918 | android:background="@drawable/bg_hy_analyse_title" | 957 | android:layout_height="60dp"> |
919 | android:paddingStart="24dp" | 958 | <TextView |
920 | android:paddingEnd="4dp" | 959 | android:text="知识点名称" |
921 | android:layout_gravity="center_horizontal" | 960 | android:textSize="13sp" |
922 | android:layout_width="wrap_content" | 961 | android:textColor="@color/white" |
923 | android:layout_height="wrap_content"/> | 962 | android:gravity="center" |
924 | 963 | android:layout_weight="82" | |
925 | <LinearLayout | 964 | android:layout_width="0dp" |
926 | android:id="@+id/flEmptyPoints" | 965 | android:layout_height="match_parent"/> |
927 | android:visibility="gone" | 966 | <View |
928 | android:orientation="vertical" | 967 | android:background="#38B3A7" |
929 | android:gravity="center_horizontal" | 968 | android:layout_width="1dp" |
930 | android:layout_marginTop="50dp" | 969 | android:layout_height="match_parent"/> |
931 | android:layout_width="match_parent" | 970 | |
932 | android:layout_height="wrap_content"> | 971 | <LinearLayout |
933 | <ImageView | 972 | android:orientation="vertical" |
934 | android:src="@drawable/png_huyou_points_empty" | 973 | android:layout_weight="72" |
935 | android:layout_width="195dp" | 974 | android:layout_width="0dp" |
936 | android:layout_height="145dp"/> | 975 | android:layout_height="match_parent"> |
937 | <TextView | 976 | <TextView |
938 | android:text="你太棒了!" | 977 | android:text="学前" |
939 | android:textSize="20sp" | 978 | android:textSize="13sp" |
940 | android:textColor="#999" | 979 | android:textColor="@color/white" |
941 | android:layout_marginVertical="16dp" | 980 | android:gravity="center" |
942 | android:layout_width="wrap_content" | 981 | android:layout_width="match_parent" |
943 | android:layout_height="wrap_content"/> | 982 | android:layout_height="24dp"/> |
944 | </LinearLayout> | 983 | <View |
945 | 984 | android:background="#38B3A7" | |
946 | <LinearLayout | 985 | android:layout_width="match_parent" |
947 | android:id="@+id/tableRoot" | 986 | android:layout_height="1dp"/> |
948 | android:orientation="vertical" | 987 | <LinearLayout |
949 | android:background="@drawable/bg_huyou_table_bg" | 988 | android:orientation="horizontal" |
950 | android:layout_marginTop="16dp" | 989 | android:layout_width="match_parent" |
951 | android:layout_width="match_parent" | 990 | android:layout_height="match_parent"> |
952 | android:layout_height="wrap_content"> | 991 | <TextView |
953 | <LinearLayout | 992 | android:text="程\n度" |
954 | android:orientation="horizontal" | 993 | android:textSize="13sp" |
955 | android:background="#50CEC2" | 994 | android:textColor="@color/white" |
956 | android:layout_width="match_parent" | 995 | android:gravity="center" |
957 | android:layout_height="60dp"> | 996 | android:layout_weight="1" |
958 | <TextView | 997 | android:layout_width="0dp" |
959 | android:text="知识点名称" | 998 | android:layout_height="wrap_content"/> |
960 | android:textSize="13sp" | 999 | <View |
961 | android:textColor="@color/white" | 1000 | android:background="#38B3A7" |
962 | android:gravity="center" | 1001 | android:layout_width="1dp" |
963 | android:layout_weight="82" | 1002 | android:layout_height="match_parent"/> |
964 | android:layout_width="0dp" | 1003 | <TextView |
965 | android:layout_height="match_parent"/> | 1004 | android:text="状\n态" |
966 | <View | 1005 | android:textSize="13sp" |
967 | android:background="#38B3A7" | 1006 | android:textColor="@color/white" |
968 | android:layout_width="1dp" | 1007 | android:gravity="center" |
969 | android:layout_height="match_parent"/> | 1008 | android:layout_weight="1" |
970 | 1009 | android:layout_width="0dp" | |
971 | <LinearLayout | 1010 | android:layout_height="wrap_content"/> |
972 | android:orientation="vertical" | 1011 | </LinearLayout> |
973 | android:layout_weight="72" | 1012 | </LinearLayout> |
974 | android:layout_width="0dp" | 1013 | |
975 | android:layout_height="match_parent"> | 1014 | <View |
976 | <TextView | 1015 | android:background="#38B3A7" |
977 | android:text="学前" | 1016 | android:layout_width="1dp" |
978 | android:textSize="13sp" | 1017 | android:layout_height="match_parent"/> |
979 | android:textColor="@color/white" | 1018 | |
980 | android:gravity="center" | 1019 | <LinearLayout |
981 | android:layout_width="match_parent" | 1020 | android:orientation="vertical" |
982 | android:layout_height="24dp"/> | 1021 | android:layout_weight="72" |
983 | <View | 1022 | android:layout_width="0dp" |
984 | android:background="#38B3A7" | 1023 | android:layout_height="match_parent"> |
985 | android:layout_width="match_parent" | 1024 | <TextView |
986 | android:layout_height="1dp"/> | 1025 | android:text="学后" |
987 | <LinearLayout | 1026 | android:textSize="13sp" |
988 | android:orientation="horizontal" | 1027 | android:textColor="@color/white" |
989 | android:layout_width="match_parent" | 1028 | android:gravity="center" |
990 | android:layout_height="match_parent"> | 1029 | android:layout_width="match_parent" |
991 | <TextView | 1030 | android:layout_height="24dp"/> |
992 | android:text="程\n度" | 1031 | <View |
993 | android:textSize="13sp" | 1032 | android:background="#38B3A7" |
994 | android:textColor="@color/white" | 1033 | android:layout_width="match_parent" |
995 | android:gravity="center" | 1034 | android:layout_height="1dp"/> |
996 | android:layout_weight="1" | 1035 | <LinearLayout |
997 | android:layout_width="0dp" | 1036 | android:orientation="horizontal" |
998 | android:layout_height="wrap_content"/> | 1037 | android:layout_width="match_parent" |
999 | <View | 1038 | android:layout_height="match_parent"> |
1000 | android:background="#38B3A7" | 1039 | <TextView |
1001 | android:layout_width="1dp" | 1040 | android:text="程\n度" |
1002 | android:layout_height="match_parent"/> | 1041 | android:textSize="13sp" |
1003 | <TextView | 1042 | android:textColor="@color/white" |
1004 | android:text="状\n态" | 1043 | android:gravity="center" |
1005 | android:textSize="13sp" | 1044 | android:layout_weight="1" |
1006 | android:textColor="@color/white" | 1045 | android:layout_width="0dp" |
1007 | android:gravity="center" | 1046 | android:layout_height="wrap_content"/> |
1008 | android:layout_weight="1" | 1047 | <View |
1009 | android:layout_width="0dp" | 1048 | android:background="#38B3A7" |
1010 | android:layout_height="wrap_content"/> | 1049 | android:layout_width="1dp" |
1011 | </LinearLayout> | 1050 | android:layout_height="match_parent"/> |
1012 | </LinearLayout> | 1051 | <TextView |
1013 | 1052 | android:text="状\n态" | |
1014 | <View | 1053 | android:textSize="13sp" |
1015 | android:background="#38B3A7" | 1054 | android:textColor="@color/white" |
1016 | android:layout_width="1dp" | 1055 | android:gravity="center" |
1017 | android:layout_height="match_parent"/> | 1056 | android:layout_weight="1" |
1018 | 1057 | android:layout_width="0dp" | |
1019 | <LinearLayout | 1058 | android:layout_height="wrap_content"/> |
1020 | android:orientation="vertical" | 1059 | </LinearLayout> |
1021 | android:layout_weight="72" | 1060 | |
1022 | android:layout_width="0dp" | 1061 | </LinearLayout> |
1023 | android:layout_height="match_parent"> | 1062 | |
1024 | <TextView | 1063 | <View |
1025 | android:text="学后" | 1064 | android:background="#38B3A7" |
1026 | android:textSize="13sp" | 1065 | android:layout_width="1dp" |
1027 | android:textColor="@color/white" | 1066 | android:layout_height="match_parent"/> |
1028 | android:gravity="center" | 1067 | <TextView |
1029 | android:layout_width="match_parent" | 1068 | android:text="进步\n幅度" |
1030 | android:layout_height="24dp"/> | 1069 | android:textSize="13sp" |
1031 | <View | 1070 | android:textColor="@color/white" |
1032 | android:background="#38B3A7" | 1071 | android:gravity="center" |
1033 | android:layout_width="match_parent" | 1072 | android:layout_weight="50" |
1034 | android:layout_height="1dp"/> | 1073 | android:layout_width="0dp" |
1035 | <LinearLayout | 1074 | android:layout_height="match_parent"/> |
1036 | android:orientation="horizontal" | 1075 | <View |
1037 | android:layout_width="match_parent" | 1076 | android:background="#38B3A7" |
1038 | android:layout_height="match_parent"> | 1077 | android:layout_width="1dp" |
1039 | <TextView | 1078 | android:layout_height="match_parent"/> |
1040 | android:text="程\n度" | 1079 | <TextView |
1041 | android:textSize="13sp" | 1080 | android:text="正答\n率" |
1042 | android:textColor="@color/white" | 1081 | android:textSize="13sp" |
1043 | android:gravity="center" | 1082 | android:textColor="@color/white" |
1044 | android:layout_weight="1" | 1083 | android:gravity="center" |
1045 | android:layout_width="0dp" | 1084 | android:layout_weight="38" |
1046 | android:layout_height="wrap_content"/> | 1085 | android:layout_width="0dp" |
1047 | <View | 1086 | android:layout_height="match_parent"/> |
1048 | android:background="#38B3A7" | 1087 | </LinearLayout> |
1049 | android:layout_width="1dp" | 1088 | <androidx.recyclerview.widget.RecyclerView |
1050 | android:layout_height="match_parent"/> | 1089 | android:id="@+id/rvPoint" |
1051 | <TextView | 1090 | android:orientation="vertical" |
1052 | android:text="状\n态" | 1091 | app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" |
1053 | android:textSize="13sp" | 1092 | app:reverseLayout="false" |
1054 | android:textColor="@color/white" | 1093 | android:layout_width="match_parent" |
1055 | android:gravity="center" | 1094 | android:layout_height="wrap_content"/> |
1056 | android:layout_weight="1" | 1095 | </LinearLayout> |
1057 | android:layout_width="0dp" | 1096 | |
1058 | android:layout_height="wrap_content"/> | 1097 | <LinearLayout |
1059 | </LinearLayout> | 1098 | android:id="@+id/flPointDesc" |
1060 | 1099 | android:orientation="horizontal" | |
1061 | </LinearLayout> | 1100 | android:gravity="center_vertical" |
1062 | 1101 | android:layout_marginTop="10dp" | |
1063 | <View | 1102 | android:layout_width="match_parent" |
1064 | android:background="#38B3A7" | 1103 | android:layout_height="wrap_content"> |
1065 | android:layout_width="1dp" | 1104 | <ImageView |
1066 | android:layout_height="match_parent"/> | 1105 | android:src="@drawable/png_up" |
1067 | <TextView | 1106 | android:layout_width="12dp" |
1068 | android:text="进步\n幅度" | 1107 | android:layout_height="12dp"/> |
1069 | android:textSize="13sp" | 1108 | <TextView |
1070 | android:textColor="@color/white" | 1109 | android:text="代表进步幅度最大的知识点" |
1071 | android:gravity="center" | 1110 | android:textSize="12sp" |
1072 | android:layout_weight="50" | 1111 | android:textColor="#666" |
1073 | android:layout_width="0dp" | 1112 | android:layout_marginStart="8dp" |
1074 | android:layout_height="match_parent"/> | 1113 | android:layout_width="wrap_content" |
1075 | <View | 1114 | android:layout_height="wrap_content"/> |
1076 | android:background="#38B3A7" | 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" |
app/src/main/res/layout/activity_huyou_detail_a4.xml
1 | <?xml version="1.0" encoding="utf-8"?> | 1 | <?xml version="1.0" encoding="utf-8"?> |
2 | <FrameLayout | 2 | <FrameLayout |
3 | xmlns:android="http://schemas.android.com/apk/res/android" | 3 | xmlns:android="http://schemas.android.com/apk/res/android" |
4 | xmlns:tools="http://schemas.android.com/tools" | 4 | xmlns:tools="http://schemas.android.com/tools" |
5 | xmlns:app="http://schemas.android.com/apk/res-auto" | 5 | xmlns:app="http://schemas.android.com/apk/res-auto" |
6 | tools:ignore="HardcodedText,ContentDescription,SmallSp,UseCompoundDrawables,RtlSymmetry" | 6 | tools:ignore="HardcodedText,ContentDescription,SmallSp,UseCompoundDrawables,RtlSymmetry" |
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 | <LinearLayout | 9 | <LinearLayout |
10 | android:id="@+id/root" | 10 | android:id="@+id/root" |
11 | android:transformPivotX="0px" | 11 | android:transformPivotX="0px" |
12 | android:transformPivotY="0px" | 12 | android:transformPivotY="0px" |
13 | android:orientation="vertical" | 13 | android:orientation="vertical" |
14 | android:background="@drawable/bg_huyou_a4" | 14 | android:background="@drawable/bg_huyou_a4" |
15 | android:layout_width="756dp" | 15 | android:layout_width="756dp" |
16 | android:layout_height="1069dp" | 16 | android:layout_height="1069dp" |
17 | tools:ignore="UselessParent"> | 17 | tools:ignore="UselessParent"> |
18 | 18 | ||
19 | 19 | ||
20 | <FrameLayout | 20 | <FrameLayout |
21 | android:orientation="horizontal" | 21 | android:orientation="horizontal" |
22 | android:elevation="2dp" | 22 | android:elevation="2dp" |
23 | android:paddingHorizontal="30dp" | 23 | android:paddingHorizontal="30dp" |
24 | android:layout_marginTop="60dp" | 24 | android:layout_marginTop="60dp" |
25 | android:layout_width="match_parent" | 25 | android:layout_width="match_parent" |
26 | android:layout_height="wrap_content"> | 26 | android:layout_height="wrap_content"> |
27 | <LinearLayout | 27 | <LinearLayout |
28 | android:id="@+id/toolbar" | 28 | android:id="@+id/toolbar" |
29 | android:layout_gravity="center_vertical" | 29 | android:layout_gravity="center_vertical" |
30 | android:layout_width="match_parent" | 30 | android:layout_width="match_parent" |
31 | android:layout_height="wrap_content"> | 31 | android:layout_height="wrap_content"> |
32 | <TextView | 32 | <TextView |
33 | android:id="@+id/btnBack" | 33 | android:id="@+id/btnBack" |
34 | android:text="返回" | 34 | android:text="返回" |
35 | android:textSize="30sp" | 35 | android:textSize="30sp" |
36 | android:textColor="#333" | 36 | android:textColor="#333" |
37 | android:layout_width="wrap_content" | 37 | android:layout_width="wrap_content" |
38 | android:layout_height="wrap_content"/> | 38 | android:layout_height="wrap_content"/> |
39 | <Space style="@style/empty_space"/> | 39 | <Space style="@style/empty_space"/> |
40 | <TextView | 40 | <TextView |
41 | android:id="@+id/btnSwitch" | 41 | android:id="@+id/btnSwitch" |
42 | android:text="看长图" | 42 | android:text="看长图" |
43 | android:textSize="30sp" | 43 | android:textSize="30sp" |
44 | android:textColor="#333" | 44 | android:textColor="#333" |
45 | android:layout_width="wrap_content" | 45 | android:layout_width="wrap_content" |
46 | android:layout_height="wrap_content"/> | 46 | android:layout_height="wrap_content"/> |
47 | <TextView | 47 | <TextView |
48 | android:id="@+id/btnShare" | 48 | android:id="@+id/btnShare" |
49 | android:text="分享" | 49 | android:text="分享" |
50 | android:textSize="30sp" | 50 | android:textSize="30sp" |
51 | android:textColor="#333" | 51 | android:textColor="#333" |
52 | android:layout_marginStart="8dp" | 52 | android:layout_marginStart="8dp" |
53 | android:layout_width="wrap_content" | 53 | android:layout_width="wrap_content" |
54 | android:layout_height="wrap_content"/> | 54 | android:layout_height="wrap_content"/> |
55 | <TextView | 55 | <TextView |
56 | android:id="@+id/btnSame" | 56 | android:id="@+id/btnSame" |
57 | android:visibility="gone" | 57 | android:visibility="gone" |
58 | android:text="举一反三" | 58 | android:text="举一反三" |
59 | android:textSize="20sp" | 59 | android:textSize="20sp" |
60 | android:textColor="#333" | 60 | android:textColor="#333" |
61 | android:layout_gravity="end" | 61 | android:layout_gravity="end" |
62 | android:layout_width="wrap_content" | 62 | android:layout_width="wrap_content" |
63 | android:layout_height="wrap_content"/> | 63 | android:layout_height="wrap_content"/> |
64 | </LinearLayout> | 64 | </LinearLayout> |
65 | <TextView | 65 | <TextView |
66 | android:id="@+id/tvTitle" | 66 | android:id="@+id/tvTitle" |
67 | android:text="周作业学习报告" | 67 | android:text="周作业学习报告" |
68 | android:textSize="37sp" | 68 | android:textSize="37sp" |
69 | android:textColor="#333" | 69 | android:textColor="#333" |
70 | android:textStyle="bold" | 70 | android:textStyle="bold" |
71 | android:layout_gravity="center_horizontal" | 71 | android:layout_gravity="center_horizontal" |
72 | android:layout_width="wrap_content" | 72 | android:layout_width="wrap_content" |
73 | android:layout_height="wrap_content" /> | 73 | android:layout_height="wrap_content" /> |
74 | </FrameLayout> | 74 | </FrameLayout> |
75 | 75 | ||
76 | 76 | ||
77 | <ImageView | 77 | <ImageView |
78 | android:src="@drawable/png_huyou_top_bg" | 78 | android:src="@drawable/png_huyou_top_bg" |
79 | android:elevation="1dp" | 79 | android:elevation="1dp" |
80 | android:layout_gravity="end" | 80 | android:layout_gravity="end" |
81 | android:layout_marginHorizontal="30dp" | 81 | android:layout_marginHorizontal="30dp" |
82 | android:layout_marginTop="-40dp" | 82 | android:layout_marginTop="-40dp" |
83 | android:layout_width="206dp" | 83 | android:layout_width="206dp" |
84 | android:layout_height="180dp"/> | 84 | android:layout_height="180dp"/> |
85 | 85 | ||
86 | <LinearLayout | 86 | <LinearLayout |
87 | android:orientation="vertical" | 87 | android:orientation="vertical" |
88 | android:background="@drawable/png_info_bg" | 88 | android:background="@drawable/png_info_bg" |
89 | android:padding="30dp" | 89 | android:padding="30dp" |
90 | android:layout_marginHorizontal="30dp" | 90 | android:layout_marginHorizontal="30dp" |
91 | android:layout_marginTop="-120dp" | 91 | android:layout_marginTop="-120dp" |
92 | android:layout_width="match_parent" | 92 | android:layout_width="match_parent" |
93 | android:layout_height="267dp"> | 93 | android:layout_height="267dp"> |
94 | <LinearLayout | 94 | <LinearLayout |
95 | android:orientation="horizontal" | 95 | android:orientation="horizontal" |
96 | android:layout_width="match_parent" | 96 | android:layout_width="match_parent" |
97 | android:layout_height="wrap_content"> | 97 | android:layout_height="wrap_content"> |
98 | <androidx.constraintlayout.utils.widget.ImageFilterView | 98 | <androidx.constraintlayout.utils.widget.ImageFilterView |
99 | android:id="@+id/ivAvatar" | 99 | android:id="@+id/ivAvatar" |
100 | tools:background="#2491FF" | 100 | tools:background="#2491FF" |
101 | app:round="40dp" | 101 | app:round="40dp" |
102 | android:layout_width="80dp" | 102 | android:layout_width="80dp" |
103 | android:layout_height="80dp"/> | 103 | android:layout_height="80dp"/> |
104 | <LinearLayout | 104 | <LinearLayout |
105 | android:orientation="vertical" | 105 | android:orientation="vertical" |
106 | android:layout_gravity="center_vertical" | 106 | android:layout_gravity="center_vertical" |
107 | android:layout_marginStart="10dp" | 107 | android:layout_marginStart="10dp" |
108 | android:layout_width="wrap_content" | 108 | android:layout_width="wrap_content" |
109 | android:layout_height="wrap_content"> | 109 | android:layout_height="wrap_content"> |
110 | <TextView | 110 | <TextView |
111 | android:id="@+id/tvStuName" | 111 | android:id="@+id/tvStuName" |
112 | tools:text="杨同学 " | 112 | tools:text="杨同学 " |
113 | android:textSize="28sp" | 113 | android:textSize="28sp" |
114 | android:textColor="#333" | 114 | android:textColor="#333" |
115 | android:textStyle="bold" | 115 | android:textStyle="bold" |
116 | android:layout_width="wrap_content" | 116 | android:layout_width="wrap_content" |
117 | android:layout_height="wrap_content"/> | 117 | android:layout_height="wrap_content"/> |
118 | <TextView | 118 | <TextView |
119 | android:id="@+id/tvGrade" | 119 | android:id="@+id/tvGrade" |
120 | tools:text="七年级" | 120 | tools:text="七年级" |
121 | android:textSize="26sp" | 121 | android:textSize="26sp" |
122 | android:textColor="#666" | 122 | android:textColor="#666" |
123 | android:textStyle="bold" | 123 | android:textStyle="bold" |
124 | android:layout_width="wrap_content" | 124 | android:layout_width="wrap_content" |
125 | android:layout_height="wrap_content"/> | 125 | android:layout_height="wrap_content"/> |
126 | </LinearLayout> | 126 | </LinearLayout> |
127 | </LinearLayout> | 127 | </LinearLayout> |
128 | <LinearLayout | 128 | <LinearLayout |
129 | android:orientation="horizontal" | 129 | android:orientation="horizontal" |
130 | android:background="@drawable/shape_radius_10" | 130 | android:background="@drawable/shape_radius_10" |
131 | android:backgroundTint="#F4FAFF" | 131 | android:backgroundTint="#F4FAFF" |
132 | android:layout_marginTop="16dp" | 132 | android:layout_marginTop="16dp" |
133 | android:layout_width="match_parent" | 133 | android:layout_width="match_parent" |
134 | android:layout_height="120dp"> | 134 | android:layout_height="120dp"> |
135 | <LinearLayout | 135 | <LinearLayout |
136 | android:orientation="vertical" | 136 | android:orientation="vertical" |
137 | android:gravity="center" | 137 | android:gravity="center" |
138 | android:layout_width="0dp" | 138 | android:layout_width="0dp" |
139 | android:layout_height="match_parent" | 139 | android:layout_height="match_parent" |
140 | android:layout_weight="1"> | 140 | android:layout_weight="1"> |
141 | <LinearLayout | 141 | <LinearLayout |
142 | android:paddingEnd="40dp" | 142 | android:paddingEnd="40dp" |
143 | android:gravity="center_vertical" | 143 | android:gravity="center_vertical" |
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 | <ImageView | 146 | <ImageView |
147 | android:src="@drawable/png_iv_subject" | 147 | android:src="@drawable/png_iv_subject" |
148 | android:layout_marginEnd="10dp" | 148 | android:layout_marginEnd="10dp" |
149 | android:layout_width="32dp" | 149 | android:layout_width="32dp" |
150 | android:layout_height="28dp"/> | 150 | android:layout_height="28dp"/> |
151 | <TextView | 151 | <TextView |
152 | android:text="学科" | 152 | android:text="学科" |
153 | android:textSize="24sp" | 153 | android:textSize="24sp" |
154 | android:textColor="#333" | 154 | android:textColor="#333" |
155 | android:textStyle="bold" | 155 | android:textStyle="bold" |
156 | android:layout_width="wrap_content" | 156 | android:layout_width="wrap_content" |
157 | android:layout_height="wrap_content"/> | 157 | android:layout_height="wrap_content"/> |
158 | </LinearLayout> | 158 | </LinearLayout> |
159 | <TextView | 159 | <TextView |
160 | android:id="@+id/tvSubject" | 160 | android:id="@+id/tvSubject" |
161 | tools:text="数学" | 161 | tools:text="数学" |
162 | android:textSize="24sp" | 162 | android:textSize="24sp" |
163 | android:textColor="#3BC3B6" | 163 | android:textColor="#3BC3B6" |
164 | android:textStyle="bold" | 164 | android:textStyle="bold" |
165 | android:layout_marginTop="8dp" | 165 | android:layout_marginTop="8dp" |
166 | android:layout_width="wrap_content" | 166 | android:layout_width="wrap_content" |
167 | android:layout_height="wrap_content"/> | 167 | android:layout_height="wrap_content"/> |
168 | </LinearLayout> | 168 | </LinearLayout> |
169 | <LinearLayout | 169 | <LinearLayout |
170 | android:orientation="vertical" | 170 | android:orientation="vertical" |
171 | android:gravity="center" | 171 | android:gravity="center" |
172 | android:layout_width="0dp" | 172 | android:layout_width="0dp" |
173 | android:layout_height="match_parent" | 173 | android:layout_height="match_parent" |
174 | android:layout_weight="1"> | 174 | android:layout_weight="1"> |
175 | <LinearLayout | 175 | <LinearLayout |
176 | android:paddingEnd="40dp" | 176 | android:paddingEnd="40dp" |
177 | android:gravity="center_vertical" | 177 | android:gravity="center_vertical" |
178 | android:layout_width="wrap_content" | 178 | android:layout_width="wrap_content" |
179 | android:layout_height="wrap_content"> | 179 | android:layout_height="wrap_content"> |
180 | <ImageView | 180 | <ImageView |
181 | android:src="@drawable/png_ic_during" | 181 | android:src="@drawable/png_ic_during" |
182 | android:layout_marginEnd="10dp" | 182 | android:layout_marginEnd="10dp" |
183 | android:layout_width="14dp" | 183 | android:layout_width="14dp" |
184 | android:layout_height="13dp"/> | 184 | android:layout_height="13dp"/> |
185 | <TextView | 185 | <TextView |
186 | android:text="周期" | 186 | android:text="周期" |
187 | android:textSize="24sp" | 187 | android:textSize="24sp" |
188 | android:textColor="#333" | 188 | android:textColor="#333" |
189 | android:textStyle="bold" | 189 | android:textStyle="bold" |
190 | android:layout_width="wrap_content" | 190 | android:layout_width="wrap_content" |
191 | android:layout_height="wrap_content"/> | 191 | android:layout_height="wrap_content"/> |
192 | </LinearLayout> | 192 | </LinearLayout> |
193 | <TextView | 193 | <TextView |
194 | android:id="@+id/tvDate" | 194 | android:id="@+id/tvDate" |
195 | tools:text="2024.09.01-2024.09.30" | 195 | tools:text="2024.09.01-2024.09.30" |
196 | android:textSize="24sp" | 196 | android:textSize="24sp" |
197 | android:textColor="#3BC3B6" | 197 | android:textColor="#3BC3B6" |
198 | android:textStyle="bold" | 198 | android:textStyle="bold" |
199 | android:layout_marginTop="8dp" | 199 | android:layout_marginTop="8dp" |
200 | android:layout_width="wrap_content" | 200 | android:layout_width="wrap_content" |
201 | android:layout_height="wrap_content"/> | 201 | android:layout_height="wrap_content"/> |
202 | </LinearLayout> | 202 | </LinearLayout> |
203 | </LinearLayout> | 203 | </LinearLayout> |
204 | </LinearLayout> | 204 | </LinearLayout> |
205 | <Space | 205 | <Space |
206 | android:id="@+id/splitLine" | 206 | android:id="@+id/splitLine" |
207 | android:layout_width="match_parent" | 207 | android:layout_width="match_parent" |
208 | android:layout_height="0dp"/> | 208 | android:layout_height="0dp"/> |
209 | 209 | ||
210 | <HorizontalScrollView | 210 | <HorizontalScrollView |
211 | android:scrollbars="none" | 211 | android:scrollbars="none" |
212 | android:layout_marginTop="25dp" | 212 | android:layout_marginTop="25dp" |
213 | android:layout_marginHorizontal="16dp" | 213 | android:layout_marginHorizontal="16dp" |
214 | android:layout_width="match_parent" | 214 | android:layout_width="match_parent" |
215 | android:layout_height="match_parent"> | 215 | android:layout_height="match_parent"> |
216 | <LinearLayout | 216 | <LinearLayout |
217 | android:orientation="horizontal" | 217 | android:orientation="horizontal" |
218 | android:layout_width="wrap_content" | 218 | android:layout_width="wrap_content" |
219 | android:layout_height="match_parent"> | 219 | android:layout_height="match_parent"> |
220 | <LinearLayout | 220 | <LinearLayout |
221 | android:id="@+id/viewPointTotal" | ||
221 | android:id="@+id/viewPointTotal" | 222 | android:orientation="vertical" |
222 | android:orientation="vertical" | 223 | android:background="@drawable/shape_radius_10" |
223 | android:background="@drawable/shape_radius_10" | 224 | android:backgroundTint="@color/white" |
224 | android:backgroundTint="@color/white" | 225 | android:padding="12dp" |
225 | android:padding="12dp" | 226 | android:layout_marginHorizontal="14dp" |
226 | android:layout_marginHorizontal="14dp" | 227 | android:layout_width="335dp" |
227 | android:layout_width="335dp" | 228 | android:layout_height="613dp"> |
228 | android:layout_height="613dp"> | 229 | <TextView |
229 | <TextView | 230 | android:text="知识点总评" |
230 | android:text="知识点总评" | 231 | android:textSize="16sp" |
231 | android:textSize="16sp" | 232 | android:textColor="#333333" |
232 | android:textColor="#333333" | 233 | android:textStyle="bold" |
233 | android:textStyle="bold" | 234 | android:background="@drawable/bg_hy_weak_title" |
234 | android:background="@drawable/bg_hy_weak_title" | 235 | android:paddingStart="20dp" |
235 | android:paddingStart="20dp" | 236 | android:paddingEnd="4dp" |
236 | android:paddingEnd="4dp" | 237 | android:layout_marginTop="8dp" |
237 | android:layout_marginTop="8dp" | 238 | android:layout_gravity="center_horizontal" |
238 | android:layout_gravity="center_horizontal" | 239 | android:layout_width="wrap_content" |
239 | android:layout_width="wrap_content" | 240 | android:layout_height="wrap_content"/> |
240 | android:layout_height="wrap_content"/> | 241 | <LinearLayout |
241 | <LinearLayout | 242 | android:orientation="vertical" |
242 | android:orientation="vertical" | 243 | android:layout_marginTop="40dp" |
243 | android:layout_marginTop="40dp" | 244 | android:layout_width="match_parent" |
244 | android:layout_width="match_parent" | 245 | android:layout_height="wrap_content"> |
245 | android:layout_height="wrap_content"> | 246 | <TextView |
246 | <TextView | 247 | android:text="学习前" |
247 | android:text="学习前" | 248 | android:textSize="12sp" |
248 | android:textSize="12sp" | 249 | android:textColor="#333" |
249 | android:textColor="#333" | 250 | android:layout_gravity="center_horizontal" |
250 | android:layout_gravity="center_horizontal" | 251 | android:layout_width="wrap_content" |
251 | android:layout_width="wrap_content" | 252 | android:layout_height="wrap_content"/> |
252 | android:layout_height="wrap_content"/> | 253 | <FrameLayout |
253 | <FrameLayout | 254 | android:background="@drawable/png_huyou_progress_bg" |
254 | android:background="@drawable/png_huyou_progress_bg" | 255 | android:padding="10dp" |
255 | android:padding="10dp" | 256 | android:layout_gravity="center_horizontal" |
256 | android:layout_gravity="center_horizontal" | 257 | android:layout_marginTop="16dp" |
257 | android:layout_marginTop="16dp" | 258 | android:layout_width="172dp" |
258 | android:layout_width="172dp" | 259 | android:layout_height="172dp"> |
259 | android:layout_height="172dp"> | 260 | <com.littlejie.circleprogress.CircleProgress |
260 | <com.littlejie.circleprogress.CircleProgress | 261 | android:id="@+id/cpBefore" |
261 | android:id="@+id/cpBefore" | 262 | app:arcWidth="20dp" |
262 | app:arcWidth="20dp" | 263 | app:bgArcWidth="20dp" |
263 | app:bgArcWidth="20dp" | 264 | app:arcColors="#F36A27" |
264 | app:arcColors="#F36A27" | 265 | app:bgArcColor="#FFF1EA" |
265 | app:bgArcColor="#FFF1EA" | 266 | app:startAngle="-90" |
266 | app:startAngle="-90" | 267 | app:sweepAngle="360" |
267 | app:sweepAngle="360" | 268 | app:maxValue="100" |
268 | app:maxValue="100" | 269 | app:value="0" |
269 | app:value="0" | 270 | app:hintColor="@color/transparent" |
270 | app:hintColor="@color/transparent" | 271 | app:unitColor="@color/transparent" |
271 | app:unitColor="@color/transparent" | 272 | app:valueColor="@color/transparent" |
272 | app:valueColor="@color/transparent" | 273 | android:layout_width="match_parent" |
273 | android:layout_width="match_parent" | 274 | android:layout_height="match_parent"/> |
274 | android:layout_height="match_parent"/> | 275 | <LinearLayout |
275 | <LinearLayout | 276 | android:orientation="vertical" |
276 | android:orientation="vertical" | 277 | android:gravity="center_horizontal" |
277 | android:gravity="center_horizontal" | 278 | android:layout_gravity="center" |
278 | android:layout_gravity="center" | 279 | android:layout_width="wrap_content" |
279 | android:layout_width="wrap_content" | 280 | android:layout_height="wrap_content"> |
280 | android:layout_height="wrap_content"> | 281 | <LinearLayout |
281 | <LinearLayout | 282 | android:layout_width="wrap_content" |
282 | android:layout_width="wrap_content" | 283 | android:layout_height="wrap_content"> |
283 | android:layout_height="wrap_content"> | 284 | <TextView |
284 | <TextView | 285 | android:id="@+id/pgBefore" |
285 | android:id="@+id/pgBefore" | 286 | tools:text="88" |
286 | tools:text="88" | 287 | android:textSize="34sp" |
287 | android:textSize="34sp" | 288 | android:textColor="#EA5127" |
288 | android:textColor="#EA5127" | 289 | android:textStyle="bold" |
289 | android:textStyle="bold" | 290 | android:layout_width="wrap_content" |
290 | android:layout_width="wrap_content" | 291 | android:layout_height="wrap_content"/> |
291 | android:layout_height="wrap_content"/> | 292 | <TextView |
292 | <TextView | 293 | android:text="%" |
293 | android:text="%" | 294 | android:textSize="16sp" |
294 | android:textSize="16sp" | 295 | android:textColor="#EA5127" |
295 | android:textColor="#EA5127" | 296 | android:layout_width="wrap_content" |
296 | android:layout_width="wrap_content" | 297 | android:layout_height="wrap_content"/> |
297 | android:layout_height="wrap_content"/> | 298 | </LinearLayout> |
298 | </LinearLayout> | 299 | <TextView |
299 | <TextView | 300 | android:text="整体掌握程度" |
300 | android:text="整体掌握程度" | 301 | android:textSize="14sp" |
301 | android:textSize="14sp" | 302 | android:textColor="#333" |
302 | android:textColor="#333" | 303 | android:textStyle="bold" |
303 | android:textStyle="bold" | 304 | android:layout_marginTop="-2dp" |
304 | android:layout_marginTop="-2dp" | 305 | android:layout_width="wrap_content" |
305 | android:layout_width="wrap_content" | 306 | android:layout_height="wrap_content"/> |
306 | android:layout_height="wrap_content"/> | 307 | </LinearLayout> |
307 | </LinearLayout> | 308 | </FrameLayout> |
308 | </FrameLayout> | 309 | </LinearLayout> |
309 | </LinearLayout> | 310 | <LinearLayout |
310 | <LinearLayout | 311 | android:orientation="vertical" |
311 | android:orientation="vertical" | 312 | android:layout_marginTop="20dp" |
312 | android:layout_marginTop="20dp" | 313 | android:layout_width="match_parent" |
313 | android:layout_width="match_parent" | 314 | android:layout_height="wrap_content"> |
314 | android:layout_height="wrap_content"> | 315 | <TextView |
315 | <TextView | 316 | android:text="学习后" |
316 | android:text="学习后" | 317 | android:textSize="12sp" |
317 | android:textSize="12sp" | 318 | android:textColor="#333" |
318 | android:textColor="#333" | 319 | android:layout_gravity="center_horizontal" |
319 | android:layout_gravity="center_horizontal" | 320 | android:layout_width="wrap_content" |
320 | android:layout_width="wrap_content" | 321 | android:layout_height="wrap_content"/> |
321 | android:layout_height="wrap_content"/> | 322 | <FrameLayout |
322 | <FrameLayout | 323 | android:background="@drawable/png_huyou_progress_bg" |
323 | android:background="@drawable/png_huyou_progress_bg" | 324 | android:padding="10dp" |
324 | android:padding="10dp" | 325 | android:layout_gravity="center_horizontal" |
325 | android:layout_gravity="center_horizontal" | 326 | android:layout_marginTop="16dp" |
326 | android:layout_marginTop="16dp" | 327 | android:layout_width="172dp" |
327 | android:layout_width="172dp" | 328 | android:layout_height="172dp"> |
328 | android:layout_height="172dp"> | 329 | <com.littlejie.circleprogress.CircleProgress |
329 | <com.littlejie.circleprogress.CircleProgress | 330 | android:id="@+id/cpAfter" |
330 | android:id="@+id/cpAfter" | 331 | app:arcWidth="20dp" |
331 | app:arcWidth="20dp" | 332 | app:bgArcWidth="20dp" |
332 | app:bgArcWidth="20dp" | 333 | app:arcColors="#3BC3B6" |
333 | app:arcColors="#3BC3B6" | 334 | app:bgArcColor="#C2FCF6" |
334 | app:bgArcColor="#C2FCF6" | 335 | app:startAngle="-90" |
335 | app:startAngle="-90" | 336 | app:sweepAngle="360" |
336 | app:sweepAngle="360" | 337 | app:maxValue="100" |
337 | app:maxValue="100" | 338 | app:value="0" |
338 | app:value="0" | 339 | app:hintColor="@color/transparent" |
339 | app:hintColor="@color/transparent" | 340 | app:unitColor="@color/transparent" |
340 | app:unitColor="@color/transparent" | 341 | app:valueColor="@color/transparent" |
341 | app:valueColor="@color/transparent" | 342 | android:layout_width="match_parent" |
342 | android:layout_width="match_parent" | 343 | android:layout_height="match_parent"/> |
343 | android:layout_height="match_parent"/> | 344 | <LinearLayout |
344 | <LinearLayout | 345 | android:orientation="vertical" |
345 | android:orientation="vertical" | 346 | android:gravity="center_horizontal" |
346 | android:gravity="center_horizontal" | 347 | android:layout_gravity="center" |
347 | android:layout_gravity="center" | 348 | android:layout_width="wrap_content" |
348 | android:layout_width="wrap_content" | 349 | android:layout_height="wrap_content"> |
349 | android:layout_height="wrap_content"> | 350 | <LinearLayout |
350 | <LinearLayout | 351 | android:layout_width="wrap_content" |
351 | android:layout_width="wrap_content" | 352 | android:layout_height="wrap_content"> |
352 | android:layout_height="wrap_content"> | 353 | <TextView |
353 | <TextView | 354 | android:id="@+id/pgAfter" |
354 | android:id="@+id/pgAfter" | 355 | tools:text="88" |
355 | tools:text="88" | 356 | android:textSize="34sp" |
356 | android:textSize="34sp" | 357 | android:textColor="#3BC3B6" |
357 | android:textColor="#3BC3B6" | 358 | android:textStyle="bold" |
358 | android:textStyle="bold" | 359 | android:layout_width="wrap_content" |
359 | android:layout_width="wrap_content" | 360 | android:layout_height="wrap_content"/> |
360 | android:layout_height="wrap_content"/> | 361 | <TextView |
361 | <TextView | 362 | android:text="%" |
362 | android:text="%" | 363 | android:textSize="16sp" |
363 | android:textSize="16sp" | 364 | android:textColor="#3BC3B6" |
364 | android:textColor="#3BC3B6" | 365 | android:layout_width="wrap_content" |
365 | android:layout_width="wrap_content" | 366 | android:layout_height="wrap_content"/> |
366 | android:layout_height="wrap_content"/> | 367 | </LinearLayout> |
367 | </LinearLayout> | 368 | <TextView |
368 | <TextView | 369 | android:text="整体掌握程度" |
369 | android:text="整体掌握程度" | 370 | android:textSize="14sp" |
370 | android:textSize="14sp" | 371 | android:textColor="#333" |
371 | android:textColor="#333" | 372 | android:textStyle="bold" |
372 | android:textStyle="bold" | 373 | android:layout_marginTop="-2dp" |
373 | android:layout_marginTop="-2dp" | 374 | android:layout_width="wrap_content" |
374 | android:layout_width="wrap_content" | 375 | android:layout_height="wrap_content"/> |
375 | android:layout_height="wrap_content"/> | 376 | </LinearLayout> |
376 | </LinearLayout> | 377 | </FrameLayout> |
377 | </FrameLayout> | 378 | </LinearLayout> |
378 | </LinearLayout> | 379 | |
379 | 380 | <FrameLayout | |
380 | <FrameLayout | 381 | android:layout_marginTop="10dp" |
381 | android:layout_marginTop="10dp" | 382 | android:layout_width="match_parent" |
382 | android:layout_width="match_parent" | 383 | android:layout_height="wrap_content"> |
383 | android:layout_height="wrap_content"> | 384 | <ImageView |
384 | <ImageView | 385 | android:src="@drawable/png_hy_weak_comment" |
385 | android:src="@drawable/png_hy_weak_comment" | 386 | android:layout_width="16dp" |
386 | android:layout_width="16dp" | 387 | android:layout_height="18dp"/> |
387 | android:layout_height="18dp"/> | 388 | <TextView |
388 | <TextView | 389 | android:id="@+id/tvWeakRate" |
389 | android:id="@+id/tvWeakRate" | 390 | android:textSize="14sp" |
390 | android:textSize="14sp" | 391 | android:textColor="#333" |
391 | android:textColor="#333" | 392 | android:layout_marginTop="1dp" |
392 | android:layout_marginTop="1dp" | 393 | android:lineSpacingMultiplier="1.3" |
393 | android:lineSpacingMultiplier="1.3" | 394 | android:layout_width="wrap_content" |
394 | android:layout_width="wrap_content" | 395 | android:layout_height="wrap_content"/> |
395 | android:layout_height="wrap_content"/> | 396 | </FrameLayout> |
396 | </FrameLayout> | 397 | </LinearLayout> |
397 | </LinearLayout> | 398 | |
398 | 399 | <LinearLayout | |
399 | <LinearLayout | 400 | android:orientation="vertical" |
400 | android:orientation="vertical" | 401 | android:background="@drawable/shape_radius_10" |
401 | android:background="@drawable/shape_radius_10" | 402 | android:backgroundTint="@color/white" |
402 | android:backgroundTint="@color/white" | 403 | android:padding="12dp" |
403 | android:padding="12dp" | 404 | android:layout_marginHorizontal="14dp" |
404 | android:layout_marginHorizontal="14dp" | 405 | android:layout_width="335dp" |
405 | android:layout_width="335dp" | 406 | android:layout_height="613dp"> |
406 | android:layout_height="613dp"> | 407 | |
407 | 408 | <TextView | |
408 | <TextView | 409 | android:text="作业概括" |
409 | android:text="作业概括" | 410 | android:textSize="16sp" |
410 | android:textSize="16sp" | 411 | android:textColor="#333333" |
411 | android:textColor="#333333" | 412 | android:textStyle="bold" |
412 | android:textStyle="bold" | 413 | android:background="@drawable/bg_hy_summary_title" |
413 | android:background="@drawable/bg_hy_summary_title" | 414 | android:paddingStart="28dp" |
414 | android:paddingStart="28dp" | 415 | android:paddingEnd="4dp" |
415 | android:paddingEnd="4dp" | 416 | android:layout_marginTop="8dp" |
416 | android:layout_marginTop="8dp" | 417 | android:layout_gravity="center_horizontal" |
417 | android:layout_gravity="center_horizontal" | 418 | android:layout_width="wrap_content" |
418 | android:layout_width="wrap_content" | 419 | android:layout_height="wrap_content"/> |
419 | android:layout_height="wrap_content"/> | 420 | <LinearLayout |
420 | <LinearLayout | 421 | android:orientation="horizontal" |
421 | android:orientation="horizontal" | 422 | android:background="@drawable/shape_radius_5" |
422 | android:background="@drawable/shape_radius_5" | 423 | android:backgroundTint="#F4FAFF" |
423 | android:backgroundTint="#F4FAFF" | 424 | android:layout_width="match_parent" |
424 | android:layout_width="match_parent" | 425 | android:layout_height="58dp" |
425 | android:layout_height="58dp" | 426 | android:layout_marginTop="40dp"> |
426 | android:layout_marginTop="40dp"> | 427 | <LinearLayout |
427 | <LinearLayout | 428 | android:orientation="vertical" |
428 | android:orientation="vertical" | 429 | android:gravity="center" |
429 | android:gravity="center" | 430 | android:layout_width="0dp" |
430 | android:layout_width="0dp" | 431 | android:layout_height="match_parent" |
431 | android:layout_height="match_parent" | 432 | android:layout_weight="1"> |
432 | android:layout_weight="1"> | 433 | <LinearLayout |
433 | <LinearLayout | 434 | android:orientation="horizontal" |
434 | android:orientation="horizontal" | 435 | android:gravity="center_vertical" |
435 | android:gravity="center_vertical" | 436 | android:layout_width="wrap_content" |
436 | android:layout_width="wrap_content" | 437 | android:layout_height="wrap_content"> |
437 | android:layout_height="wrap_content"> | 438 | <ImageView |
438 | <ImageView | 439 | android:src="@drawable/png_icon_statistical_accuracy" |
439 | android:src="@drawable/png_icon_statistical_accuracy" | 440 | android:layout_width="12dp" |
440 | android:layout_width="12dp" | 441 | android:layout_height="13dp"/> |
441 | android:layout_height="13dp"/> | 442 | <TextView |
442 | <TextView | 443 | android:text="作业正确率" |
443 | android:text="作业正确率" | 444 | android:textSize="11sp" |
444 | android:textSize="11sp" | 445 | android:textColor="#333" |
445 | android:textColor="#333" | 446 | android:textStyle="bold" |
446 | android:textStyle="bold" | 447 | android:layout_marginStart="5dp" |
447 | android:layout_marginStart="5dp" | 448 | android:layout_width="wrap_content" |
448 | android:layout_width="wrap_content" | 449 | android:layout_height="wrap_content"/> |
449 | android:layout_height="wrap_content"/> | 450 | </LinearLayout> |
450 | </LinearLayout> | 451 | <LinearLayout |
451 | <LinearLayout | 452 | android:orientation="horizontal" |
452 | android:orientation="horizontal" | 453 | android:layout_marginTop="8dp" |
453 | android:layout_marginTop="8dp" | 454 | android:layout_width="wrap_content" |
454 | android:layout_width="wrap_content" | 455 | android:layout_height="wrap_content"> |
455 | android:layout_height="wrap_content"> | 456 | <TextView |
456 | <TextView | 457 | android:id="@+id/tvTotalRate" |
457 | android:id="@+id/tvTotalRate" | 458 | tools:text="88" |
458 | tools:text="88" | 459 | android:textSize="14sp" |
459 | android:textSize="14sp" | 460 | android:textColor="#3BC3B6" |
460 | android:textColor="#3BC3B6" | 461 | android:textStyle="bold" |
461 | android:textStyle="bold" | 462 | android:layout_width="wrap_content" |
462 | android:layout_width="wrap_content" | 463 | android:layout_height="wrap_content"/> |
463 | android:layout_height="wrap_content"/> | 464 | <TextView |
464 | <TextView | 465 | android:text="%" |
465 | android:text="%" | 466 | android:textSize="9sp" |
466 | android:textSize="9sp" | 467 | android:textColor="#3BC3B6" |
467 | android:textColor="#3BC3B6" | 468 | android:textStyle="bold" |
468 | android:textStyle="bold" | 469 | android:layout_width="wrap_content" |
469 | android:layout_width="wrap_content" | 470 | android:layout_height="wrap_content"/> |
470 | android:layout_height="wrap_content"/> | 471 | </LinearLayout> |
471 | </LinearLayout> | 472 | </LinearLayout> |
472 | </LinearLayout> | ||
473 | <LinearLayout | ||
474 | android:orientation="vertical" | ||
475 | android:gravity="center" | ||
476 | android:layout_width="0dp" | ||
477 | android:layout_height="match_parent" | 473 | <LinearLayout |
478 | android:layout_weight="1"> | 474 | android:orientation="vertical" |
479 | <LinearLayout | 475 | android:gravity="center" |
480 | android:orientation="horizontal" | 476 | android:layout_width="0dp" |
481 | android:gravity="center_vertical" | 477 | android:layout_height="match_parent" |
482 | android:layout_width="wrap_content" | 478 | android:layout_weight="1"> |
483 | android:layout_height="wrap_content"> | 479 | <LinearLayout |
484 | <ImageView | 480 | android:orientation="horizontal" |
485 | android:src="@drawable/png_icon_statistical_correct" | 481 | android:gravity="center_vertical" |
486 | android:layout_width="12dp" | 482 | android:layout_width="wrap_content" |
487 | android:layout_height="13dp"/> | 483 | android:layout_height="wrap_content"> |
488 | <TextView | 484 | <ImageView |
489 | android:text="答对题数" | 485 | android:src="@drawable/png_icon_statistical_correct" |
490 | android:textSize="11sp" | 486 | android:layout_width="12dp" |
491 | android:textColor="#333" | 487 | android:layout_height="13dp"/> |
492 | android:textStyle="bold" | 488 | <TextView |
493 | android:layout_marginStart="5dp" | 489 | android:text="答对题数" |
494 | android:layout_width="wrap_content" | 490 | android:textSize="11sp" |
495 | android:layout_height="wrap_content"/> | 491 | android:textColor="#333" |
496 | </LinearLayout> | 492 | android:textStyle="bold" |
497 | <LinearLayout | 493 | android:layout_marginStart="5dp" |
498 | android:orientation="horizontal" | 494 | android:layout_width="wrap_content" |
499 | android:layout_marginTop="8dp" | 495 | android:layout_height="wrap_content"/> |
500 | android:layout_width="wrap_content" | 496 | </LinearLayout> |
501 | android:layout_height="wrap_content"> | 497 | <LinearLayout |
502 | <TextView | 498 | android:orientation="horizontal" |
503 | android:id="@+id/tvTotalCorrect" | 499 | android:layout_marginTop="8dp" |
504 | tools:text="88" | 500 | android:layout_width="wrap_content" |
505 | android:textSize="14sp" | 501 | android:layout_height="wrap_content"> |
506 | android:textColor="#3BC3B6" | 502 | <TextView |
507 | android:textStyle="bold" | 503 | android:id="@+id/tvTotalCorrect" |
508 | android:layout_width="wrap_content" | 504 | tools:text="88" |
509 | android:layout_height="wrap_content"/> | 505 | android:textSize="14sp" |
510 | <TextView | 506 | android:textColor="#3BC3B6" |
511 | android:text="道" | 507 | android:textStyle="bold" |
512 | android:textSize="9sp" | 508 | android:layout_width="wrap_content" |
513 | android:textColor="#3BC3B6" | 509 | android:layout_height="wrap_content"/> |
514 | android:textStyle="bold" | 510 | <TextView |
515 | android:layout_width="wrap_content" | 511 | android:text="道" |
516 | android:layout_height="wrap_content"/> | 512 | android:textSize="9sp" |
517 | </LinearLayout> | 513 | android:textColor="#3BC3B6" |
518 | </LinearLayout> | 514 | android:textStyle="bold" |
519 | <LinearLayout | 515 | android:layout_width="wrap_content" |
520 | android:orientation="vertical" | 516 | android:layout_height="wrap_content"/> |
521 | android:gravity="center" | 517 | </LinearLayout> |
522 | android:layout_width="0dp" | 518 | </LinearLayout> |
523 | android:layout_height="match_parent" | ||
524 | android:layout_weight="1"> | ||
525 | <LinearLayout | ||
526 | android:orientation="horizontal" | ||
527 | android:gravity="center_vertical" | ||
528 | android:layout_width="wrap_content" | 519 | <LinearLayout |
529 | android:layout_height="wrap_content"> | 520 | android:orientation="vertical" |
530 | <ImageView | 521 | android:gravity="center" |
531 | android:src="@drawable/png_icon_statistical_error" | 522 | android:layout_width="0dp" |
532 | android:layout_width="12dp" | 523 | android:layout_height="match_parent" |
533 | android:layout_height="13dp"/> | 524 | android:layout_weight="1"> |
534 | <TextView | 525 | <LinearLayout |
535 | android:text="答错题数" | 526 | android:orientation="horizontal" |
536 | android:textSize="11sp" | 527 | android:gravity="center_vertical" |
537 | android:textColor="#333" | 528 | android:layout_width="wrap_content" |
538 | android:textStyle="bold" | 529 | android:layout_height="wrap_content"> |
539 | android:layout_marginStart="5dp" | 530 | <ImageView |
540 | android:layout_width="wrap_content" | 531 | android:src="@drawable/png_icon_statistical_error" |
541 | android:layout_height="wrap_content"/> | 532 | android:layout_width="12dp" |
542 | </LinearLayout> | 533 | android:layout_height="13dp"/> |
543 | <LinearLayout | 534 | <TextView |
544 | android:orientation="horizontal" | 535 | android:text="答错题数" |
545 | android:layout_marginTop="8dp" | 536 | android:textSize="11sp" |
546 | android:layout_width="wrap_content" | 537 | android:textColor="#333" |
547 | android:layout_height="wrap_content"> | 538 | android:textStyle="bold" |
548 | <TextView | 539 | android:layout_marginStart="5dp" |
549 | android:id="@+id/tvTotalError" | 540 | android:layout_width="wrap_content" |
550 | tools:text="88" | 541 | android:layout_height="wrap_content"/> |
551 | android:textSize="14sp" | 542 | </LinearLayout> |
552 | android:textColor="#3BC3B6" | 543 | <LinearLayout |
553 | android:textStyle="bold" | 544 | android:orientation="horizontal" |
554 | android:layout_width="wrap_content" | 545 | android:layout_marginTop="8dp" |
555 | android:layout_height="wrap_content"/> | 546 | android:layout_width="wrap_content" |
556 | <TextView | 547 | android:layout_height="wrap_content"> |
557 | android:text="道" | 548 | <TextView |
558 | android:textSize="9sp" | 549 | android:id="@+id/tvTotalError" |
559 | android:textColor="#3BC3B6" | 550 | tools:text="88" |
560 | android:textStyle="bold" | 551 | android:textSize="14sp" |
561 | android:layout_width="wrap_content" | 552 | android:textColor="#3BC3B6" |
562 | android:layout_height="wrap_content"/> | 553 | android:textStyle="bold" |
563 | </LinearLayout> | 554 | android:layout_width="wrap_content" |
564 | </LinearLayout> | 555 | android:layout_height="wrap_content"/> |
565 | <LinearLayout | 556 | <TextView |
566 | android:orientation="vertical" | 557 | android:text="道" |
567 | android:gravity="center" | 558 | android:textSize="9sp" |
568 | android:layout_width="0dp" | 559 | android:textColor="#3BC3B6" |
569 | android:layout_height="match_parent" | 560 | android:textStyle="bold" |
570 | android:layout_weight="1"> | 561 | android:layout_width="wrap_content" |
571 | <LinearLayout | 562 | android:layout_height="wrap_content"/> |
572 | android:orientation="horizontal" | 563 | </LinearLayout> |
573 | android:gravity="center_vertical" | 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 | android:layout_width="wrap_content" | 611 | </LinearLayout> |
575 | android:layout_height="wrap_content"> | 612 | |
576 | <ImageView | 613 | <TextView |
577 | android:src="@drawable/png_icon_daily_blank" | 614 | android:text="每日作业正确率" |
578 | android:layout_width="12dp" | 615 | android:textSize="13sp" |
579 | android:layout_height="13dp"/> | 616 | android:textColor="#333" |
580 | <TextView | 617 | android:textStyle="bold" |
581 | android:text="未做题数" | 618 | android:layout_gravity="center_horizontal" |
582 | android:textSize="11sp" | 619 | android:layout_marginTop="68dp" |
583 | android:textColor="#333" | 620 | android:layout_width="wrap_content" |
584 | android:textStyle="bold" | 621 | android:layout_height="wrap_content"/> |
585 | android:layout_marginStart="5dp" | 622 | <com.github.mikephil.charting.charts.LineChart |
586 | android:layout_width="wrap_content" | 623 | android:id="@+id/lineChart" |
587 | android:layout_height="wrap_content"/> | 624 | android:layout_width="match_parent" |
588 | </LinearLayout> | 625 | android:layout_height="220dp"/> |
589 | <LinearLayout | 626 | <Space style="@style/empty_space"/> |
590 | android:orientation="horizontal" | 627 | <FrameLayout |
591 | android:layout_marginTop="8dp" | 628 | android:layout_width="match_parent" |
592 | android:layout_width="wrap_content" | 629 | android:layout_height="wrap_content"> |
593 | android:layout_height="wrap_content"> | 630 | <ImageView |
594 | <TextView | 631 | android:src="@drawable/png_hy_summary_comment" |
595 | android:id="@+id/tvTotalBlank" | 632 | android:layout_width="16dp" |
596 | tools:text="88" | 633 | android:layout_height="20dp"/> |
597 | android:textSize="14sp" | 634 | <TextView |
598 | android:textColor="#3BC3B6" | 635 | android:id="@+id/tvRating" |
599 | android:textStyle="bold" | 636 | android:textSize="14sp" |
600 | android:layout_width="wrap_content" | 637 | android:textColor="#333" |
601 | android:layout_height="wrap_content"/> | 638 | android:lineSpacingMultiplier="1.3" |
602 | <TextView | 639 | android:layout_marginTop="2dp" |
603 | android:text="道" | 640 | android:layout_width="match_parent" |
604 | android:textSize="9sp" | 641 | android:layout_height="wrap_content"/> |
605 | android:textColor="#3BC3B6" | 642 | </FrameLayout> |
606 | android:textStyle="bold" | 643 | </LinearLayout> |
607 | android:layout_width="wrap_content" | 644 | |
608 | android:layout_height="wrap_content"/> | 645 | <LinearLayout |
609 | </LinearLayout> | 646 | android:orientation="vertical" |
610 | </LinearLayout> | 647 | android:background="@drawable/shape_radius_10" |
611 | </LinearLayout> | 648 | android:backgroundTint="@color/white" |
612 | 649 | android:padding="12dp" | |
613 | <TextView | 650 | android:layout_marginHorizontal="14dp" |
614 | android:text="每日作业正确率" | 651 | android:layout_width="335dp" |
615 | android:textSize="13sp" | 652 | android:layout_height="472dp"> |
616 | android:textColor="#333" | 653 | <TextView |
617 | android:textStyle="bold" | 654 | android:text="知识点掌握情况" |
618 | android:layout_gravity="center_horizontal" | 655 | android:textSize="16sp" |
619 | android:layout_marginTop="68dp" | 656 | android:textColor="#333333" |
620 | android:layout_width="wrap_content" | 657 | android:textStyle="bold" |
621 | android:layout_height="wrap_content"/> | 658 | android:background="@drawable/bg_hy_point_title" |
622 | <com.github.mikephil.charting.charts.LineChart | 659 | android:paddingStart="28dp" |
623 | android:id="@+id/lineChart" | 660 | android:paddingEnd="4dp" |
624 | android:layout_width="match_parent" | 661 | android:layout_marginTop="8dp" |
625 | android:layout_height="220dp"/> | 662 | android:layout_gravity="center_horizontal" |
626 | <Space style="@style/empty_space"/> | 663 | android:layout_width="wrap_content" |
627 | <FrameLayout | 664 | android:layout_height="wrap_content"/> |
628 | android:layout_width="match_parent" | 665 | |
629 | android:layout_height="wrap_content"> | 666 | <LinearLayout |
630 | <ImageView | 667 | android:orientation="horizontal" |
631 | android:src="@drawable/png_hy_summary_comment" | 668 | android:layout_width="match_parent" |
632 | android:layout_width="16dp" | 669 | android:layout_height="70dp" |
633 | android:layout_height="20dp"/> | 670 | android:layout_marginTop="48dp" |
671 | android:baselineAligned="false"> | ||
634 | <TextView | 672 | <LinearLayout |
635 | android:id="@+id/tvRating" | 673 | android:orientation="vertical" |
636 | android:textSize="14sp" | 674 | android:background="@drawable/shape_radius_10" |
637 | android:textColor="#333" | 675 | android:backgroundTint="#F4FAFF" |
638 | android:lineSpacingMultiplier="1.3" | 676 | android:gravity="center_horizontal" |
639 | android:layout_marginTop="2dp" | 677 | android:paddingTop="8dp" |
640 | android:layout_width="match_parent" | 678 | android:layout_width="0dp" |
641 | android:layout_height="wrap_content"/> | 679 | android:layout_height="match_parent" |
642 | </FrameLayout> | 680 | android:layout_weight="1"> |
643 | </LinearLayout> | 681 | <ImageView |
644 | 682 | android:src="@drawable/png_ic_excellent" | |
645 | <LinearLayout | 683 | android:backgroundTint="#3BC3B6" |
646 | android:orientation="vertical" | 684 | android:background="@drawable/bg_circle" |
647 | android:background="@drawable/shape_radius_10" | 685 | android:padding="4dp" |
648 | android:backgroundTint="@color/white" | 686 | android:layout_width="20dp" |
649 | android:padding="12dp" | 687 | android:layout_height="20dp"/> |
650 | android:layout_marginHorizontal="14dp" | 688 | <TextView |
651 | android:layout_width="335dp" | 689 | android:id="@+id/tvExcellent" |
652 | android:layout_height="472dp"> | 690 | android:text="-" |
653 | <TextView | 691 | android:textColor="#3BC3B6" |
654 | android:text="知识点掌握情况" | 692 | android:textSize="13sp" |
655 | android:textSize="16sp" | 693 | android:textStyle="bold" |
656 | android:textColor="#333333" | 694 | android:layout_marginTop="4dp" |
657 | android:textStyle="bold" | 695 | android:layout_width="wrap_content" |
658 | android:background="@drawable/bg_hy_point_title" | 696 | android:layout_height="wrap_content"/> |
659 | android:paddingStart="28dp" | 697 | <TextView |
660 | android:paddingEnd="4dp" | 698 | android:text="掌握优秀" |
661 | android:layout_marginTop="8dp" | 699 | android:textSize="10sp" |
662 | android:layout_gravity="center_horizontal" | 700 | android:textColor="#333" |
663 | android:layout_width="wrap_content" | 701 | android:textStyle="bold" |
664 | android:layout_height="wrap_content"/> | 702 | android:layout_width="wrap_content" |
665 | 703 | android:layout_height="wrap_content"/> | |
666 | <LinearLayout | 704 | </LinearLayout> |
667 | android:orientation="horizontal" | 705 | <LinearLayout |
668 | android:layout_width="match_parent" | 706 | android:orientation="vertical" |
669 | android:layout_height="70dp" | 707 | android:background="@drawable/shape_radius_10" |
670 | android:layout_marginTop="48dp" | 708 | android:backgroundTint="#F4FAFF" |
671 | android:baselineAligned="false"> | 709 | android:gravity="center_horizontal" |
672 | <LinearLayout | 710 | android:paddingTop="8dp" |
673 | android:orientation="vertical" | 711 | android:layout_marginStart="14dp" |
674 | android:background="@drawable/shape_radius_10" | 712 | android:layout_width="0dp" |
675 | android:backgroundTint="#F4FAFF" | 713 | android:layout_height="match_parent" |
676 | android:gravity="center_horizontal" | 714 | android:layout_weight="1"> |
677 | android:paddingTop="8dp" | 715 | <ImageView |
678 | android:layout_width="0dp" | 716 | android:src="@drawable/png_ic_good" |
679 | android:layout_height="match_parent" | 717 | android:backgroundTint="#489AFA" |
680 | android:layout_weight="1"> | 718 | android:background="@drawable/bg_circle" |
681 | <ImageView | 719 | android:padding="4dp" |
682 | android:src="@drawable/png_ic_excellent" | 720 | android:layout_width="20dp" |
683 | android:backgroundTint="#3BC3B6" | 721 | android:layout_height="20dp"/> |
684 | android:background="@drawable/bg_circle" | 722 | <TextView |
685 | android:padding="4dp" | 723 | android:id="@+id/tvGood" |
686 | android:layout_width="20dp" | 724 | android:text="-" |
687 | android:layout_height="20dp"/> | 725 | android:textColor="#489AFA" |
688 | <TextView | 726 | android:textSize="13sp" |
689 | android:id="@+id/tvExcellent" | 727 | android:textStyle="bold" |
690 | android:text="-" | 728 | android:layout_marginTop="4dp" |
691 | android:textColor="#3BC3B6" | 729 | android:layout_width="wrap_content" |
692 | android:textSize="13sp" | 730 | android:layout_height="wrap_content"/> |
693 | android:textStyle="bold" | 731 | <TextView |
694 | android:layout_marginTop="4dp" | 732 | android:text="掌握良好" |
695 | android:layout_width="wrap_content" | 733 | android:textSize="10sp" |
696 | android:layout_height="wrap_content"/> | 734 | android:textColor="#333" |
697 | <TextView | 735 | android:textStyle="bold" |
698 | android:text="掌握优秀" | 736 | android:layout_width="wrap_content" |
699 | android:textSize="10sp" | 737 | android:layout_height="wrap_content"/> |
700 | android:textColor="#333" | 738 | </LinearLayout> |
701 | android:textStyle="bold" | 739 | <LinearLayout |
702 | android:layout_width="wrap_content" | 740 | android:orientation="vertical" |
703 | android:layout_height="wrap_content"/> | 741 | android:background="@drawable/shape_radius_10" |
704 | </LinearLayout> | 742 | android:backgroundTint="#F4FAFF" |
705 | <LinearLayout | 743 | android:gravity="center_horizontal" |
706 | android:orientation="vertical" | 744 | android:paddingTop="8dp" |
707 | android:background="@drawable/shape_radius_10" | 745 | android:layout_marginStart="14dp" |
708 | android:backgroundTint="#F4FAFF" | 746 | android:layout_width="0dp" |
709 | android:gravity="center_horizontal" | 747 | android:layout_height="match_parent" |
710 | android:paddingTop="8dp" | 748 | android:layout_weight="1"> |
711 | android:layout_marginStart="14dp" | 749 | <ImageView |
712 | android:layout_width="0dp" | 750 | android:src="@drawable/png_ic_normal" |
713 | android:layout_height="match_parent" | 751 | android:backgroundTint="#F58725" |
714 | android:layout_weight="1"> | 752 | android:background="@drawable/bg_circle" |
715 | <ImageView | 753 | android:padding="4dp" |
716 | android:src="@drawable/png_ic_good" | 754 | android:layout_width="20dp" |
717 | android:backgroundTint="#489AFA" | 755 | android:layout_height="20dp"/> |
718 | android:background="@drawable/bg_circle" | 756 | <TextView |
719 | android:padding="4dp" | 757 | android:id="@+id/tvNormal" |
720 | android:layout_width="20dp" | 758 | android:text="-" |
721 | android:layout_height="20dp"/> | 759 | android:textColor="#F58725" |
722 | <TextView | 760 | android:textSize="13sp" |
723 | android:id="@+id/tvGood" | 761 | android:textStyle="bold" |
724 | android:text="-" | 762 | android:layout_marginTop="4dp" |
725 | android:textColor="#489AFA" | 763 | android:layout_width="wrap_content" |
726 | android:textSize="13sp" | 764 | android:layout_height="wrap_content"/> |
727 | android:textStyle="bold" | 765 | <TextView |
728 | android:layout_marginTop="4dp" | 766 | android:text="掌握一般" |
729 | android:layout_width="wrap_content" | 767 | android:textSize="10sp" |
730 | android:layout_height="wrap_content"/> | 768 | android:textColor="#333" |
731 | <TextView | 769 | android:textStyle="bold" |
732 | android:text="掌握良好" | 770 | android:layout_width="wrap_content" |
733 | android:textSize="10sp" | 771 | android:layout_height="wrap_content"/> |
734 | android:textColor="#333" | 772 | </LinearLayout> |
735 | android:textStyle="bold" | 773 | <LinearLayout |
736 | android:layout_width="wrap_content" | 774 | android:orientation="vertical" |
737 | android:layout_height="wrap_content"/> | 775 | android:background="@drawable/shape_radius_10" |
738 | </LinearLayout> | 776 | android:backgroundTint="#F4FAFF" |
739 | <LinearLayout | 777 | android:gravity="center_horizontal" |
740 | android:orientation="vertical" | 778 | android:paddingTop="8dp" |
741 | android:background="@drawable/shape_radius_10" | 779 | android:layout_marginStart="14dp" |
742 | android:backgroundTint="#F4FAFF" | 780 | android:layout_width="0dp" |
743 | android:gravity="center_horizontal" | 781 | android:layout_height="match_parent" |
744 | android:paddingTop="8dp" | 782 | android:layout_weight="1"> |
745 | android:layout_marginStart="14dp" | 783 | <ImageView |
746 | android:layout_width="0dp" | 784 | android:src="@drawable/png_ic_weak" |
747 | android:layout_height="match_parent" | 785 | android:backgroundTint="#EA5127" |
748 | android:layout_weight="1"> | 786 | android:background="@drawable/bg_circle" |
749 | <ImageView | 787 | android:padding="4dp" |
750 | android:src="@drawable/png_ic_normal" | 788 | android:layout_width="20dp" |
751 | android:backgroundTint="#F58725" | 789 | android:layout_height="20dp"/> |
752 | android:background="@drawable/bg_circle" | 790 | <TextView |
753 | android:padding="4dp" | 791 | android:id="@+id/tvWeak" |
754 | android:layout_width="20dp" | 792 | android:text="-" |
755 | android:layout_height="20dp"/> | 793 | android:textColor="#EA5127" |
756 | <TextView | 794 | android:textSize="13sp" |
757 | android:id="@+id/tvNormal" | 795 | android:textStyle="bold" |
758 | android:text="-" | 796 | android:layout_marginTop="4dp" |
759 | android:textColor="#F58725" | 797 | android:layout_width="wrap_content" |
760 | android:textSize="13sp" | 798 | android:layout_height="wrap_content"/> |
761 | android:textStyle="bold" | 799 | <TextView |
762 | android:layout_marginTop="4dp" | 800 | android:text="掌握薄弱" |
763 | android:layout_width="wrap_content" | 801 | android:textSize="10sp" |
764 | android:layout_height="wrap_content"/> | 802 | android:textColor="#333" |
765 | <TextView | 803 | android:textStyle="bold" |
766 | android:text="掌握一般" | 804 | android:layout_width="wrap_content" |
767 | android:textSize="10sp" | 805 | android:layout_height="wrap_content"/> |
768 | android:textColor="#333" | 806 | </LinearLayout> |
769 | android:textStyle="bold" | 807 | </LinearLayout> |
770 | android:layout_width="wrap_content" | 808 | |
771 | android:layout_height="wrap_content"/> | 809 | <FrameLayout |
772 | </LinearLayout> | 810 | android:layout_gravity="center_horizontal" |
773 | <LinearLayout | 811 | android:layout_marginTop="36dp" |
774 | android:orientation="vertical" | 812 | android:layout_width="238dp" |
775 | android:background="@drawable/shape_radius_10" | 813 | android:layout_height="238dp"> |
776 | android:backgroundTint="#F4FAFF" | 814 | <com.littlejie.circleprogress.CircleProgress |
777 | android:gravity="center_horizontal" | 815 | android:id="@+id/cpBase" |
778 | android:paddingTop="8dp" | 816 | app:value="0" |
779 | android:layout_marginStart="14dp" | 817 | app:arcWidth="48dp" |
780 | android:layout_width="0dp" | 818 | app:bgArcWidth="48dp" |
781 | android:layout_height="match_parent" | 819 | app:bgArcColor="#3BC3B6" |
782 | android:layout_weight="1"> | 820 | app:startAngle="0" |
783 | <ImageView | 821 | app:sweepAngle="360" |
784 | android:src="@drawable/png_ic_weak" | 822 | app:hintColor="@color/transparent" |
785 | android:backgroundTint="#EA5127" | 823 | app:unitColor="@color/transparent" |
786 | android:background="@drawable/bg_circle" | 824 | app:valueColor="@color/transparent" |
787 | android:padding="4dp" | 825 | android:layout_width="match_parent" |
788 | android:layout_width="20dp" | 826 | android:layout_height="match_parent"/> |
789 | android:layout_height="20dp"/> | 827 | <com.littlejie.circleprogress.CircleProgress |
790 | <TextView | 828 | android:id="@+id/cpGood" |
791 | android:id="@+id/tvWeak" | 829 | app:value="0" |
792 | android:text="-" | 830 | app:arcWidth="48dp" |
793 | android:textColor="#EA5127" | 831 | app:bgArcWidth="48dp" |
794 | android:textSize="13sp" | 832 | app:arcColors="#489AFA" |
795 | android:textStyle="bold" | 833 | app:bgArcColor="@color/transparent" |
796 | android:layout_marginTop="4dp" | 834 | app:startAngle="0" |
797 | android:layout_width="wrap_content" | 835 | app:sweepAngle="360" |
798 | android:layout_height="wrap_content"/> | 836 | app:hintColor="@color/transparent" |
799 | <TextView | 837 | app:unitColor="@color/transparent" |
800 | android:text="掌握薄弱" | 838 | app:valueColor="@color/transparent" |
801 | android:textSize="10sp" | 839 | android:layout_width="match_parent" |
802 | android:textColor="#333" | 840 | android:layout_height="match_parent"/> |
803 | android:textStyle="bold" | 841 | <com.littlejie.circleprogress.CircleProgress |
804 | android:layout_width="wrap_content" | 842 | android:id="@+id/cpNormal" |
805 | android:layout_height="wrap_content"/> | 843 | app:value="0" |
806 | </LinearLayout> | 844 | app:arcWidth="48dp" |
807 | </LinearLayout> | 845 | app:bgArcWidth="48dp" |
808 | 846 | app:arcColors="#F58725" | |
809 | <FrameLayout | 847 | app:bgArcColor="@color/transparent" |
810 | android:layout_gravity="center_horizontal" | 848 | app:startAngle="0" |
811 | android:layout_marginTop="36dp" | 849 | app:sweepAngle="360" |
812 | android:layout_width="238dp" | 850 | app:hintColor="@color/transparent" |
813 | android:layout_height="238dp"> | 851 | app:unitColor="@color/transparent" |
814 | <com.littlejie.circleprogress.CircleProgress | 852 | app:valueColor="@color/transparent" |
815 | android:id="@+id/cpBase" | 853 | android:layout_width="match_parent" |
816 | app:value="0" | 854 | android:layout_height="match_parent"/> |
817 | app:arcWidth="48dp" | 855 | <com.littlejie.circleprogress.CircleProgress |
818 | app:bgArcWidth="48dp" | 856 | android:id="@+id/cpWeak" |
819 | app:bgArcColor="#3BC3B6" | 857 | app:value="0" |
820 | app:startAngle="0" | 858 | app:arcWidth="48dp" |
821 | app:sweepAngle="360" | 859 | app:bgArcWidth="48dp" |
822 | app:hintColor="@color/transparent" | 860 | app:arcColors="#EA5127" |
823 | app:unitColor="@color/transparent" | 861 | app:bgArcColor="@color/transparent" |
824 | app:valueColor="@color/transparent" | 862 | app:startAngle="0" |
825 | android:layout_width="match_parent" | 863 | app:sweepAngle="360" |
826 | android:layout_height="match_parent"/> | 864 | app:hintColor="@color/transparent" |
827 | <com.littlejie.circleprogress.CircleProgress | 865 | app:unitColor="@color/transparent" |
828 | android:id="@+id/cpGood" | 866 | app:valueColor="@color/transparent" |
829 | app:value="0" | 867 | android:layout_width="match_parent" |
830 | app:arcWidth="48dp" | 868 | android:layout_height="match_parent"/> |
831 | app:bgArcWidth="48dp" | 869 | |
832 | app:arcColors="#489AFA" | 870 | <LinearLayout |
833 | app:bgArcColor="@color/transparent" | 871 | android:orientation="vertical" |
834 | app:startAngle="0" | 872 | android:gravity="center_horizontal" |
835 | app:sweepAngle="360" | 873 | android:layout_gravity="center" |
836 | app:hintColor="@color/transparent" | 874 | android:layout_width="wrap_content" |
837 | app:unitColor="@color/transparent" | 875 | android:layout_height="wrap_content"> |
838 | app:valueColor="@color/transparent" | 876 | <LinearLayout |
839 | android:layout_width="match_parent" | 877 | android:layout_width="wrap_content" |
840 | android:layout_height="match_parent"/> | 878 | android:layout_height="wrap_content"> |
841 | <com.littlejie.circleprogress.CircleProgress | 879 | <TextView |
842 | android:id="@+id/cpNormal" | 880 | android:id="@+id/tvAvePoint" |
843 | app:value="0" | 881 | tools:text="88" |
844 | app:arcWidth="48dp" | 882 | android:textSize="34sp" |
845 | app:bgArcWidth="48dp" | 883 | android:textColor="#3BC3B6" |
846 | app:arcColors="#F58725" | 884 | android:textStyle="bold" |
847 | app:bgArcColor="@color/transparent" | 885 | android:layout_width="wrap_content" |
848 | app:startAngle="0" | 886 | android:layout_height="wrap_content"/> |
849 | app:sweepAngle="360" | 887 | <TextView |
850 | app:hintColor="@color/transparent" | 888 | android:text="%" |
851 | app:unitColor="@color/transparent" | 889 | android:textSize="16sp" |
852 | app:valueColor="@color/transparent" | 890 | android:textColor="#3BC3B6" |
853 | android:layout_width="match_parent" | 891 | android:layout_width="wrap_content" |
854 | android:layout_height="match_parent"/> | 892 | android:layout_height="wrap_content"/> |
855 | <com.littlejie.circleprogress.CircleProgress | 893 | </LinearLayout> |
856 | android:id="@+id/cpWeak" | 894 | <TextView |
857 | app:value="0" | 895 | android:text="综合掌握程度" |
858 | app:arcWidth="48dp" | 896 | android:textSize="16sp" |
859 | app:bgArcWidth="48dp" | 897 | android:textColor="#333" |
860 | app:arcColors="#EA5127" | 898 | android:textStyle="bold" |
861 | app:bgArcColor="@color/transparent" | 899 | android:layout_marginTop="-2dp" |
862 | app:startAngle="0" | 900 | android:layout_width="wrap_content" |
863 | app:sweepAngle="360" | 901 | android:layout_height="wrap_content"/> |
864 | app:hintColor="@color/transparent" | 902 | </LinearLayout> |
865 | app:unitColor="@color/transparent" | 903 | </FrameLayout> |
866 | app:valueColor="@color/transparent" | 904 | </LinearLayout> |
867 | android:layout_width="match_parent" | 905 | |
868 | android:layout_height="match_parent"/> | 906 | <LinearLayout |
907 | android:id="@+id/viewTable" | ||
869 | 908 | android:orientation="vertical" | |
870 | <LinearLayout | 909 | android:background="@drawable/shape_radius_10" |
871 | android:orientation="vertical" | 910 | android:backgroundTint="@color/white" |
872 | android:gravity="center_horizontal" | 911 | android:padding="16dp" |
873 | android:layout_gravity="center" | 912 | android:layout_marginHorizontal="14dp" |
874 | android:layout_width="wrap_content" | 913 | android:layout_width="335dp" |
875 | android:layout_height="wrap_content"> | 914 | android:layout_height="472dp"> |
876 | <LinearLayout | 915 | <TextView |
877 | android:layout_width="wrap_content" | 916 | android:text="学习效果分析" |
878 | android:layout_height="wrap_content"> | 917 | android:textSize="16sp" |
879 | <TextView | 918 | android:textColor="#333333" |
880 | android:id="@+id/tvAvePoint" | 919 | android:textStyle="bold" |
881 | tools:text="88" | 920 | android:background="@drawable/bg_hy_analyse_title" |
882 | android:textSize="34sp" | 921 | android:paddingStart="24dp" |
883 | android:textColor="#3BC3B6" | 922 | android:paddingEnd="4dp" |
884 | android:textStyle="bold" | 923 | android:layout_marginTop="4dp" |
885 | android:layout_width="wrap_content" | 924 | android:layout_gravity="center_horizontal" |
886 | android:layout_height="wrap_content"/> | 925 | android:layout_width="wrap_content" |
887 | <TextView | 926 | android:layout_height="wrap_content"/> |
888 | android:text="%" | 927 | |
889 | android:textSize="16sp" | 928 | <LinearLayout |
890 | android:textColor="#3BC3B6" | 929 | android:id="@+id/flEmptyPoints" |
891 | android:layout_width="wrap_content" | 930 | android:visibility="gone" |
892 | android:layout_height="wrap_content"/> | 931 | android:orientation="vertical" |
893 | </LinearLayout> | 932 | android:gravity="center_horizontal" |
894 | <TextView | 933 | android:layout_marginTop="80dp" |
895 | android:text="综合掌握程度" | 934 | android:layout_width="match_parent" |
896 | android:textSize="16sp" | 935 | android:layout_height="wrap_content"> |
897 | android:textColor="#333" | 936 | <ImageView |
898 | android:textStyle="bold" | 937 | android:src="@drawable/png_huyou_points_empty" |
899 | android:layout_marginTop="-2dp" | 938 | android:layout_width="195dp" |
900 | android:layout_width="wrap_content" | 939 | android:layout_height="145dp"/> |
901 | android:layout_height="wrap_content"/> | 940 | <TextView |
902 | </LinearLayout> | 941 | android:text="你太棒了!" |
903 | </FrameLayout> | 942 | android:textSize="20sp" |
904 | </LinearLayout> | 943 | android:textColor="#999" |
905 | 944 | android:layout_marginVertical="16dp" | |
906 | <LinearLayout | 945 | android:layout_width="wrap_content" |
907 | android:id="@+id/viewTable" | 946 | android:layout_height="wrap_content"/> |
908 | android:orientation="vertical" | 947 | </LinearLayout> |
909 | android:background="@drawable/shape_radius_10" | 948 | |
910 | android:backgroundTint="@color/white" | 949 | |
911 | android:padding="16dp" | 950 | <LinearLayout |
912 | android:layout_marginHorizontal="14dp" | 951 | android:id="@+id/tableRoot" |
913 | android:layout_width="335dp" | 952 | android:orientation="vertical" |
914 | android:layout_height="472dp"> | 953 | android:background="@drawable/bg_huyou_table_bg" |
915 | <TextView | 954 | android:layout_marginTop="16dp" |
916 | android:text="学习效果分析" | 955 | android:layout_width="match_parent" |
917 | android:textSize="16sp" | 956 | android:layout_height="wrap_content"> |
918 | android:textColor="#333333" | 957 | <LinearLayout |
919 | android:textStyle="bold" | 958 | android:orientation="horizontal" |
920 | android:background="@drawable/bg_hy_analyse_title" | 959 | android:background="#50CEC2" |
921 | android:paddingStart="24dp" | 960 | android:layout_width="match_parent" |
922 | android:paddingEnd="4dp" | 961 | android:layout_height="60dp"> |
923 | android:layout_marginTop="4dp" | 962 | <TextView |
924 | android:layout_gravity="center_horizontal" | 963 | android:text="知识点名称" |
925 | android:layout_width="wrap_content" | 964 | android:textSize="13sp" |
926 | android:layout_height="wrap_content"/> | 965 | android:textColor="@color/white" |
927 | 966 | android:gravity="center" | |
928 | <LinearLayout | 967 | android:layout_weight="82" |
929 | android:id="@+id/flEmptyPoints" | 968 | android:layout_width="0dp" |
930 | android:visibility="gone" | 969 | android:layout_height="match_parent"/> |
931 | android:orientation="vertical" | 970 | <View |
932 | android:gravity="center_horizontal" | 971 | android:background="#38B3A7" |
933 | android:layout_marginTop="80dp" | 972 | android:layout_width="1dp" |
934 | android:layout_width="match_parent" | 973 | android:layout_height="match_parent"/> |
935 | android:layout_height="wrap_content"> | 974 | |
936 | <ImageView | 975 | <LinearLayout |
937 | android:src="@drawable/png_huyou_points_empty" | 976 | android:orientation="vertical" |
938 | android:layout_width="195dp" | 977 | android:layout_weight="72" |
939 | android:layout_height="145dp"/> | 978 | android:layout_width="0dp" |
940 | <TextView | 979 | android:layout_height="match_parent"> |
941 | android:text="你太棒了!" | 980 | <TextView |
942 | android:textSize="20sp" | 981 | android:text="学前" |
943 | android:textColor="#999" | 982 | android:textSize="13sp" |
944 | android:layout_marginVertical="16dp" | 983 | android:textColor="@color/white" |
945 | android:layout_width="wrap_content" | 984 | android:gravity="center" |
946 | android:layout_height="wrap_content"/> | 985 | android:layout_width="match_parent" |
947 | </LinearLayout> | 986 | android:layout_height="24dp"/> |
948 | 987 | <View | |
949 | 988 | android:background="#38B3A7" | |
950 | <LinearLayout | 989 | android:layout_width="match_parent" |
951 | android:id="@+id/tableRoot" | 990 | android:layout_height="1dp"/> |
952 | android:orientation="vertical" | 991 | <LinearLayout |
953 | android:background="@drawable/bg_huyou_table_bg" | 992 | android:orientation="horizontal" |
954 | android:layout_marginTop="16dp" | 993 | android:layout_width="match_parent" |
955 | android:layout_width="match_parent" | 994 | android:layout_height="match_parent"> |
956 | android:layout_height="wrap_content"> | 995 | <TextView |
957 | <LinearLayout | 996 | android:text="程\n度" |
958 | android:orientation="horizontal" | 997 | android:textSize="13sp" |
959 | android:background="#50CEC2" | 998 | android:textColor="@color/white" |
960 | android:layout_width="match_parent" | 999 | android:gravity="center" |
961 | android:layout_height="60dp"> | 1000 | android:layout_weight="1" |
962 | <TextView | 1001 | android:layout_width="0dp" |
963 | android:text="知识点名称" | 1002 | android:layout_height="wrap_content"/> |
964 | android:textSize="13sp" | 1003 | <View |
965 | android:textColor="@color/white" | 1004 | android:background="#38B3A7" |
966 | android:gravity="center" | 1005 | android:layout_width="1dp" |
967 | android:layout_weight="82" | 1006 | android:layout_height="match_parent"/> |
968 | android:layout_width="0dp" | 1007 | <TextView |
969 | android:layout_height="match_parent"/> | 1008 | android:text="状\n态" |
970 | <View | 1009 | android:textSize="13sp" |
971 | android:background="#38B3A7" | 1010 | android:textColor="@color/white" |
972 | android:layout_width="1dp" | 1011 | android:gravity="center" |
973 | android:layout_height="match_parent"/> | 1012 | android:layout_weight="1" |
974 | 1013 | android:layout_width="0dp" | |
975 | <LinearLayout | 1014 | android:layout_height="wrap_content"/> |
976 | android:orientation="vertical" | 1015 | </LinearLayout> |
977 | android:layout_weight="72" | 1016 | </LinearLayout> |
978 | android:layout_width="0dp" | 1017 | |
979 | android:layout_height="match_parent"> | 1018 | <View |
980 | <TextView | 1019 | android:background="#38B3A7" |
981 | android:text="学前" | 1020 | android:layout_width="1dp" |
982 | android:textSize="13sp" | 1021 | android:layout_height="match_parent"/> |
983 | android:textColor="@color/white" | 1022 | |
984 | android:gravity="center" | 1023 | <LinearLayout |
985 | android:layout_width="match_parent" | 1024 | android:orientation="vertical" |
986 | android:layout_height="24dp"/> | 1025 | android:layout_weight="72" |
987 | <View | 1026 | android:layout_width="0dp" |
988 | android:background="#38B3A7" | 1027 | android:layout_height="match_parent"> |
989 | android:layout_width="match_parent" | 1028 | <TextView |
990 | android:layout_height="1dp"/> | 1029 | android:text="学后" |
991 | <LinearLayout | 1030 | android:textSize="13sp" |
992 | android:orientation="horizontal" | 1031 | android:textColor="@color/white" |
993 | android:layout_width="match_parent" | 1032 | android:gravity="center" |
994 | android:layout_height="match_parent"> | 1033 | android:layout_width="match_parent" |
995 | <TextView | 1034 | android:layout_height="24dp"/> |
996 | android:text="程\n度" | 1035 | <View |
997 | android:textSize="13sp" | 1036 | android:background="#38B3A7" |
998 | android:textColor="@color/white" | 1037 | android:layout_width="match_parent" |
999 | android:gravity="center" | 1038 | android:layout_height="1dp"/> |
1000 | android:layout_weight="1" | 1039 | <LinearLayout |
1001 | android:layout_width="0dp" | 1040 | android:orientation="horizontal" |
1002 | android:layout_height="wrap_content"/> | 1041 | android:layout_width="match_parent" |
1003 | <View | 1042 | android:layout_height="match_parent"> |
1004 | android:background="#38B3A7" | 1043 | <TextView |
1005 | android:layout_width="1dp" | 1044 | android:text="程\n度" |
1006 | android:layout_height="match_parent"/> | 1045 | android:textSize="13sp" |
1007 | <TextView | 1046 | android:textColor="@color/white" |
1008 | android:text="状\n态" | 1047 | android:gravity="center" |
1009 | android:textSize="13sp" | 1048 | android:layout_weight="1" |
1010 | android:textColor="@color/white" | 1049 | android:layout_width="0dp" |
1011 | android:gravity="center" | 1050 | android:layout_height="wrap_content"/> |
1012 | android:layout_weight="1" | 1051 | <View |
1013 | android:layout_width="0dp" | 1052 | android:background="#38B3A7" |
1014 | android:layout_height="wrap_content"/> | 1053 | android:layout_width="1dp" |
1015 | </LinearLayout> | 1054 | android:layout_height="match_parent"/> |
1016 | </LinearLayout> | 1055 | <TextView |
1017 | 1056 | android:text="状\n态" | |
1018 | <View | 1057 | android:textSize="13sp" |
1019 | android:background="#38B3A7" | 1058 | android:textColor="@color/white" |
1020 | android:layout_width="1dp" | 1059 | android:gravity="center" |
1021 | android:layout_height="match_parent"/> | 1060 | android:layout_weight="1" |
1022 | 1061 | android:layout_width="0dp" | |
1023 | <LinearLayout | 1062 | android:layout_height="wrap_content"/> |
1024 | android:orientation="vertical" | 1063 | </LinearLayout> |
1025 | android:layout_weight="72" | 1064 | |
1026 | android:layout_width="0dp" | 1065 | </LinearLayout> |
1027 | android:layout_height="match_parent"> | 1066 | |
1028 | <TextView | 1067 | <View |
1029 | android:text="学后" | 1068 | android:background="#38B3A7" |
1030 | android:textSize="13sp" | 1069 | android:layout_width="1dp" |
1031 | android:textColor="@color/white" | 1070 | android:layout_height="match_parent"/> |
1032 | android:gravity="center" | 1071 | <TextView |
1033 | android:layout_width="match_parent" | 1072 | android:text="进步\n幅度" |
1034 | android:layout_height="24dp"/> | 1073 | android:textSize="13sp" |
1035 | <View | 1074 | android:textColor="@color/white" |
1036 | android:background="#38B3A7" | 1075 | android:gravity="center" |
1037 | android:layout_width="match_parent" | 1076 | android:layout_weight="50" |
1038 | android:layout_height="1dp"/> | 1077 | android:layout_width="0dp" |
1039 | <LinearLayout | 1078 | android:layout_height="match_parent"/> |
1040 | android:orientation="horizontal" | 1079 | <View |
1041 | android:layout_width="match_parent" | 1080 | android:background="#38B3A7" |
1042 | android:layout_height="match_parent"> | 1081 | android:layout_width="1dp" |
1043 | <TextView | 1082 | android:layout_height="match_parent"/> |
1044 | android:text="程\n度" | 1083 | <TextView |
1045 | android:textSize="13sp" | 1084 | android:text="正答\n率" |
1046 | android:textColor="@color/white" | 1085 | android:textSize="13sp" |
1047 | android:gravity="center" | 1086 | android:textColor="@color/white" |
1048 | android:layout_weight="1" | 1087 | android:gravity="center" |
1049 | android:layout_width="0dp" | 1088 | android:layout_weight="38" |
1050 | android:layout_height="wrap_content"/> | 1089 | android:layout_width="0dp" |
1051 | <View | 1090 | android:layout_height="match_parent"/> |
1052 | android:background="#38B3A7" | 1091 | </LinearLayout> |
1053 | android:layout_width="1dp" | 1092 | <androidx.recyclerview.widget.RecyclerView |
1054 | android:layout_height="match_parent"/> | 1093 | android:id="@+id/rvPoint" |
1055 | <TextView | 1094 | android:orientation="vertical" |
1056 | android:text="状\n态" | 1095 | app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" |
1057 | android:textSize="13sp" | 1096 | app:reverseLayout="false" |
1058 | android:textColor="@color/white" | 1097 | android:layout_width="match_parent" |
1059 | android:gravity="center" | 1098 | android:layout_height="wrap_content"/> |
1060 | android:layout_weight="1" | 1099 | </LinearLayout> |
1061 | android:layout_width="0dp" | 1100 | |
1062 | android:layout_height="wrap_content"/> | 1101 | <LinearLayout |
1063 | </LinearLayout> | 1102 | android:id="@+id/flPointDesc" |
1064 | 1103 | android:alpha="0" | |
1065 | </LinearLayout> | 1104 | android:orientation="horizontal" |
1066 | 1105 | android:gravity="center_vertical" | |
1067 | <View | 1106 | android:layout_marginTop="10dp" |
1068 | android:background="#38B3A7" | 1107 | android:layout_width="match_parent" |
1069 | android:layout_width="1dp" | 1108 | android:layout_height="wrap_content"> |
1070 | android:layout_height="match_parent"/> | 1109 | <ImageView |
1071 | <TextView | 1110 | android:src="@drawable/png_up" |
1072 | android:text="进步\n幅度" | 1111 | android:layout_width="12dp" |
1073 | android:textSize="13sp" | 1112 | android:layout_height="12dp"/> |
1074 | android:textColor="@color/white" | 1113 | <TextView |
1075 | android:gravity="center" | 1114 | android:text="代表进步幅度最大的知识点" |
1076 | android:layout_weight="50" | 1115 | android:textSize="12sp" |
1077 | android:layout_width="0dp" | 1116 | android:textColor="#666" |
1078 | android:layout_height="match_parent"/> | 1117 | android:layout_marginStart="8dp" |
1079 | <View | 1118 | android:layout_width="wrap_content" |
1080 | android:background="#38B3A7" | 1119 | android:layout_height="wrap_content"/> |
1081 | android:layout_width="1dp" | 1120 | </LinearLayout> |
1082 | android:layout_height="match_parent"/> | 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" |
app/src/main/res/layout/item_homework_detail.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:tools="http://schemas.android.com/tools" | 4 | xmlns:tools="http://schemas.android.com/tools" |
5 | android:id="@+id/root" | ||
5 | android:orientation="vertical" | 6 | android:orientation="vertical" |
6 | android:background="@drawable/shape_radius_10" | 7 | android:background="@drawable/shape_radius_10" |
7 | android:backgroundTint="@color/white" | ||
8 | android:paddingVertical="14dp" | 8 | android:paddingVertical="14dp" |
9 | android:layout_marginHorizontal="16dp" | 9 | android:layout_marginHorizontal="16dp" |
10 | android:layout_marginVertical="8dp" | 10 | android:layout_marginVertical="8dp" |
11 | android:layout_width="match_parent" | 11 | android:layout_width="match_parent" |
12 | android:layout_height="wrap_content" | 12 | android:layout_height="wrap_content" |
13 | tools:ignore="SmallSp"> | 13 | tools:ignore="SmallSp,HardcodedText"> |
14 | 14 | ||
15 | <LinearLayout | 15 | <LinearLayout |
16 | android:orientation="horizontal" | 16 | android:orientation="horizontal" |
17 | android:gravity="center_vertical" | 17 | android:gravity="center_vertical" |
18 | android:layout_marginStart="16dp" | 18 | android:layout_marginStart="16dp" |
19 | android:layout_width="match_parent" | 19 | android:layout_width="match_parent" |
20 | android:layout_height="wrap_content"> | 20 | android:layout_height="wrap_content"> |
21 | <CheckBox | 21 | <CheckBox |
22 | android:id="@+id/checkbox" | 22 | android:id="@+id/checkbox" |
23 | android:visibility="gone" | 23 | android:visibility="gone" |
24 | tools:visibility="visible" | 24 | tools:visibility="visible" |
25 | android:button="@drawable/chk_circle" | 25 | android:button="@drawable/chk_circle" |
26 | android:layout_marginEnd="5dp" | 26 | android:layout_marginEnd="5dp" |
27 | android:layout_width="16dp" | 27 | android:layout_width="16dp" |
28 | android:layout_height="16dp"/> | 28 | android:layout_height="16dp"/> |
29 | <TextView | 29 | <TextView |
30 | android:id="@+id/tvNumber" | 30 | android:id="@+id/tvNumber" |
31 | tools:text="第1题" | 31 | tools:text="第1题" |
32 | android:textSize="9sp" | 32 | android:textSize="9sp" |
33 | android:textColor="@color/white" | 33 | android:textColor="@color/white" |
34 | android:paddingHorizontal="7dp" | 34 | android:paddingHorizontal="7dp" |
35 | android:paddingVertical="3dp" | 35 | android:paddingVertical="3dp" |
36 | android:background="@drawable/shape_radius_5" | 36 | android:background="@drawable/shape_radius_5" |
37 | android:backgroundTint="#489AFA" | 37 | android:backgroundTint="#489AFA" |
38 | android:layout_width="wrap_content" | 38 | android:layout_width="wrap_content" |
39 | android:layout_height="wrap_content" /> | 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 | </LinearLayout> | 86 | </LinearLayout> |
41 | 87 | ||
42 | <ImageView | 88 | <ImageView |
43 | android:id="@+id/ivTopic" | 89 | android:id="@+id/ivTopic" |
44 | android:adjustViewBounds="true" | 90 | android:adjustViewBounds="true" |
45 | android:layout_marginStart="10dp" | 91 | android:layout_marginHorizontal="10dp" |
46 | android:layout_marginEnd="4dp" | ||
47 | android:layout_marginTop="14dp" | 92 | android:layout_marginTop="14dp" |
48 | android:layout_width="match_parent" | 93 | android:layout_width="match_parent" |
49 | android:layout_height="wrap_content" | 94 | android:layout_height="wrap_content" |
app/src/main/res/layout/item_huyou_week_point.xml
File was created | 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> |
libs/common/src/main/java/com/prws/common/bean/homework/Correction.java
1 | package com.prws.common.bean.homework; | File was deleted | |
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 | } | ||
17 | 1 | package com.prws.common.bean.homework; |
libs/common/src/main/java/com/prws/common/bean/homework/CorrectionSer.java
1 | package com.prws.common.bean.homework; | 1 | package com.prws.common.bean.homework; |
2 | 2 | ||
3 | public class CorrectionSer { | 3 | public class CorrectionSer { |
4 | public String brief; | 4 | public String brief; |
5 | public int correction; // 0 对, 1 错 | 5 | public int correction; // 0 对, 1 错, 2 未做题 |
6 | public int state; // 1: 已听懂; 2: 基本听懂; 3: 一般听懂 | 6 | public int state; // 1: 已听懂; 2: 基本听懂; 3: 一般听懂 |
7 | 7 | ||
8 | public CorrectionSer() { | 8 | public CorrectionSer() { |
9 | } | 9 | } |
10 | 10 | ||
11 | public CorrectionSer(String brief, int correction, int state) { | 11 | public CorrectionSer(String brief, int correction, int state) { |
12 | this.brief = brief; | 12 | this.brief = brief; |
13 | this.correction = correction; | 13 | this.correction = correction; |
14 | this.state = state; | 14 | this.state = state; |
15 | } | 15 | } |
16 | } | 16 | } |
17 | 17 |
libs/common/src/main/java/com/prws/common/bean/homework/HomeWork.java
1 | package com.prws.common.bean.homework; | 1 | package com.prws.common.bean.homework; |
2 | 2 | ||
3 | import com.google.gson.Gson; | 3 | import com.google.gson.Gson; |
4 | import com.google.gson.annotations.SerializedName; | 4 | import com.google.gson.annotations.SerializedName; |
5 | import com.google.gson.reflect.TypeToken; | 5 | import com.google.gson.reflect.TypeToken; |
6 | 6 | ||
7 | import java.io.Serializable; | 7 | import java.io.Serializable; |
8 | import java.util.ArrayList; | 8 | import java.util.ArrayList; |
9 | import java.util.List; | 9 | import java.util.List; |
10 | 10 | ||
11 | public class HomeWork implements Serializable { | 11 | public class HomeWork implements Serializable { |
12 | 12 | ||
13 | @SerializedName(value = "homeworkId", alternate = "id") | 13 | @SerializedName(value = "homeworkId", alternate = "id") |
14 | public String homeworkId; | 14 | public String homeworkId; |
15 | public String brief; | 15 | public String brief; |
16 | public String url; | 16 | public String url; |
17 | public String analyseUrl; | 17 | public String analyseUrl; |
18 | public String analyseVideoUrl; | 18 | public String analyseVideoUrl; |
19 | public Integer correction; | 19 | public Integer correction; |
20 | public String answer; | 20 | public String answer; |
21 | public String points; | 21 | public String points; |
22 | 22 | ||
23 | public boolean check = false; //选中为错题 | ||
24 | public transient int index = 0; | 23 | public transient int index = 0; |
25 | public transient int state = 1; | 24 | public transient int state = 1; |
26 | 25 | ||
27 | public transient List<KeyValue> pointsObj; | 26 | public transient List<KeyValue> pointsObj; |
28 | public void formatPoints(Gson gson) { | 27 | public void formatPoints(Gson gson) { |
29 | if (points == null) { | 28 | if (points == null) { |
30 | pointsObj = new ArrayList<>(); | 29 | pointsObj = new ArrayList<>(); |
31 | return; | 30 | return; |
32 | } | 31 | } |
33 | try { | 32 | try { |
34 | pointsObj = gson.fromJson(points, new TypeToken<List<KeyValue>>(){}.getType()); | 33 | pointsObj = gson.fromJson(points, new TypeToken<List<KeyValue>>(){}.getType()); |
35 | } catch (Exception e) { | 34 | } catch (Exception e) { |
36 | e.printStackTrace(); | 35 | e.printStackTrace(); |
37 | pointsObj = new ArrayList<>(); | 36 | pointsObj = new ArrayList<>(); |
38 | } | 37 | } |
39 | } | 38 | } |
40 | 39 | ||
41 | public CorrectionSer toSer() { | 40 | public CorrectionSer toSer() { |
42 | return new CorrectionSer(brief, check ? 1 : 0, state); | 41 | return new CorrectionSer(brief, correction, state); |
43 | } | 42 | } |
44 | } | 43 | } |
45 | 44 |
libs/common/src/main/java/com/prws/common/bean/homework/StDetail.java
1 | package com.prws.common.bean.homework; | 1 | package com.prws.common.bean.homework; |
2 | 2 | ||
3 | import com.google.gson.Gson; | 3 | import com.google.gson.Gson; |
4 | import com.google.gson.GsonBuilder; | 4 | import com.google.gson.GsonBuilder; |
5 | import com.google.gson.reflect.TypeToken; | 5 | import com.google.gson.reflect.TypeToken; |
6 | 6 | ||
7 | import java.util.ArrayList; | 7 | import java.util.ArrayList; |
8 | import java.util.Date; | 8 | import java.util.Date; |
9 | import java.util.List; | 9 | import java.util.List; |
10 | 10 | ||
11 | public class StDetail { | 11 | public class StDetail { |
12 | 12 | ||
13 | public String id; | 13 | public String id; |
14 | 14 | ||
15 | public String stuId; | 15 | public String stuId; |
16 | public Date startTime; | 16 | public Date startTime; |
17 | public Date endTime; | 17 | public Date endTime; |
18 | public String homeworkSubject; | 18 | public String homeworkSubject; |
19 | public String scId; | 19 | public String scId; |
20 | public String grade; | 20 | public String grade; |
21 | 21 | ||
22 | public int total; | 22 | public int total; |
23 | public int correct; | 23 | public int correct; |
24 | public int unfinished; | ||
24 | public int unfinished; | 25 | |
25 | 26 | public float mondayCorrection; | |
26 | public float mondayCorrection; | 27 | public float tuesdayCorrection; |
27 | public float tuesdayCorrection; | 28 | public float wednesdayCorrection; |
28 | public float wednesdayCorrection; | 29 | public float thursdayCorrection; |
29 | public float thursdayCorrection; | 30 | public float fridayCorrection; |
30 | public float fridayCorrection; | 31 | |
31 | 32 | public String correction; | |
32 | public String correction; | 33 | public transient List<Correction> correctionList; |
33 | public transient List<Correction> correctionList; | 34 | |
34 | 35 | public List<Point> points; | |
35 | public List<Point> points; | 36 | |
36 | 37 | public int type; | |
37 | public int type; | 38 | |
38 | 39 | public void formatCollection() { | |
39 | public void formatCollection() { | 40 | correctionList = new ArrayList<>(); |
40 | correctionList = new ArrayList<>(); | 41 | if (correction == null) { |
41 | if (correction == null) { | 42 | return; |
42 | return; | 43 | } |
43 | } | 44 | Gson gson = new GsonBuilder().setDateFormat("yyyy-MM-dd HH:mm:ss").create(); |
44 | Gson gson = new GsonBuilder().setDateFormat("yyyy-MM-dd HH:mm:ss").create(); | 45 | try { |
45 | try { | 46 | List<Correction> list = gson.fromJson(correction, new TypeToken<List<Correction>>(){}.getType()); |
46 | List<Correction> list = gson.fromJson(correction, new TypeToken<List<Correction>>(){}.getType()); | 47 | for (Correction item: list) { |
47 | for (Correction item: list) { | 48 | if (item != null && item.date != null) { |
48 | if (item != null && item.date != null) { | 49 | correctionList.add(item); |
49 | correctionList.add(item); | 50 | } |
50 | } | 51 | } |
51 | } | 52 | } catch (Exception e){ |
52 | } catch (Exception e){ | 53 | e.printStackTrace(); |
53 | e.printStackTrace(); | 54 | } |
54 | } | 55 | } |
55 | } | 56 | |
56 | 57 | public static class Point { | |
57 | public static class Point { | 58 | public String pointId; |
58 | public String pointId; | 59 | public String pointName; |
59 | public String pointName; | 60 | public float beforeState; |
60 | public float beforeState; | 61 | public float afterState; |
61 | public float afterState; | 62 | public float gap; |
62 | public float gap; | 63 | public float correctness; |
63 | public float correctness; | 64 | } |
64 | } | 65 | |
65 | 66 | public static class Correction { | |
66 | public static class Correction { | 67 | public float correction; |
67 | public float correction; | 68 | public Date date; |
68 | public Date date; | 69 | } |
69 | } | 70 | |
70 | 71 | } | |
71 | } | 72 |
libs/common/src/main/java/com/prws/common/net/NetWorks.java
1 | package com.prws.common.net; | 1 | package com.prws.common.net; |
2 | 2 | ||
3 | 3 | ||
4 | import com.google.gson.Gson; | 4 | import com.google.gson.Gson; |
5 | import com.google.gson.JsonObject; | 5 | import com.google.gson.JsonObject; |
6 | import com.prws.common.BuildConfig; | 6 | import com.prws.common.BuildConfig; |
7 | import com.prws.common.bean.CutPicBean; | 7 | import com.prws.common.bean.CutPicBean; |
8 | import com.prws.common.bean.GradeAndSubject; | 8 | import com.prws.common.bean.GradeAndSubject; |
9 | import com.prws.common.bean.PageInfo; | 9 | import com.prws.common.bean.PageInfo; |
10 | import com.prws.common.bean.ResponseResult; | 10 | import com.prws.common.bean.ResponseResult; |
11 | import com.prws.common.bean.ScheduleBean; | 11 | import com.prws.common.bean.ScheduleBean; |
12 | import com.prws.common.bean.Student; | 12 | import com.prws.common.bean.Student; |
13 | import com.prws.common.bean.Teacher; | 13 | import com.prws.common.bean.Teacher; |
14 | import com.prws.common.bean.TopicBean; | 14 | import com.prws.common.bean.TopicBean; |
15 | import com.prws.common.bean.UpdateBean; | 15 | import com.prws.common.bean.UpdateBean; |
16 | import com.prws.common.bean.User; | 16 | import com.prws.common.bean.User; |
17 | import com.prws.common.bean.baidu.BaiduInput; | 17 | import com.prws.common.bean.baidu.BaiduInput; |
18 | import com.prws.common.bean.homework.HomeWork; | 18 | import com.prws.common.bean.homework.HomeWork; |
19 | import com.prws.common.bean.homework.HomeworkDetail; | 19 | import com.prws.common.bean.homework.HomeworkDetail; |
20 | import com.prws.common.bean.homework.HomeworkList; | 20 | import com.prws.common.bean.homework.HomeworkList; |
21 | import com.prws.common.bean.homework.StDetail; | 21 | import com.prws.common.bean.homework.StDetail; |
22 | import com.prws.common.utils.BitmapUtils; | 22 | import com.prws.common.utils.BitmapUtils; |
23 | import com.prws.common.utils.SharedPreferencesUtil; | 23 | import com.prws.common.utils.SharedPreferencesUtil; |
24 | 24 | ||
25 | import java.io.File; | 25 | import java.io.File; |
26 | import java.util.HashMap; | 26 | import java.util.HashMap; |
27 | import java.util.List; | 27 | import java.util.List; |
28 | import java.util.Map; | 28 | import java.util.Map; |
29 | 29 | ||
30 | import io.reactivex.Observable; | 30 | import io.reactivex.Observable; |
31 | import io.reactivex.Observer; | 31 | import io.reactivex.Observer; |
32 | import io.reactivex.Single; | 32 | import io.reactivex.Single; |
33 | import io.reactivex.android.schedulers.AndroidSchedulers; | 33 | import io.reactivex.android.schedulers.AndroidSchedulers; |
34 | import io.reactivex.schedulers.Schedulers; | 34 | import io.reactivex.schedulers.Schedulers; |
35 | import okhttp3.MediaType; | 35 | import okhttp3.MediaType; |
36 | import okhttp3.MultipartBody; | 36 | import okhttp3.MultipartBody; |
37 | import okhttp3.RequestBody; | 37 | import okhttp3.RequestBody; |
38 | import okhttp3.ResponseBody; | 38 | import okhttp3.ResponseBody; |
39 | import retrofit2.Call; | 39 | import retrofit2.Call; |
40 | import retrofit2.Callback; | 40 | import retrofit2.Callback; |
41 | import retrofit2.http.Body; | 41 | import retrofit2.http.Body; |
42 | import retrofit2.http.GET; | 42 | import retrofit2.http.GET; |
43 | import retrofit2.http.Header; | 43 | import retrofit2.http.Header; |
44 | import retrofit2.http.Headers; | 44 | import retrofit2.http.Headers; |
45 | import retrofit2.http.Multipart; | 45 | import retrofit2.http.Multipart; |
46 | import retrofit2.http.POST; | 46 | import retrofit2.http.POST; |
47 | import retrofit2.http.PUT; | 47 | import retrofit2.http.PUT; |
48 | import retrofit2.http.Part; | 48 | import retrofit2.http.Part; |
49 | import retrofit2.http.PartMap; | 49 | import retrofit2.http.PartMap; |
50 | import retrofit2.http.Query; | 50 | import retrofit2.http.Query; |
51 | import retrofit2.http.Url; | 51 | import retrofit2.http.Url; |
52 | 52 | ||
53 | /** | 53 | /** |
54 | * 类名称:NetWorks | 54 | * 类名称:NetWorks |
55 | * 创建人: | 55 | * 创建人: |
56 | * <p> | 56 | * <p> |
57 | * 类描述:网络请求的操作类 | 57 | * 类描述:网络请求的操作类 |
58 | */ | 58 | */ |
59 | public class NetWorks extends RetrofitUtils { | 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 | //设缓存有效期为1天 | 63 | //设缓存有效期为1天 |
64 | protected static final long CACHE_STALE_SEC = 60 * 60 * 24 * 1; | 64 | protected static final long CACHE_STALE_SEC = 60 * 60 * 24 * 1; |
65 | //查询缓存的Cache-Control设置,使用缓存 | 65 | //查询缓存的Cache-Control设置,使用缓存 |
66 | protected static final String CACHE_CONTROL_CACHE = "only-if-cached, max-stale=" + CACHE_STALE_SEC; | 66 | protected static final String CACHE_CONTROL_CACHE = "only-if-cached, max-stale=" + CACHE_STALE_SEC; |
67 | //查询网络的Cache-Control设置。不使用缓存 | 67 | //查询网络的Cache-Control设置。不使用缓存 |
68 | protected static final String CACHE_CONTROL_NETWORK = "max-age=0"; | 68 | protected static final String CACHE_CONTROL_NETWORK = "max-age=0"; |
69 | 69 | ||
70 | 70 | ||
71 | public interface NetService { | 71 | public interface NetService { |
72 | 72 | ||
73 | 73 | ||
74 | @GET("/api/v1/user/logout") | 74 | @GET("/api/v1/user/logout") |
75 | Observable<ResponseBody> logout(); | 75 | Observable<ResponseBody> logout(); |
76 | 76 | ||
77 | @Multipart | 77 | @Multipart |
78 | @POST("/api/v1/user/upLoadAvatar") | 78 | @POST("/api/v1/user/upLoadAvatar") |
79 | Observable<ResponseBody> upLoadAvatar(@Header("Authorization") String token, @Part List<MultipartBody.Part> partLis); | 79 | Observable<ResponseBody> upLoadAvatar(@Header("Authorization") String token, @Part List<MultipartBody.Part> partLis); |
80 | 80 | ||
81 | 81 | ||
82 | @Headers("Content-Type: application/json") | 82 | @Headers("Content-Type: application/json") |
83 | @POST("/api/v1/user/editUser") | 83 | @POST("/api/v1/user/editUser") |
84 | Observable<ResponseBody> editUser(@Header("Authorization") String token, @Body RequestBody body); | 84 | Observable<ResponseBody> editUser(@Header("Authorization") String token, @Body RequestBody body); |
85 | 85 | ||
86 | @Headers("Content-Type: application/json") | 86 | @Headers("Content-Type: application/json") |
87 | @POST("/api/v1/user/changePassword") | 87 | @POST("/api/v1/user/changePassword") |
88 | Observable<ResponseBody> changePassword(@Header("Authorization") String token, @Body RequestBody body); | 88 | Observable<ResponseBody> changePassword(@Header("Authorization") String token, @Body RequestBody body); |
89 | 89 | ||
90 | 90 | ||
91 | @GET("/api/v1/user/searchById") | 91 | @GET("/api/v1/user/searchById") |
92 | Observable<ResponseBody> searchById(@Header("Authorization") String token, @Query("userId") String userId); | 92 | Observable<ResponseBody> searchById(@Header("Authorization") String token, @Query("userId") String userId); |
93 | 93 | ||
94 | 94 | ||
95 | @Headers("Content-Type: application/json") | 95 | @Headers("Content-Type: application/json") |
96 | @POST("/api/v1/login/userLogin") | 96 | @POST("/api/v1/login/userLogin") |
97 | Observable<ResponseBody> login(@Body RequestBody body); | 97 | Observable<ResponseBody> login(@Body RequestBody body); |
98 | 98 | ||
99 | @GET("/api/v1/resource/listGradeAndSubject") | 99 | @GET("/api/v1/resource/listGradeAndSubject") |
100 | Observable<ResponseResult<List<GradeAndSubject>>> listGradeAndSubject(@Header("Authorization") String token); | 100 | Observable<ResponseResult<List<GradeAndSubject>>> listGradeAndSubject(@Header("Authorization") String token); |
101 | 101 | ||
102 | 102 | ||
103 | @GET("/api/v1/manager/generalQrCode") | 103 | @GET("/api/v1/manager/generalQrCode") |
104 | Observable<ResponseBody> generalQrCode(); | 104 | Observable<ResponseBody> generalQrCode(); |
105 | 105 | ||
106 | @GET("/api/v1/parent/scanAndLogin") | 106 | @GET("/api/v1/parent/scanAndLogin") |
107 | Observable<ResponseBody> scanAndLogin(@Header("Authorization") String token, @Query("code") String code, @Query("stuId") String stuId); | 107 | Observable<ResponseBody> scanAndLogin(@Header("Authorization") String token, @Query("code") String code, @Query("stuId") String stuId); |
108 | 108 | ||
109 | @GET("/api/v1/parent/getChildrenList") | 109 | @GET("/api/v1/parent/getChildrenList") |
110 | Observable<ResponseBody> getChildrenList(@Header("Authorization") String token); | 110 | Observable<ResponseBody> getChildrenList(@Header("Authorization") String token); |
111 | 111 | ||
112 | 112 | ||
113 | @Headers("Content-Type: application/json") | 113 | @Headers("Content-Type: application/json") |
114 | @POST("/api/v1/parent/registerParent") | 114 | @POST("/api/v1/parent/registerParent") |
115 | Observable<ResponseBody> registerParent(@Body RequestBody body); | 115 | Observable<ResponseBody> registerParent(@Body RequestBody body); |
116 | 116 | ||
117 | 117 | ||
118 | @GET("/api/v1/parent/listChildren") | 118 | @GET("/api/v1/parent/listChildren") |
119 | Observable<ResponseBody> listChildren(@Header("Authorization") String token); | 119 | Observable<ResponseBody> listChildren(@Header("Authorization") String token); |
120 | 120 | ||
121 | 121 | ||
122 | @Headers("Content-Type: application/json") | 122 | @Headers("Content-Type: application/json") |
123 | @POST("/api/v1/parent/registerStudent") | 123 | @POST("/api/v1/parent/registerStudent") |
124 | Observable<ResponseBody> registerStudent(@Header("Authorization") String token, @Body RequestBody body); | 124 | Observable<ResponseBody> registerStudent(@Header("Authorization") String token, @Body RequestBody body); |
125 | 125 | ||
126 | @Headers("Content-Type: application/json") | 126 | @Headers("Content-Type: application/json") |
127 | @POST("/api/v1/parent/bindTeacher") | 127 | @POST("/api/v1/parent/bindTeacher") |
128 | Observable<ResponseBody> bindTeacher(@Header("Authorization") String token, @Body RequestBody body); | 128 | Observable<ResponseBody> bindTeacher(@Header("Authorization") String token, @Body RequestBody body); |
129 | 129 | ||
130 | @Multipart | 130 | @Multipart |
131 | @POST("/api/v1/user/upLoadAvatar") | 131 | @POST("/api/v1/user/upLoadAvatar") |
132 | Observable<ResponseResult<Map<String, String>>> uploadAvatar(@Header("Authorization") String token, @Part() MultipartBody.Part file); | 132 | Observable<ResponseResult<Map<String, String>>> uploadAvatar(@Header("Authorization") String token, @Part() MultipartBody.Part file); |
133 | 133 | ||
134 | 134 | ||
135 | @Multipart | 135 | @Multipart |
136 | @POST("/api/v1/student/editStudentAvatar") | 136 | @POST("/api/v1/student/editStudentAvatar") |
137 | Observable<ResponseResult<Map<String, String>>> uploadAvatar(@Header("Authorization") String token, @Part() MultipartBody.Part file, @PartMap Map<String, Object> map); | 137 | Observable<ResponseResult<Map<String, String>>> uploadAvatar(@Header("Authorization") String token, @Part() MultipartBody.Part file, @PartMap Map<String, Object> map); |
138 | 138 | ||
139 | @Headers("Content-Type: application/json") | 139 | @Headers("Content-Type: application/json") |
140 | @POST("/api/v1/parent/editChild") | 140 | @POST("/api/v1/parent/editChild") |
141 | Observable<ResponseResult> editStudent(@Header("Authorization") String token, @Body RequestBody body); | 141 | Observable<ResponseResult> editStudent(@Header("Authorization") String token, @Body RequestBody body); |
142 | 142 | ||
143 | @GET("/api/v1/student/getStudyPlanForThisWeek") | 143 | @GET("/api/v1/student/getStudyPlanForThisWeek") |
144 | Observable<ResponseResult<ScheduleBean>> getWeekPlan(@Header("Authorization") String token, @Query("stuId") String stuId); | 144 | Observable<ResponseResult<ScheduleBean>> getWeekPlan(@Header("Authorization") String token, @Query("stuId") String stuId); |
145 | 145 | ||
146 | @GET("api/v1/parent/searchTeacher") | 146 | @GET("api/v1/parent/searchTeacher") |
147 | Observable<ResponseResult<Teacher>> searchTeacher(@Header("Authorization") String token, @Query("phone") String phone); | 147 | Observable<ResponseResult<Teacher>> searchTeacher(@Header("Authorization") String token, @Query("phone") String phone); |
148 | 148 | ||
149 | @POST("api/v1/question/listErrorBook") | 149 | @POST("api/v1/question/listErrorBook") |
150 | Observable<ResponseResult<PageInfo<TopicBean>>> getError(@Header("Authorization") String token, @Body Map<String, Object> body); | 150 | Observable<ResponseResult<PageInfo<TopicBean>>> getError(@Header("Authorization") String token, @Body Map<String, Object> body); |
151 | 151 | ||
152 | @POST | 152 | @POST |
153 | Observable<JsonObject> removeWriting(@Url String url, @Body RequestBody body); | 153 | Observable<JsonObject> removeWriting(@Url String url, @Body RequestBody body); |
154 | 154 | ||
155 | @POST | 155 | @POST |
156 | Observable<CutPicBean> cut(@Url String url, @Body RequestBody body); | 156 | Observable<CutPicBean> cut(@Url String url, @Body RequestBody body); |
157 | 157 | ||
158 | @POST | 158 | @POST |
159 | Observable<JsonObject> getBaiduToken(@Url String url); | 159 | Observable<JsonObject> getBaiduToken(@Url String url); |
160 | 160 | ||
161 | @Multipart | 161 | @Multipart |
162 | @POST("api/v1/pad/addErrorBook") | 162 | @POST("api/v1/pad/addErrorBook") |
163 | Observable<ResponseResult> addError(@Part() MultipartBody.Part file, @PartMap Map<String, Object> map); | 163 | Observable<ResponseResult> addError(@Part() MultipartBody.Part file, @PartMap Map<String, Object> map); |
164 | 164 | ||
165 | @POST("api/v1/pad/deleteStuErrorBook") | 165 | @POST("api/v1/pad/deleteStuErrorBook") |
166 | Observable<ResponseResult> deleteError(@Header("Authorization") String token, @Body List<String> map); | 166 | Observable<ResponseResult> deleteError(@Header("Authorization") String token, @Body List<String> map); |
167 | 167 | ||
168 | @PUT("api/v1/pad/updateStuErrorBookInfo") | 168 | @PUT("api/v1/pad/updateStuErrorBookInfo") |
169 | Observable<ResponseResult> updateError(@Header("Authorization") String token, @Body List<HashMap<String, Object>> map); | 169 | Observable<ResponseResult> updateError(@Header("Authorization") String token, @Body List<HashMap<String, Object>> map); |
170 | 170 | ||
171 | @POST("api/v1/question/editErrorBook") | 171 | @POST("api/v1/question/editErrorBook") |
172 | Observable<ResponseResult> editError(@Header("Authorization") String Authorization, @Body Map<String, Object> map); | 172 | Observable<ResponseResult> editError(@Header("Authorization") String Authorization, @Body Map<String, Object> map); |
173 | 173 | ||
174 | @GET("api/v1/resource/checkUpdate") | 174 | @GET("api/v1/resource/checkUpdate") |
175 | Call<ResponseResult<UpdateBean>> checkUpdate(@Query("version") int version, @Query("packageName") String packageName, @Query("type") int type); | 175 | Call<ResponseResult<UpdateBean>> checkUpdate(@Query("version") int version, @Query("packageName") String packageName, @Query("type") int type); |
176 | 176 | ||
177 | @GET("api/v1/teacher/getStudentList") | 177 | @GET("api/v1/teacher/getStudentList") |
178 | Observable<ResponseBody> getStudentList(@Header("Authorization") String token, @Query("userId") String id); | 178 | Observable<ResponseBody> getStudentList(@Header("Authorization") String token, @Query("userId") String id); |
179 | 179 | ||
180 | @GET("api/v1/teacher/getStudentList") | 180 | @GET("api/v1/teacher/getStudentList") |
181 | Single<ResponseResult<List<Student>>> getStudentList2(@Header("Authorization") String token, @Query("userId") String id); | 181 | Single<ResponseResult<List<Student>>> getStudentList2(@Header("Authorization") String token, @Query("userId") String id); |
182 | 182 | ||
183 | @GET("api/v1/answer/listRecordForTeacher") | 183 | @GET("api/v1/answer/listRecordForTeacher") |
184 | Observable<ResponseBody> getRecordList(@Header("Authorization") String token, @Query("userId") String id); | 184 | Observable<ResponseBody> getRecordList(@Header("Authorization") String token, @Query("userId") String id); |
185 | 185 | ||
186 | @GET("api/v1/homework/listHomeworkByStuId") | 186 | @GET("api/v1/homework/listHomeworkByStuId") |
187 | Single<ResponseResult<List<HomeworkList>>> getStudentHomework(@Header("Authorization") String token, @Query("stuId") String stuId); | 187 | Single<ResponseResult<List<HomeworkList>>> getStudentHomework(@Header("Authorization") String token, @Query("stuId") String stuId); |
188 | 188 | ||
189 | @POST | 189 | @POST |
190 | Single<BaiduInput> inputImage(@Url String url, @Body RequestBody body); | 190 | Single<BaiduInput> inputImage(@Url String url, @Body RequestBody body); |
191 | 191 | ||
192 | @Multipart | 192 | @Multipart |
193 | @POST("api/v1/homework/uploadHomework") | 193 | @POST("api/v1/homework/uploadHomework") |
194 | Single<ResponseResult> uploadImage(@Header("Authorization") String token, @Part() MultipartBody.Part file, @Query("brief") String id); | 194 | Single<ResponseResult> uploadImage(@Header("Authorization") String token, @Part() MultipartBody.Part file, @Query("brief") String id); |
195 | 195 | ||
196 | @POST("api/v1/homework/uploadHomeworkAction") | 196 | @POST("api/v1/homework/uploadHomeworkAction") |
197 | Single<ResponseResult> uploadHomework(@Header("Authorization") String token, @Body Object map); | 197 | Single<ResponseResult> uploadHomework(@Header("Authorization") String token, @Body Object map); |
198 | 198 | ||
199 | @GET("api/v1/homework/removeHomework") | 199 | @GET("api/v1/homework/removeHomework") |
200 | Single<ResponseResult<Boolean>> deleteHomework( | 200 | Single<ResponseResult<Boolean>> deleteHomework( |
201 | @Header("Authorization") String token, | 201 | @Header("Authorization") String token, |
202 | @Query("homeworkId") String homeworkId | 202 | @Query("homeworkId") String homeworkId |
203 | ); | 203 | ); |
204 | 204 | ||
205 | @GET("api/v1/homework/listHomeworkById") | 205 | @GET("api/v1/homework/listHomeworkById") |
206 | Single<ResponseResult<List<HomeWork>>> getHomeworkDetail(@Header("Authorization") String token, @Query("homeworkId") String homeworkId); | 206 | Single<ResponseResult<List<HomeWork>>> getHomeworkDetail(@Header("Authorization") String token, @Query("homeworkId") String homeworkId); |
207 | 207 | ||
208 | @POST("api/v1/homework/uploadHomeworkFeedback") | 208 | @POST("api/v1/homework/uploadHomeworkFeedback") |
209 | Single<ResponseResult> uploadHomeworkFeedback(@Header("Authorization") String token, @Body Map<String, Object> map); | 209 | Single<ResponseResult> uploadHomeworkFeedback(@Header("Authorization") String token, @Body Map<String, Object> map); |
210 | 210 | ||
211 | @POST("api/v1/homework/editHomeworkInfo") | 211 | @POST("api/v1/homework/editHomeworkInfo") |
212 | Single<ResponseResult<Boolean>> editHomework( | 212 | Single<ResponseResult<Boolean>> editHomework( |
213 | @Header("Authorization") String token, | 213 | @Header("Authorization") String token, |
214 | @Body Object body | 214 | @Body Object body |
215 | ); | 215 | ); |
216 | 216 | ||
217 | @GET("api/v1/homework/listHomeworkDetailByStuId") | 217 | @GET("api/v1/homework/listHomeworkDetailByStuId") |
218 | Single<ResponseResult<HomeworkDetail>> getHomeworkCompleteDetail( | 218 | Single<ResponseResult<HomeworkDetail>> getHomeworkCompleteDetail( |
219 | @Header("Authorization") String token, | 219 | @Header("Authorization") String token, |
220 | @Query("stuId") String stuId, | 220 | @Query("stuId") String stuId, |
221 | @Query("homeworkId") String homeworkId, | 221 | @Query("homeworkId") String homeworkId, |
222 | // type 固定传true | 222 | // type 固定传true |
223 | @Query("type") boolean type | 223 | @Query("type") boolean type |
224 | ); | 224 | ); |
225 | 225 | ||
226 | @GET("api/v1/homework/listHomeworkStatistics") | 226 | @GET("api/v1/homework/listHomeworkStatistics") |
227 | Single<ResponseResult<List<StDetail>>> getHuyouList( | 227 | Single<ResponseResult<List<StDetail>>> getHuyouList( |
228 | @Header("Authorization") String token, | 228 | @Header("Authorization") String token, |
229 | @Query("stuId") String stuId, | 229 | @Query("stuId") String stuId, |
230 | @Query("type") int type //0: 周报, 1:阶段总结 | 230 | @Query("type") int type //0: 周报, 1:阶段总结 |
231 | ); | 231 | ); |
232 | 232 | ||
233 | @GET("api/v1/homework/listHomeworkStatisticsDetailForStudent") | 233 | @GET("api/v1/homework/listHomeworkStatisticsDetailForStudent") |
234 | Single<ResponseResult<StDetail>> getHuyouDetail( | 234 | Single<ResponseResult<StDetail>> getHuyouDetail( |
235 | @Header("Authorization") String token, | 235 | @Header("Authorization") String token, |
236 | @Query("homeworkStatisticsId") String homeworkId | 236 | @Query("homeworkStatisticsId") String homeworkId |
237 | ); | 237 | ); |
238 | 238 | ||
239 | @GET("api/v1/demo/generalStatisticsHomework") | 239 | @GET("api/v1/demo/generalStatisticsHomework") |
240 | Single<ResponseResult<Object>> generalHuyou(); | 240 | Single<ResponseResult<Object>> generalHuyou(); |
241 | 241 | ||
242 | @POST("api/v1/homework/generalHomeworkStageStatistics") | 242 | @POST("api/v1/homework/generalHomeworkStageStatistics") |
243 | Single<ResponseResult<Boolean>> generalStageHuyou( | 243 | Single<ResponseResult<Boolean>> generalStageHuyou( |
244 | @Header("Authorization") String token, | 244 | @Header("Authorization") String token, |
245 | @Body Object body | 245 | @Body Object body |
246 | ); | 246 | ); |
247 | 247 | ||
248 | @GET("api/v1/homework/removeHomeworkStatistics") | 248 | @GET("api/v1/homework/removeHomeworkStatistics") |
249 | Single<ResponseResult<Boolean>> deleteHuyou( | 249 | Single<ResponseResult<Boolean>> deleteHuyou( |
250 | @Header("Authorization") String token, | 250 | @Header("Authorization") String token, |
251 | @Query("homeworkStatisticsId") String homeworkId | 251 | @Query("homeworkStatisticsId") String homeworkId |
252 | ); | 252 | ); |
253 | 253 | ||
254 | @GET("api/v1/login/smsCode") | 254 | @GET("api/v1/login/smsCode") |
255 | Single<ResponseResult<String>> smsCode(@Query("mobile") String mobile); | 255 | Single<ResponseResult<String>> smsCode(@Query("mobile") String mobile); |
256 | 256 | ||
257 | @POST("api/v1/login/smsLogin") | 257 | @POST("api/v1/login/smsLogin") |
258 | Single<ResponseResult<User>> smsLogin(@Body Object body); | 258 | Single<ResponseResult<User>> smsLogin(@Body Object body); |
259 | 259 | ||
260 | } | 260 | } |
261 | 261 | ||
262 | public static String getUserId() { | 262 | public static String getUserId() { |
263 | return (String) SharedPreferencesUtil.getData("userId", ""); | 263 | return (String) SharedPreferencesUtil.getData("userId", ""); |
264 | } | 264 | } |
265 | 265 | ||
266 | public static String getHeader() { | 266 | public static String getHeader() { |
267 | return (String) SharedPreferencesUtil.getData("token", ""); | 267 | return (String) SharedPreferencesUtil.getData("token", ""); |
268 | } | 268 | } |
269 | 269 | ||
270 | public static String getBaiduToken() { | 270 | public static String getBaiduToken() { |
271 | return (String) SharedPreferencesUtil.getData("baiduToken", ""); | 271 | return (String) SharedPreferencesUtil.getData("baiduToken", ""); |
272 | } | 272 | } |
273 | 273 | ||
274 | public static Single<BaiduInput> inputImage(String filePath, String id) { | 274 | public static Single<BaiduInput> inputImage(String filePath, String id) { |
275 | MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded"); | 275 | MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded"); |
276 | String base64 = BitmapUtils.fileToBase64(filePath); | 276 | String base64 = BitmapUtils.fileToBase64(filePath); |
277 | File file = new File(filePath); | 277 | File file = new File(filePath); |
278 | RequestBody body = RequestBody.create(mediaType, "image=" + base64 + "&brief={\"name\":\"" + file.getName() + "\", \"id\":\"" + id + "\"}"); | 278 | RequestBody body = RequestBody.create(mediaType, "image=" + base64 + "&brief={\"name\":\"" + file.getName() + "\", \"id\":\"" + id + "\"}"); |
279 | return getBaiduTokenOcr().map(jsonObject -> jsonObject.get("access_token").getAsString()) | 279 | return getBaiduTokenOcr().map(jsonObject -> jsonObject.get("access_token").getAsString()) |
280 | .flatMap(token -> { | 280 | .flatMap(token -> { |
281 | return service_url.inputImage("https://aip.baidubce.com/rest/2.0/realtime_search/same_hq/add?access_token=" + token, body); | 281 | return service_url.inputImage("https://aip.baidubce.com/rest/2.0/realtime_search/same_hq/add?access_token=" + token, body); |
282 | }); | 282 | }); |
283 | } | 283 | } |
284 | 284 | ||
285 | public static Single<ResponseResult> uploadImage(String path, String id) { | 285 | public static Single<ResponseResult> uploadImage(String path, String id) { |
286 | File file = new File(path); | 286 | File file = new File(path); |
287 | RequestBody requestBody = RequestBody.create(MediaType.parse("image/jpg"), file); | 287 | RequestBody requestBody = RequestBody.create(MediaType.parse("image/jpg"), file); |
288 | MultipartBody.Part part = MultipartBody.Part.createFormData("file", file.getName(), requestBody); | 288 | MultipartBody.Part part = MultipartBody.Part.createFormData("file", file.getName(), requestBody); |
289 | return service_url.uploadImage(getHeader(), part, id); | 289 | return service_url.uploadImage(getHeader(), part, id); |
290 | } | 290 | } |
291 | 291 | ||
292 | 292 | ||
293 | public static void checkUpdate(int code, String packageName, Callback<ResponseResult<UpdateBean>> callback) { | 293 | public static void checkUpdate(int code, String packageName, Callback<ResponseResult<UpdateBean>> callback) { |
294 | service_url.checkUpdate(code, packageName, 0).enqueue(callback); | 294 | service_url.checkUpdate(code, packageName, 0).enqueue(callback); |
295 | } | 295 | } |
296 | 296 | ||
297 | public static void addError(String path, Map<String, String> param, Observer<ResponseResult> observer) { | 297 | public static void addError(String path, Map<String, String> param, Observer<ResponseResult> observer) { |
298 | File file = new File(path); | 298 | File file = new File(path); |
299 | RequestBody requestBody = RequestBody.create(MediaType.parse("image/jpg"), file); | 299 | RequestBody requestBody = RequestBody.create(MediaType.parse("image/jpg"), file); |
300 | MultipartBody.Part part = MultipartBody.Part.createFormData("file", file.getName(), requestBody); | 300 | MultipartBody.Part part = MultipartBody.Part.createFormData("file", file.getName(), requestBody); |
301 | Map<String, Object> map = new HashMap<>(); | 301 | Map<String, Object> map = new HashMap<>(); |
302 | map.put("condition", param); | 302 | map.put("condition", param); |
303 | setSubscribe(service_url.addError(part, map), observer); | 303 | setSubscribe(service_url.addError(part, map), observer); |
304 | } | 304 | } |
305 | 305 | ||
306 | 306 | ||
307 | public static void cut(String base64, Observer<CutPicBean> observer) { | 307 | public static void cut(String base64, Observer<CutPicBean> observer) { |
308 | MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded"); | 308 | MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded"); |
309 | RequestBody body = RequestBody.create(mediaType, "image=" + base64 + "&detect_direction=true"); | 309 | RequestBody body = RequestBody.create(mediaType, "image=" + base64 + "&detect_direction=true"); |
310 | setSubscribe(service_url.cut("https://aip.baidubce.com/rest/2.0/ocr/v1/paper_cut_edu?access_token=" + getBaiduToken(), body), observer); | 310 | setSubscribe(service_url.cut("https://aip.baidubce.com/rest/2.0/ocr/v1/paper_cut_edu?access_token=" + getBaiduToken(), body), observer); |
311 | } | 311 | } |
312 | 312 | ||
313 | public static void editError(Map<String, Object> map, Observer<ResponseResult> observer) { | 313 | public static void editError(Map<String, Object> map, Observer<ResponseResult> observer) { |
314 | setSubscribe(service_url.editError(getHeader(), map), observer); | 314 | setSubscribe(service_url.editError(getHeader(), map), observer); |
315 | } | 315 | } |
316 | 316 | ||
317 | public static void editError(List<HashMap<String, Object>> map, Observer<ResponseResult> observer) { | 317 | public static void editError(List<HashMap<String, Object>> map, Observer<ResponseResult> observer) { |
318 | setSubscribe(service_url.updateError(getHeader(), map), observer); | 318 | setSubscribe(service_url.updateError(getHeader(), map), observer); |
319 | } | 319 | } |
320 | 320 | ||
321 | public static void deleteError(List<String> map, Observer<ResponseResult> observer) { | 321 | public static void deleteError(List<String> map, Observer<ResponseResult> observer) { |
322 | setSubscribe(service_url.deleteError(getHeader(), map), observer); | 322 | setSubscribe(service_url.deleteError(getHeader(), map), observer); |
323 | } | 323 | } |
324 | 324 | ||
325 | public static void getBaiduToken(Observer<JsonObject> observer) { | 325 | public static void getBaiduToken(Observer<JsonObject> observer) { |
326 | setSubscribe(service_url.getBaiduToken("https://aip.baidubce.com/oauth/2.0/token?grant_type=client_credentials&client_id=" + BuildConfig.APIKey + "&client_secret=" + BuildConfig.SecretKey), observer); | 326 | setSubscribe(service_url.getBaiduToken("https://aip.baidubce.com/oauth/2.0/token?grant_type=client_credentials&client_id=" + BuildConfig.APIKey + "&client_secret=" + BuildConfig.SecretKey), observer); |
327 | } | 327 | } |
328 | 328 | ||
329 | public static Single<JsonObject> getBaiduTokenOcr() { | 329 | public static Single<JsonObject> getBaiduTokenOcr() { |
330 | return service_url.getBaiduToken("https://aip.baidubce.com/oauth/2.0/token?grant_type=client_credentials&client_id=" + BuildConfig.APIKey1 + "&client_secret=" + BuildConfig.SecretKey1).firstOrError(); | 330 | return service_url.getBaiduToken("https://aip.baidubce.com/oauth/2.0/token?grant_type=client_credentials&client_id=" + BuildConfig.APIKey1 + "&client_secret=" + BuildConfig.SecretKey1).firstOrError(); |
331 | } | 331 | } |
332 | 332 | ||
333 | public static void removeWriting(String base64, Observer<JsonObject> observer) { | 333 | public static void removeWriting(String base64, Observer<JsonObject> observer) { |
334 | MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded"); | 334 | MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded"); |
335 | RequestBody body = RequestBody.create(mediaType, "image=" + base64); | 335 | RequestBody body = RequestBody.create(mediaType, "image=" + base64); |
336 | setSubscribe(service_url.removeWriting(("https://aip.baidubce.com/rest/2.0/ocr/v1/remove_handwriting?access_token=" + getBaiduToken()), body), observer); | 336 | setSubscribe(service_url.removeWriting(("https://aip.baidubce.com/rest/2.0/ocr/v1/remove_handwriting?access_token=" + getBaiduToken()), body), observer); |
337 | } | 337 | } |
338 | 338 | ||
339 | public static void searchTeacher(String phone, Observer<ResponseResult<Teacher>> observer) { | 339 | public static void searchTeacher(String phone, Observer<ResponseResult<Teacher>> observer) { |
340 | setSubscribe(service_url.searchTeacher(getHeader(), phone), observer); | 340 | setSubscribe(service_url.searchTeacher(getHeader(), phone), observer); |
341 | } | 341 | } |
342 | 342 | ||
343 | public static void logout(Observer<ResponseBody> observer) { | 343 | public static void logout(Observer<ResponseBody> observer) { |
344 | setSubscribe(service_url.logout(), observer); | 344 | setSubscribe(service_url.logout(), observer); |
345 | } | 345 | } |
346 | 346 | ||
347 | public static void editStudent(RequestBody body, Observer<ResponseResult> observable) { | 347 | public static void editStudent(RequestBody body, Observer<ResponseResult> observable) { |
348 | setSubscribe(service_url.editStudent(getHeader(), body), observable); | 348 | setSubscribe(service_url.editStudent(getHeader(), body), observable); |
349 | } | 349 | } |
350 | 350 | ||
351 | public static void getWeekPlan(String id, Observer<ResponseResult<ScheduleBean>> observer) { | 351 | public static void getWeekPlan(String id, Observer<ResponseResult<ScheduleBean>> observer) { |
352 | setSubscribe(service_url.getWeekPlan(getHeader(), id), observer); | 352 | setSubscribe(service_url.getWeekPlan(getHeader(), id), observer); |
353 | } | 353 | } |
354 | 354 | ||
355 | public static void uploadStudentAvatar(File file, String stuId, Observer<ResponseResult<Map<String, String>>> observer) { | 355 | public static void uploadStudentAvatar(File file, String stuId, Observer<ResponseResult<Map<String, String>>> observer) { |
356 | RequestBody requestBody = RequestBody.create(MediaType.parse("multipart/form-data"), file); | 356 | RequestBody requestBody = RequestBody.create(MediaType.parse("multipart/form-data"), file); |
357 | MultipartBody.Part part = MultipartBody.Part.createFormData("file", file.getName(), requestBody); | 357 | MultipartBody.Part part = MultipartBody.Part.createFormData("file", file.getName(), requestBody); |
358 | Map<String, Object> map = new HashMap<>(); | 358 | Map<String, Object> map = new HashMap<>(); |
359 | map.put("stuId", stuId); | 359 | map.put("stuId", stuId); |
360 | setSubscribe(service_url.uploadAvatar(getHeader(), part, map), observer); | 360 | setSubscribe(service_url.uploadAvatar(getHeader(), part, map), observer); |
361 | } | 361 | } |
362 | 362 | ||
363 | public static void uploadAvatar(File file, Observer<ResponseResult<Map<String, String>>> observer) { | 363 | public static void uploadAvatar(File file, Observer<ResponseResult<Map<String, String>>> observer) { |
364 | RequestBody requestBody = RequestBody.create(MediaType.parse("multipart/form-data"), file); | 364 | RequestBody requestBody = RequestBody.create(MediaType.parse("multipart/form-data"), file); |
365 | MultipartBody.Part part = MultipartBody.Part.createFormData("file", file.getName(), requestBody); | 365 | MultipartBody.Part part = MultipartBody.Part.createFormData("file", file.getName(), requestBody); |
366 | setSubscribe(service_url.uploadAvatar(getHeader(), part), observer); | 366 | setSubscribe(service_url.uploadAvatar(getHeader(), part), observer); |
367 | } | 367 | } |
368 | 368 | ||
369 | public static void upLoadAvatar(List<MultipartBody.Part> partLis, Observer<ResponseBody> observer) { | 369 | public static void upLoadAvatar(List<MultipartBody.Part> partLis, Observer<ResponseBody> observer) { |
370 | setSubscribe(service_url.upLoadAvatar(getHeader(), partLis), observer); | 370 | setSubscribe(service_url.upLoadAvatar(getHeader(), partLis), observer); |
371 | } | 371 | } |
372 | 372 | ||
373 | 373 | ||
374 | public static void editUser(RequestBody body, Observer<ResponseBody> observer) { | 374 | public static void editUser(RequestBody body, Observer<ResponseBody> observer) { |
375 | setSubscribe(service_url.editUser(getHeader(), body), observer); | 375 | setSubscribe(service_url.editUser(getHeader(), body), observer); |
376 | } | 376 | } |
377 | 377 | ||
378 | public static void changePassword(RequestBody body, Observer<ResponseBody> observer) { | 378 | public static void changePassword(RequestBody body, Observer<ResponseBody> observer) { |
379 | setSubscribe(service_url.changePassword(getHeader(), body), observer); | 379 | setSubscribe(service_url.changePassword(getHeader(), body), observer); |
380 | } | 380 | } |
381 | 381 | ||
382 | 382 | ||
383 | public static void searchById(String userId, Observer<ResponseBody> observer) { | 383 | public static void searchById(String userId, Observer<ResponseBody> observer) { |
384 | setSubscribe(service_url.searchById(getHeader(), userId), observer); | 384 | setSubscribe(service_url.searchById(getHeader(), userId), observer); |
385 | } | 385 | } |
386 | 386 | ||
387 | 387 | ||
388 | public static void login(RequestBody body, Observer<ResponseBody> observer) { | 388 | public static void login(RequestBody body, Observer<ResponseBody> observer) { |
389 | setSubscribe(service_url.login(body), observer); | 389 | setSubscribe(service_url.login(body), observer); |
390 | } | 390 | } |
391 | 391 | ||
392 | public static void listGradeAndSubject(Observer<ResponseResult<List<GradeAndSubject>>> observer) { | 392 | public static void listGradeAndSubject(Observer<ResponseResult<List<GradeAndSubject>>> observer) { |
393 | setSubscribe(service_url.listGradeAndSubject(getHeader()), observer); | 393 | setSubscribe(service_url.listGradeAndSubject(getHeader()), observer); |
394 | } | 394 | } |
395 | 395 | ||
396 | 396 | ||
397 | public static void scanAndLogin(String code, String stuId, Observer<ResponseBody> observer) { | 397 | public static void scanAndLogin(String code, String stuId, Observer<ResponseBody> observer) { |
398 | setSubscribe(service_url.scanAndLogin(getHeader(), code, stuId), observer); | 398 | setSubscribe(service_url.scanAndLogin(getHeader(), code, stuId), observer); |
399 | } | 399 | } |
400 | 400 | ||
401 | public static void getChildrenList(Observer<ResponseBody> observer) { | 401 | public static void getChildrenList(Observer<ResponseBody> observer) { |
402 | setSubscribe(service_url.getChildrenList(getHeader()), observer); | 402 | setSubscribe(service_url.getChildrenList(getHeader()), observer); |
403 | } | 403 | } |
404 | 404 | ||
405 | 405 | ||
406 | public static void registerParent(RequestBody body, Observer<ResponseBody> observer) { | 406 | public static void registerParent(RequestBody body, Observer<ResponseBody> observer) { |
407 | setSubscribe(service_url.registerParent(body), observer); | 407 | setSubscribe(service_url.registerParent(body), observer); |
408 | } | 408 | } |
409 | 409 | ||
410 | 410 | ||
411 | public static void listChildren(Observer<ResponseBody> observer) { | 411 | public static void listChildren(Observer<ResponseBody> observer) { |
412 | setSubscribe(service_url.listChildren(getHeader()), observer); | 412 | setSubscribe(service_url.listChildren(getHeader()), observer); |
413 | } | 413 | } |
414 | 414 | ||
415 | public static void listStudent(Observer<ResponseBody> observer) { | 415 | public static void listStudent(Observer<ResponseBody> observer) { |
416 | setSubscribe(service_url.getStudentList(getHeader(), (String) SharedPreferencesUtil.getData("userId", "")), observer); | 416 | setSubscribe(service_url.getStudentList(getHeader(), (String) SharedPreferencesUtil.getData("userId", "")), observer); |
417 | } | 417 | } |
418 | 418 | ||
419 | public static Single<ResponseResult<List<Student>>> listStudent() { | 419 | public static Single<ResponseResult<List<Student>>> listStudent() { |
420 | return service_url.getStudentList2(getHeader(), getUserId()); | 420 | return service_url.getStudentList2(getHeader(), getUserId()); |
421 | } | 421 | } |
422 | 422 | ||
423 | public static void listRecord(Observer<ResponseBody> observer) { | 423 | public static void listRecord(Observer<ResponseBody> observer) { |
424 | setSubscribe(service_url.getRecordList(getHeader(), (String) SharedPreferencesUtil.getData("userId", "")), observer); | 424 | setSubscribe(service_url.getRecordList(getHeader(), (String) SharedPreferencesUtil.getData("userId", "")), observer); |
425 | } | 425 | } |
426 | 426 | ||
427 | 427 | ||
428 | public static void registerStudent(RequestBody body, Observer<ResponseBody> observer) { | 428 | public static void registerStudent(RequestBody body, Observer<ResponseBody> observer) { |
429 | setSubscribe(service_url.registerStudent(getHeader(), body), observer); | 429 | setSubscribe(service_url.registerStudent(getHeader(), body), observer); |
430 | } | 430 | } |
431 | 431 | ||
432 | public static void bindTeacher(RequestBody body, Observer<ResponseBody> observer) { | 432 | public static void bindTeacher(RequestBody body, Observer<ResponseBody> observer) { |
433 | setSubscribe(service_url.bindTeacher(getHeader(), body), observer); | 433 | setSubscribe(service_url.bindTeacher(getHeader(), body), observer); |
434 | } | 434 | } |
435 | 435 | ||
436 | public static void getError(Map map, Observer<ResponseResult<PageInfo<TopicBean>>> observer) { | 436 | public static void getError(Map map, Observer<ResponseResult<PageInfo<TopicBean>>> observer) { |
437 | setSubscribe(service_url.getError(getHeader(), map), observer); | 437 | setSubscribe(service_url.getError(getHeader(), map), observer); |
438 | } | 438 | } |
439 | 439 | ||
440 | 440 | ||
441 | public static RequestBody getMapRequestBody(Map map) { | 441 | public static RequestBody getMapRequestBody(Map map) { |
442 | return RequestBody.create(MediaType.parse("text/plain"), new Gson().toJson(map)); | 442 | return RequestBody.create(MediaType.parse("text/plain"), new Gson().toJson(map)); |
443 | } | 443 | } |
444 | 444 | ||
445 | 445 | ||
446 | public static RequestBody getArrayRequestBody(List list) { | 446 | public static RequestBody getArrayRequestBody(List list) { |
447 | return RequestBody.create(MediaType.parse("text/plain"), new Gson().toJson(list)); | 447 | return RequestBody.create(MediaType.parse("text/plain"), new Gson().toJson(list)); |
448 | } | 448 | } |
449 | 449 | ||
450 | public static RequestBody getFileRequestBody(File file) { | 450 | public static RequestBody getFileRequestBody(File file) { |
451 | return RequestBody.create(MediaType.parse("application/octet-stream"), file); | 451 | return RequestBody.create(MediaType.parse("application/octet-stream"), file); |
452 | } | 452 | } |
453 | 453 | ||
454 | public static RequestBody getFileRequestBody(byte[] bytes) { | 454 | public static RequestBody getFileRequestBody(byte[] bytes) { |
455 | return RequestBody.create(MediaType.parse("multipart/form-data"), bytes); | 455 | return RequestBody.create(MediaType.parse("multipart/form-data"), bytes); |
456 | } | 456 | } |
457 | 457 | ||
458 | public static RequestBody getObjectRequestBody(Object obj) { | 458 | public static RequestBody getObjectRequestBody(Object obj) { |
459 | return RequestBody.create(MediaType.parse("text/plain"), new Gson().toJson(obj)); | 459 | return RequestBody.create(MediaType.parse("text/plain"), new Gson().toJson(obj)); |
460 | } | 460 | } |
461 | 461 | ||
462 | public static RequestBody getStringRequestBody(String str) { | 462 | public static RequestBody getStringRequestBody(String str) { |
463 | return RequestBody.create(MediaType.parse("text/plain"), str); | 463 | return RequestBody.create(MediaType.parse("text/plain"), str); |
464 | } | 464 | } |
465 | 465 | ||
466 | 466 | ||
467 | /** | 467 | /** |
468 | * 插入观察者 | 468 | * 插入观察者 |
469 | * | 469 | * |
470 | * @param observable | 470 | * @param observable |
471 | * @param observer | 471 | * @param observer |
472 | * @param <T> | 472 | * @param <T> |
473 | */ | 473 | */ |
474 | public static <T> void setSubscribe(Observable<T> observable, Observer<T> observer) { | 474 | public static <T> void setSubscribe(Observable<T> observable, Observer<T> observer) { |
475 | observable.subscribeOn(Schedulers.io())//子线程访问网络 | 475 | observable.subscribeOn(Schedulers.io())//子线程访问网络 |
476 | .observeOn(AndroidSchedulers.mainThread())//回调到主线程 | 476 | .observeOn(AndroidSchedulers.mainThread())//回调到主线程 |
477 | .subscribe(observer); | 477 | .subscribe(observer); |
478 | } | 478 | } |
479 | 479 | ||
480 | } | 480 | } |
481 | 481 |