Commit f1ce56b9bbc90fcfe12b08c7d9b55e6f62ee7c4c
1 parent
484570f5e6
Exists in
master
BUG修改
Showing
19 changed files
with
191 additions
and
155 deletions
Show diff stats
app/build.gradle
... | ... | @@ -25,8 +25,8 @@ android { |
25 | 25 | applicationId "com.hjx.parent" |
26 | 26 | minSdk 24 |
27 | 27 | targetSdk 32 |
28 | - versionCode 1003 | |
29 | - versionName "1.0.0.3" | |
28 | + versionCode 1004 | |
29 | + versionName "1.0.0.4" | |
30 | 30 | |
31 | 31 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" |
32 | 32 | } | ... | ... |
app/src/main/assets/style.css
1 | -body{font-family: "微软雅黑", Arial,"宋体"; font-size: 14px; line-height: 1.5em; color: #333;} | |
1 | +body{font-family: "微软雅黑", Arial,"宋体"; font-size: 16px; line-height: 1.5em; color: #333;} | |
2 | 2 | a{ text-decoration: none; color: #2489f6;} |
3 | 3 | dl, ul, ol, ul { list-style: none; padding: 0; margin: 0; } |
4 | 4 | .wrapper{ width: 1200px; margin: 0 auto; } |
... | ... | @@ -96,4 +96,4 @@ div.quizPutTag img { cursor: pointer; width: 200px; margin-left: 10px; } |
96 | 96 | /*答案*/ |
97 | 97 | .selectoption label.s, div.s { border: 1px solid #91cbed; background-color: #deeeff; display: inline-block; } |
98 | 98 | .selectoption label.s.sh, div.s.sh { margin: 1px; border: none; background: none; } |
99 | -del { text-decoration: none; color: #f00; font-style: normal; font-weight: normal; } | |
100 | 99 | \ No newline at end of file |
100 | +del { text-decoration: none; color: #333; font-style: normal; font-weight: normal; } | |
101 | 101 | \ No newline at end of file | ... | ... |
app/src/main/java/com/hjx/parent/ErrorDetailActivity.java
... | ... | @@ -4,6 +4,7 @@ import android.content.Intent; |
4 | 4 | import android.graphics.Color; |
5 | 5 | import android.os.Bundle; |
6 | 6 | import android.os.Handler; |
7 | +import android.text.Html; | |
7 | 8 | import android.text.TextUtils; |
8 | 9 | import android.view.MotionEvent; |
9 | 10 | import android.view.View; |
... | ... | @@ -114,92 +115,46 @@ public class ErrorDetailActivity extends BaseActivity<ActivityErrorDetailBinding |
114 | 115 | } else { |
115 | 116 | Glide.with(context).load(bean.getPath()).override(CommonUtil.getScreenWidth(context) - CommonUtil.dpToPx(context, 40), CommonUtil.dpToPx(context, 90)).fitCenter().into(binding.ivTopic); |
116 | 117 | } |
117 | - binding.tvTitle.setText(bean.getName()); | |
118 | - RadioButton typeButton = (RadioButton) binding.typeRadio.getChildAt(bean.getIsDone()); | |
119 | - typeButton.setChecked(true); | |
120 | - binding.typeRadio.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() { | |
121 | - @Override | |
122 | - public void onCheckedChanged(RadioGroup group, int checkedId) { | |
123 | - new Handler().postDelayed(new Runnable() { | |
124 | - @Override | |
125 | - public void run() { | |
126 | - saveError(); | |
127 | - } | |
128 | - }, 1000); | |
129 | - | |
130 | - } | |
131 | - }); | |
132 | - binding.spinnerReason.setSelection(bean.getReason()); | |
133 | - binding.spinnerReason.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { | |
134 | - @Override | |
135 | - public void onItemSelected(AdapterView<?> parent, View view, int position, long id) { | |
136 | - saveError(); | |
137 | - } | |
138 | - | |
139 | - @Override | |
140 | - public void onNothingSelected(AdapterView<?> parent) { | |
141 | - | |
142 | - } | |
143 | - }); | |
118 | +// binding.tvTitle.setText(bean.getName()); | |
119 | + refresh(); | |
144 | 120 | binding.ivBack.setOnClickListener(new View.OnClickListener() { |
145 | 121 | @Override |
146 | 122 | public void onClick(View v) { |
147 | 123 | finish(); |
148 | 124 | } |
149 | 125 | }); |
150 | - binding.ivEdit.setOnClickListener(new View.OnClickListener() { | |
126 | + binding.tvEdit.setOnClickListener(new View.OnClickListener() { | |
151 | 127 | @Override |
152 | 128 | public void onClick(View v) { |
153 | 129 | List<TopicBean> topicBeans = new ArrayList<>(); |
154 | 130 | topicBeans.add(bean); |
155 | 131 | ErrorEditDialog errorEditDialog = new ErrorEditDialog(context, topicBeans, new ErrorEditDialog.EditInterface() { |
156 | 132 | @Override |
157 | - public void edit(String name, int reason) { | |
158 | - binding.tvTitle.setText(name); | |
159 | - binding.spinnerReason.setSelection(reason); | |
133 | + public void edit(String name, String grade, String subject, int type, int reason, int done) { | |
134 | +// binding.tvTitle.setText(name); | |
135 | + bean.setGrade(grade); | |
136 | + bean.setSubject(subject); | |
137 | + bean.setType(type); | |
138 | + bean.setDone(done == 0); | |
139 | + bean.setReason(reason); | |
140 | + refresh(); | |
160 | 141 | } |
142 | + | |
161 | 143 | }); |
162 | 144 | errorEditDialog.show(); |
163 | 145 | } |
164 | 146 | }); |
165 | 147 | } |
166 | 148 | |
167 | - public void saveError() { | |
168 | - int done = 0; | |
169 | - for (int i = 0; i < binding.typeRadio.getChildCount(); i++) { | |
170 | - RadioButton rb = (RadioButton) binding.typeRadio.getChildAt(i); | |
171 | - if (rb.isChecked()) { | |
172 | - done = i; | |
173 | - } | |
174 | - } | |
175 | - bean.setDone(done == 1); | |
176 | - Map<String, Object> map = new HashMap<>(); | |
177 | - map.put("bookId", bean.getId()); | |
178 | - map.put("controlFlag", done); | |
179 | - map.put("errorReason", binding.spinnerReason.getSelectedItemPosition()); | |
180 | - NetWorks.editError(map, new Observer<ResponseResult>() { | |
181 | - @Override | |
182 | - public void onSubscribe(Disposable d) { | |
183 | - | |
184 | - } | |
185 | - | |
186 | - @Override | |
187 | - public void onNext(ResponseResult responseResult) { | |
188 | - responseResult.toString(); | |
189 | - } | |
190 | - | |
191 | - @Override | |
192 | - public void onError(Throwable e) { | |
193 | - | |
194 | - } | |
195 | - | |
196 | - @Override | |
197 | - public void onComplete() { | |
198 | - | |
199 | - } | |
200 | - }); | |
149 | + private void refresh() { | |
150 | + binding.tvSubject.setText(Html.fromHtml(getString(R.string.topic_subject, bean.getSubject()))); | |
151 | + binding.tvGrade.setText(Html.fromHtml(getString(R.string.topic_grade, bean.getGrade()))); | |
152 | + binding.tvReason.setText(Html.fromHtml(getString(R.string.topic_reason, getResources().getStringArray(R.array.error_reason)[bean.getReason()]))); | |
153 | + binding.tvManager.setText(Html.fromHtml(getString(R.string.topic_manager, bean.getIsDone() == 0 ? "已掌握" : "未掌握"))); | |
154 | + binding.tvType.setText(Html.fromHtml(getString(R.string.topic_type, bean.getType() == 0 ? "课内" : "课外"))); | |
201 | 155 | } |
202 | 156 | |
157 | + | |
203 | 158 | @Override |
204 | 159 | protected ActivityErrorDetailBinding getViewBinding() { |
205 | 160 | return ActivityErrorDetailBinding.inflate(getLayoutInflater()); | ... | ... |
app/src/main/java/com/hjx/parent/ErrorListActivity.java
... | ... | @@ -279,7 +279,7 @@ public class ErrorListActivity extends BaseActivity<ActivityErrorListBinding> im |
279 | 279 | if (adapter.getChecKList().size() > 0) { |
280 | 280 | ErrorEditDialog errorEditDialog = new ErrorEditDialog(context, adapter.getChecKList(), new ErrorEditDialog.EditInterface() { |
281 | 281 | @Override |
282 | - public void edit(String s, int i) { | |
282 | + public void edit(String name, String grade, String subject, int type, int reason, int manager) { | |
283 | 283 | adapter.setEdit(false); |
284 | 284 | binding.tvSave.setVisibility(View.GONE); |
285 | 285 | binding.tvAdd.setVisibility(View.VISIBLE); |
... | ... | @@ -290,6 +290,7 @@ public class ErrorListActivity extends BaseActivity<ActivityErrorListBinding> im |
290 | 290 | page = 1; |
291 | 291 | refreshError(); |
292 | 292 | } |
293 | + | |
293 | 294 | }); |
294 | 295 | errorEditDialog.show(); |
295 | 296 | } | ... | ... |
app/src/main/java/com/hjx/parent/ImageActivity.java
... | ... | @@ -264,11 +264,11 @@ public class ImageActivity extends BaseActivity<ActivityImageBinding> implements |
264 | 264 | if (num > 0) { |
265 | 265 | binding.tvSave.setEnabled(true); |
266 | 266 | binding.tvSave.setBackgroundResource(R.drawable.bg_soild_blue_5); |
267 | - binding.tvSave.setText("保留错题(" + num + ")"); | |
267 | + binding.tvSave.setText("保存错题(" + num + ")"); | |
268 | 268 | } else { |
269 | 269 | binding.tvSave.setEnabled(false); |
270 | 270 | binding.tvSave.setBackgroundResource(R.drawable.bg_soild_blue_light_5); |
271 | - binding.tvSave.setText("保留错题"); | |
271 | + binding.tvSave.setText("保存错题"); | |
272 | 272 | } |
273 | 273 | } |
274 | 274 | |
... | ... | @@ -362,7 +362,13 @@ public class ImageActivity extends BaseActivity<ActivityImageBinding> implements |
362 | 362 | ImageBean.Cut cut = new ImageBean.Cut(); |
363 | 363 | cut.setRect1(rect); |
364 | 364 | cut.setSelect(false); |
365 | - list.get(position).getCuts().add(cut); | |
365 | + if (list.get(position).getCuts() != null) { | |
366 | + list.get(position).getCuts().add(cut); | |
367 | + } else { | |
368 | + List<ImageBean.Cut> cuts =new ArrayList<>(); | |
369 | + cuts.add(cut); | |
370 | + list.get(position).setCuts(cuts); | |
371 | + } | |
366 | 372 | imageAdapter.notifyItemChanged(position); |
367 | 373 | refreshNum(); |
368 | 374 | } | ... | ... |
app/src/main/java/com/hjx/parent/LoginActivity.java
... | ... | @@ -181,7 +181,9 @@ public class LoginActivity extends BaseActivity { |
181 | 181 | SharedPreferencesUtil.putData("userId", jo2.getString("userId")); |
182 | 182 | SharedPreferencesUtil.putData("token", jo2.getString("token")); |
183 | 183 | JSONObject user = new JSONObject(jo2.getString("user")); |
184 | - SharedPreferencesUtil.putData("photo", user.getString("photo")); | |
184 | + if (user.getString("photo") != null && !user.getString("photo").equals("null")) { | |
185 | + SharedPreferencesUtil.putData("photo", user.getString("photo")); | |
186 | + } | |
185 | 187 | SharedPreferencesUtil.putData("name", user.getString("userName")); |
186 | 188 | startActivity(ChooseActivity.class); |
187 | 189 | finish(); | ... | ... |
app/src/main/java/com/hjx/parent/adapter/ImageAdapter.java
app/src/main/java/com/hjx/parent/dialog/ErrorEditDialog.java
... | ... | @@ -57,10 +57,11 @@ public class ErrorEditDialog extends Dialog { |
57 | 57 | private Subject subject; |
58 | 58 | private int reason; |
59 | 59 | private int type = 0; |
60 | + private int done = 1; | |
60 | 61 | private EditInterface editInterface; |
61 | 62 | |
62 | 63 | public interface EditInterface { |
63 | - void edit(String name, int reason); | |
64 | + void edit(String name, String grade, String subject, int type, int reason, int manager); | |
64 | 65 | } |
65 | 66 | |
66 | 67 | public ErrorEditDialog(@NonNull Context context, List<TopicBean> list, EditInterface editInterface) { |
... | ... | @@ -80,12 +81,18 @@ public class ErrorEditDialog extends Dialog { |
80 | 81 | lp.width = CommonUtil.getScreenWidth(getContext()); |
81 | 82 | dialogWindow.setGravity(Gravity.BOTTOM); |
82 | 83 | dialogWindow.setAttributes(lp); |
84 | + TopicBean bean = list.get(0); | |
83 | 85 | List<String> grades = new ArrayList<>(); |
86 | + int selectGrade = 0; | |
84 | 87 | for (GradeAndSubject grade : App.getInstance().getGradeAndSubjects()) { |
85 | 88 | grades.add(grade.getGrade().getGrade()); |
89 | + if (bean.getGrade().contains(grade.getGrade().getGrade())) { | |
90 | + selectGrade = App.getInstance().getGradeAndSubjects().indexOf(grade); | |
91 | + } | |
86 | 92 | } |
87 | 93 | ArrayAdapter<String> gradeAdapter = new ArrayAdapter<>(context, R.layout.item_for_custom_spinner, grades); |
88 | 94 | binding.spinnerGrade.setAdapter(gradeAdapter); |
95 | + binding.spinnerGrade.setSelection(selectGrade); | |
89 | 96 | binding.spinnerGrade.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { |
90 | 97 | @Override |
91 | 98 | public void onItemSelected(AdapterView<?> parent, View view, int position, long id) { |
... | ... | @@ -100,6 +107,7 @@ public class ErrorEditDialog extends Dialog { |
100 | 107 | }); |
101 | 108 | ArrayAdapter<String> gradeAdapter1 = new ArrayAdapter<>(context, R.layout.item_for_custom_spinner, getContext().getResources().getStringArray(R.array.grade_array)); |
102 | 109 | binding.spinnerGrade1.setAdapter(gradeAdapter1); |
110 | + binding.spinnerGrade1.setSelection(bean.getGrade().contains("下学期") ? 1 : 0); | |
103 | 111 | binding.spinnerGrade1.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { |
104 | 112 | @Override |
105 | 113 | public void onItemSelected(AdapterView<?> parent, View view, int position, long id) { |
... | ... | @@ -113,6 +121,7 @@ public class ErrorEditDialog extends Dialog { |
113 | 121 | }); |
114 | 122 | ArrayAdapter<String> reasonAdapter = new ArrayAdapter<>(context, R.layout.item_for_custom_spinner, context.getResources().getStringArray(R.array.error_reason)); |
115 | 123 | binding.spinnerReason.setAdapter(reasonAdapter); |
124 | + binding.spinnerReason.setSelection(bean.getReason()); | |
116 | 125 | binding.spinnerReason.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { |
117 | 126 | @Override |
118 | 127 | public void onItemSelected(AdapterView<?> parent, View view, int position, long id) { |
... | ... | @@ -124,7 +133,7 @@ public class ErrorEditDialog extends Dialog { |
124 | 133 | |
125 | 134 | } |
126 | 135 | }); |
127 | - RadioButton typeButton = (RadioButton) binding.typeRadio.getChildAt(type); | |
136 | + RadioButton typeButton = (RadioButton) binding.typeRadio.getChildAt(bean.getType()); | |
128 | 137 | typeButton.setChecked(true); |
129 | 138 | binding.typeRadio.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() { |
130 | 139 | @Override |
... | ... | @@ -133,6 +142,16 @@ public class ErrorEditDialog extends Dialog { |
133 | 142 | type = getContext().getString(R.string.topic_type_in).equals(rcheck.getText().toString()) ? 0 : 1; |
134 | 143 | } |
135 | 144 | }); |
145 | + RadioButton manager = (RadioButton) binding.managerRadio.getChildAt(bean.getIsDone()); | |
146 | + manager.setChecked(true); | |
147 | + binding.managerRadio.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() { | |
148 | + @Override | |
149 | + public void onCheckedChanged(RadioGroup group, int checkedId) { | |
150 | + RadioButton rcheck = (RadioButton) findViewById(checkedId); | |
151 | + done = getContext().getString(R.string.text_done).equals(rcheck.getText().toString()) ? 0 : 1; | |
152 | + } | |
153 | + }); | |
154 | + | |
136 | 155 | binding.ivBack.setOnClickListener(new View.OnClickListener() { |
137 | 156 | @Override |
138 | 157 | public void onClick(View v) { |
... | ... | @@ -157,6 +176,7 @@ public class ErrorEditDialog extends Dialog { |
157 | 176 | map.put("errorReason", String.valueOf(reason)); |
158 | 177 | map.put("title", grade.getGrade() + "-" + subject.getSubject() + "-" + (type == 0 ? "课内" : "课外") + "错题"); |
159 | 178 | map.put("type", type); |
179 | + map.put("controlFlag", done); | |
160 | 180 | hashMapArrayList.add(map); |
161 | 181 | } |
162 | 182 | NetWorks.editError(hashMapArrayList, new Observer<ResponseResult>() { |
... | ... | @@ -168,7 +188,7 @@ public class ErrorEditDialog extends Dialog { |
168 | 188 | @Override |
169 | 189 | public void onNext(ResponseResult responseResult) { |
170 | 190 | if (responseResult.getCode() == 200) { |
171 | - editInterface.edit(grade.getGrade() + "-" + subject.getSubject() + "-" + (type == 0 ? "课内" : "课外") + "错题", reason); | |
191 | + editInterface.edit(grade.getGrade() + "-" + subject.getSubject() + "-" + (type == 0 ? "课内" : "课外") + "错题", grade.getGrade() + term, subject.getSubject(), type, reason, done); | |
172 | 192 | dismiss(); |
173 | 193 | } |
174 | 194 | } |
... | ... | @@ -186,12 +206,17 @@ public class ErrorEditDialog extends Dialog { |
186 | 206 | } |
187 | 207 | |
188 | 208 | private void refreshSubject(List<Subject> subjects) { |
209 | + int selectSubject = 0; | |
189 | 210 | List<String> s = new ArrayList<>(); |
190 | 211 | for (Subject subject : subjects) { |
191 | 212 | s.add(subject.getSubject()); |
213 | + if (list.get(0).getSubject().equals(subject.getSubject())) { | |
214 | + selectSubject = subjects.indexOf(subject); | |
215 | + } | |
192 | 216 | } |
193 | 217 | ArrayAdapter<String> subjectAdapter = new ArrayAdapter<>(context, R.layout.item_for_custom_spinner, s); |
194 | 218 | binding.spinnerSubject.setAdapter(subjectAdapter); |
219 | + binding.spinnerSubject.setSelection(selectSubject); | |
195 | 220 | binding.spinnerSubject.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { |
196 | 221 | @Override |
197 | 222 | public void onItemSelected(AdapterView<?> parent, View view, int position, long id) { | ... | ... |
app/src/main/java/com/hjx/parent/fragment/ErrorFragment.java
... | ... | @@ -84,14 +84,7 @@ public class ErrorFragment extends BaseBindingFragment<FragmentErrorBookBinding> |
84 | 84 | String student = (String) SharedPreferencesUtil.getData("student", ""); |
85 | 85 | try { |
86 | 86 | studentBean = new Gson().fromJson(student, StudentBean.class); |
87 | - RoundedCorners roundedCorners = new RoundedCorners(ScreenUtils.dpToPx(getContext(), 45)); | |
88 | - RequestOptions options = RequestOptions.bitmapTransform(roundedCorners); | |
89 | - if (TextUtils.isEmpty(studentBean.getPhoto())) { | |
90 | - getBinding().ivStudent.setImageResource(studentBean.getGender() == 0 ? R.mipmap.ic_avatar_male : R.mipmap.ic_avatar_female); | |
91 | - } else { | |
92 | - Glide.with(getContext()).load(studentBean.getPhoto()).apply(options).into(getBinding().ivStudent); | |
93 | - } | |
94 | - getBinding().tvName.setText(studentBean.getStuName()); | |
87 | + getBinding().tvChoose.setText(studentBean.getStuName()); | |
95 | 88 | } catch (Exception e) { |
96 | 89 | |
97 | 90 | } |
... | ... | @@ -100,6 +93,14 @@ public class ErrorFragment extends BaseBindingFragment<FragmentErrorBookBinding> |
100 | 93 | @Override |
101 | 94 | public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) { |
102 | 95 | super.onViewCreated(view, savedInstanceState); |
96 | + String photo = (String) SharedPreferencesUtil.getData("photo", ""); | |
97 | + if (!TextUtils.isEmpty(photo)) { | |
98 | + RoundedCorners roundedCorners = new RoundedCorners(ScreenUtils.dpToPx(getContext(), 45)); | |
99 | + RequestOptions options = RequestOptions.bitmapTransform(roundedCorners); | |
100 | + Glide.with(getContext()).load(photo).apply(options).into(getBinding().ivStudent); | |
101 | + } | |
102 | + String name = (String) SharedPreferencesUtil.getData("name", ""); | |
103 | + getBinding().tvName.setText(name); | |
103 | 104 | refreshStudent(); |
104 | 105 | getBinding().rlTakePhoto.post(new Runnable() { |
105 | 106 | @Override | ... | ... |
app/src/main/java/com/hjx/parent/fragment/HomeFragment.java
... | ... | @@ -101,6 +101,11 @@ public class HomeFragment extends BaseFragment { |
101 | 101 | }); |
102 | 102 | } |
103 | 103 | |
104 | + @OnClick({R.id.ll_device, R.id.ll_app}) | |
105 | + public void goApps(View view) { | |
106 | + Toast.makeText(getActivity(), "功能暂未上线,敬请期待", Toast.LENGTH_SHORT).show(); | |
107 | + } | |
108 | + | |
104 | 109 | @OnClick(R.id.ll_error) |
105 | 110 | public void goError(View view) { |
106 | 111 | Intent intent = new Intent(getActivity(), ErrorBookActivity.class); | ... | ... |
app/src/main/java/com/hjx/parent/fragment/MeFragment.java
... | ... | @@ -93,7 +93,7 @@ public class MeFragment extends BaseFragment { |
93 | 93 | if (!TextUtils.isEmpty(photo)) { |
94 | 94 | RoundedCorners roundedCorners = new RoundedCorners(ScreenUtils.dpToPx(getContext(), 45)); |
95 | 95 | RequestOptions options = RequestOptions.bitmapTransform(roundedCorners); |
96 | - Glide.with(getContext()).load(photo).apply(options).into(iv_toux); | |
96 | + Glide.with(getContext()).load(photo).error(R.mipmap.ic_parent_avatar).apply(options).into(iv_toux); | |
97 | 97 | } |
98 | 98 | loadChildList(); |
99 | 99 | } | ... | ... |
app/src/main/java/com/hjx/parent/fragment/TeacherFragment.java
... | ... | @@ -179,6 +179,9 @@ public class TeacherFragment extends BaseBindingFragment<FragmentTeacherBinding> |
179 | 179 | sb.append("</div>"); |
180 | 180 | } |
181 | 181 | String body = "<html><header>" + linkCss + "</header>" + sb.toString() + "</body></html>"; |
182 | + WebSettings settings = webView.getSettings(); | |
183 | + settings.setUseWideViewPort(true);//设定支持 viewport | |
184 | + settings.setLoadWithOverviewMode(true); //自适应屏幕 | |
182 | 185 | webView.loadDataWithBaseURL(linkCss, body, "text/html", "UTF-8", null); |
183 | 186 | webView.setVisibility(View.VISIBLE); |
184 | 187 | webView.setOnTouchListener(new View.OnTouchListener() { | ... | ... |
app/src/main/res/layout/activity_error_detail.xml
... | ... | @@ -19,17 +19,11 @@ |
19 | 19 | android:layout_centerInParent="true" |
20 | 20 | android:ellipsize="end" |
21 | 21 | android:maxWidth="330dp" |
22 | + android:text="错题详情" | |
22 | 23 | android:singleLine="true" |
23 | 24 | android:textColor="#333333" |
24 | 25 | android:textSize="18sp" /> |
25 | 26 | |
26 | - <ImageView | |
27 | - android:id="@+id/iv_edit" | |
28 | - android:layout_width="40dp" | |
29 | - android:layout_height="40dp" | |
30 | - android:layout_toRightOf="@+id/tv_title" | |
31 | - android:padding="10dp" | |
32 | - android:src="@mipmap/ic_error_edit" /> | |
33 | 27 | |
34 | 28 | <ImageView |
35 | 29 | android:id="@+id/iv_back" |
... | ... | @@ -142,10 +136,10 @@ |
142 | 136 | |
143 | 137 | <WebView |
144 | 138 | android:id="@+id/web_analyse" |
145 | - android:background="#F5F5F5" | |
146 | 139 | android:layout_width="wrap_content" |
147 | 140 | android:layout_height="wrap_content" |
148 | - android:layout_margin="10dp" /> | |
141 | + android:layout_margin="10dp" | |
142 | + android:background="#F5F5F5" /> | |
149 | 143 | </LinearLayout> |
150 | 144 | </LinearLayout> |
151 | 145 | |
... | ... | @@ -177,8 +171,8 @@ |
177 | 171 | android:id="@+id/web_answer" |
178 | 172 | android:layout_width="wrap_content" |
179 | 173 | android:layout_height="wrap_content" |
180 | - android:background="#F5F5F5" | |
181 | - android:layout_margin="10dp" /> | |
174 | + android:layout_margin="10dp" | |
175 | + android:background="#F5F5F5" /> | |
182 | 176 | </LinearLayout> |
183 | 177 | </LinearLayout> |
184 | 178 | |
... | ... | @@ -218,7 +212,7 @@ |
218 | 212 | </LinearLayout> |
219 | 213 | </LinearLayout> |
220 | 214 | |
221 | - <LinearLayout | |
215 | + <RelativeLayout | |
222 | 216 | android:id="@+id/ll_reason" |
223 | 217 | android:layout_width="match_parent" |
224 | 218 | android:layout_height="wrap_content" |
... | ... | @@ -229,79 +223,73 @@ |
229 | 223 | |
230 | 224 | <TextView |
231 | 225 | android:layout_width="wrap_content" |
232 | - android:layout_height="wrap_content" | |
226 | + android:layout_height="25dp" | |
233 | 227 | android:layout_marginLeft="15dp" |
234 | 228 | android:layout_marginTop="15dp" |
235 | - android:text="错误原因" | |
229 | + android:gravity="center" | |
230 | + android:text="本题标签" | |
236 | 231 | android:textColor="@color/text_title" |
237 | 232 | android:textSize="15sp" /> |
238 | 233 | |
239 | - <androidx.appcompat.widget.AppCompatSpinner | |
240 | - android:id="@+id/spinner_reason" | |
241 | - style="@style/customSpinnerStyle" | |
242 | - android:layout_width="match_parent" | |
243 | - android:layout_height="40dp" | |
244 | - android:layout_centerHorizontal="true" | |
245 | - android:layout_marginLeft="15dp" | |
234 | + <TextView | |
235 | + android:id="@+id/tv_edit" | |
236 | + android:layout_width="70dp" | |
237 | + android:layout_height="25dp" | |
238 | + android:layout_alignParentRight="true" | |
246 | 239 | android:layout_marginTop="15dp" |
247 | 240 | android:layout_marginRight="15dp" |
248 | - android:layout_marginBottom="15dp" | |
249 | - android:background="@drawable/selector_for_custom_spinner" | |
250 | - android:entries="@array/error_reason" | |
251 | - android:popupBackground="@drawable/shape_for_custom_spinner" | |
252 | - android:scrollbars="none" /> | |
253 | - </LinearLayout> | |
254 | - | |
255 | - <LinearLayout | |
256 | - android:layout_width="match_parent" | |
257 | - android:layout_height="wrap_content" | |
258 | - android:layout_marginTop="15dp" | |
259 | - android:layout_marginBottom="15dp" | |
260 | - android:background="@color/white" | |
261 | - android:orientation="vertical" | |
262 | - tools:ignore="WebViewLayout"> | |
241 | + android:background="@drawable/bg_soild_blue_25" | |
242 | + android:gravity="center" | |
243 | + android:text="修改标签" | |
244 | + android:textColor="@color/white" /> | |
263 | 245 | |
264 | 246 | <TextView |
247 | + android:id="@+id/tv_subject" | |
265 | 248 | android:layout_width="wrap_content" |
266 | 249 | android:layout_height="wrap_content" |
250 | + android:layout_below="@+id/tv_edit" | |
267 | 251 | android:layout_marginLeft="15dp" |
268 | 252 | android:layout_marginTop="15dp" |
269 | - android:text="掌握状态" | |
270 | - android:textColor="@color/text_title" | |
271 | - android:textSize="15sp" /> | |
253 | + android:textColor="#333333" /> | |
272 | 254 | |
273 | - <RadioGroup | |
274 | - android:id="@+id/type_radio" | |
275 | - android:layout_width="match_parent" | |
276 | - android:layout_height="40dp" | |
255 | + <TextView | |
256 | + android:id="@+id/tv_grade" | |
257 | + android:layout_width="wrap_content" | |
258 | + android:layout_height="wrap_content" | |
259 | + android:layout_below="@+id/tv_subject" | |
277 | 260 | android:layout_marginLeft="15dp" |
278 | - android:layout_marginTop="15dp" | |
279 | - android:layout_marginBottom="15dp" | |
280 | - android:orientation="horizontal"> | |
261 | + android:layout_marginTop="10dp" | |
262 | + android:textColor="#333333" /> | |
281 | 263 | |
282 | - <RadioButton | |
283 | - android:layout_width="70dp" | |
284 | - android:layout_height="match_parent" | |
285 | - android:layout_marginRight="20dp" | |
286 | - android:background="@drawable/radio_button_selector" | |
287 | - android:button="@null" | |
288 | - android:gravity="center" | |
289 | - android:text="已掌握" | |
290 | - android:textColor="@drawable/radio_text_selector" | |
291 | - android:textSize="14sp" /> | |
264 | + <TextView | |
265 | + android:id="@+id/tv_reason" | |
266 | + android:layout_width="wrap_content" | |
267 | + android:layout_height="wrap_content" | |
268 | + android:layout_below="@+id/tv_grade" | |
269 | + android:layout_marginLeft="15dp" | |
270 | + android:layout_marginTop="10dp" | |
271 | + android:textColor="#333333" /> | |
272 | + | |
273 | + <TextView | |
274 | + android:id="@+id/tv_manager" | |
275 | + android:layout_width="wrap_content" | |
276 | + android:layout_height="wrap_content" | |
277 | + android:layout_below="@+id/tv_reason" | |
278 | + android:layout_marginLeft="15dp" | |
279 | + android:layout_marginTop="10dp" | |
280 | + android:textColor="#333333" /> | |
281 | + | |
282 | + <TextView | |
283 | + android:id="@+id/tv_type" | |
284 | + android:layout_width="wrap_content" | |
285 | + android:layout_height="wrap_content" | |
286 | + android:layout_below="@+id/tv_manager" | |
287 | + android:layout_marginLeft="15dp" | |
288 | + android:layout_marginTop="10dp" | |
289 | + android:layout_marginBottom="15dp" | |
290 | + android:textColor="#333333" /> | |
291 | + </RelativeLayout> | |
292 | 292 | |
293 | - <RadioButton | |
294 | - android:layout_width="70dp" | |
295 | - android:layout_height="match_parent" | |
296 | - android:layout_marginRight="20dp" | |
297 | - android:background="@drawable/radio_button_selector" | |
298 | - android:button="@null" | |
299 | - android:gravity="center" | |
300 | - android:text="未掌握" | |
301 | - android:textColor="@drawable/radio_text_selector" | |
302 | - android:textSize="14sp" /> | |
303 | - </RadioGroup> | |
304 | - </LinearLayout> | |
305 | 293 | |
306 | 294 | <TextView |
307 | 295 | android:id="@+id/tv_tip" | ... | ... |
app/src/main/res/layout/dialog_edit_error.xml
... | ... | @@ -170,6 +170,47 @@ |
170 | 170 | android:textSize="14sp" /> |
171 | 171 | </RadioGroup> |
172 | 172 | |
173 | + <TextView | |
174 | + android:layout_width="wrap_content" | |
175 | + android:layout_height="wrap_content" | |
176 | + android:layout_centerVertical="true" | |
177 | + android:layout_marginLeft="20dp" | |
178 | + android:layout_marginTop="20dp" | |
179 | + android:text="掌握状态" | |
180 | + android:textColor="@color/text_title" | |
181 | + android:textSize="15sp" | |
182 | + android:textStyle="bold" /> | |
183 | + | |
184 | + <RadioGroup | |
185 | + android:id="@+id/manager_radio" | |
186 | + android:layout_width="match_parent" | |
187 | + android:layout_height="40dp" | |
188 | + android:layout_marginLeft="20dp" | |
189 | + android:layout_marginTop="10dp" | |
190 | + android:orientation="horizontal"> | |
191 | + | |
192 | + <RadioButton | |
193 | + android:layout_width="65dp" | |
194 | + android:layout_height="match_parent" | |
195 | + android:layout_marginRight="20dp" | |
196 | + android:background="@drawable/radio_button_selector" | |
197 | + android:button="@null" | |
198 | + android:gravity="center" | |
199 | + android:text="已掌握" | |
200 | + android:textColor="@drawable/radio_text_selector" | |
201 | + android:textSize="14sp" /> | |
202 | + | |
203 | + <RadioButton | |
204 | + android:layout_width="65dp" | |
205 | + android:layout_height="match_parent" | |
206 | + android:layout_marginRight="20dp" | |
207 | + android:background="@drawable/radio_button_selector" | |
208 | + android:button="@null" | |
209 | + android:gravity="center" | |
210 | + android:text="未掌握" | |
211 | + android:textColor="@drawable/radio_text_selector" | |
212 | + android:textSize="14sp" /> | |
213 | + </RadioGroup> | |
173 | 214 | |
174 | 215 | <RelativeLayout |
175 | 216 | android:layout_width="match_parent" | ... | ... |
app/src/main/res/layout/fragment_error_book.xml
app/src/main/res/layout/fragment_home.xml
... | ... | @@ -93,6 +93,7 @@ |
93 | 93 | app:layout_constraintTop_toTopOf="parent"> |
94 | 94 | |
95 | 95 | <LinearLayout |
96 | + android:id="@+id/ll_app" | |
96 | 97 | android:layout_width="0dp" |
97 | 98 | android:layout_height="wrap_content" |
98 | 99 | android:layout_gravity="center_vertical" |
... | ... | @@ -153,6 +154,7 @@ |
153 | 154 | |
154 | 155 | |
155 | 156 | <LinearLayout |
157 | + android:id="@+id/ll_device" | |
156 | 158 | android:layout_width="0dp" |
157 | 159 | android:layout_height="wrap_content" |
158 | 160 | android:layout_gravity="center_vertical" | ... | ... |
app/src/main/res/mipmap-xhdpi/ic_chinese.png
app/src/main/res/mipmap-xxhdpi/ic_chinese.png
app/src/main/res/values/strings.xml
... | ... | @@ -12,6 +12,11 @@ |
12 | 12 | <string name="num_topic">第%1$s题</string> |
13 | 13 | <string name="topic_type_in">课内</string> |
14 | 14 | <string name="topic_type_out">课外</string> |
15 | + <string name="topic_subject"><![CDATA[<font color="#666666">科</font><font color="#FFFFFF">科目</font><font color="#666666">目:</font>%1$s]]> </string> | |
16 | + <string name="topic_grade"><![CDATA[<font color="#666666">年级学期:</font>%1$s]]> </string> | |
17 | + <string name="topic_reason"><![CDATA[<font color="#666666">错误原因:</font>%1$s]]> </string> | |
18 | + <string name="topic_manager"><![CDATA[<font color="#666666">掌握状态:</font>%1$s]]> </string> | |
19 | + <string name="topic_type"><![CDATA[<font color="#666666">来</font><font color="#FFFFFF">科目</font><font color="#666666">源:</font>%1$s]]> </string> | |
15 | 20 | <string-array name="filter_subject"> |
16 | 21 | <item>@string/chinese</item> |
17 | 22 | <item>@string/math</item> | ... | ... |