Commit 484570f5e69ace351cf39d90919abe8318f8e5ad
1 parent
66afddedba
Exists in
master
BUG修改
Showing
19 changed files
with
447 additions
and
69 deletions
Show diff stats
app/src/main/AndroidManifest.xml
| ... | ... | @@ -42,6 +42,7 @@ |
| 42 | 42 | <activity |
| 43 | 43 | android:name=".LoginActivity" |
| 44 | 44 | android:exported="true" |
| 45 | + android:screenOrientation="portrait" | |
| 45 | 46 | android:theme="@style/ThemeSplash"> |
| 46 | 47 | <intent-filter> |
| 47 | 48 | <action android:name="android.intent.action.MAIN" /> |
| ... | ... | @@ -51,79 +52,104 @@ |
| 51 | 52 | <activity |
| 52 | 53 | android:name=".MainActivity" |
| 53 | 54 | android:launchMode="singleTask" |
| 55 | + android:screenOrientation="portrait" | |
| 54 | 56 | android:theme="@style/Theme.AppCompat.Light.NoActionBar" /> |
| 55 | 57 | <activity |
| 56 | 58 | android:name=".RegisterActivity" |
| 59 | + android:screenOrientation="portrait" | |
| 57 | 60 | android:theme="@style/ThemeSplash" /> |
| 58 | 61 | <activity |
| 59 | 62 | android:name=".UserActivity" |
| 63 | + android:screenOrientation="portrait" | |
| 60 | 64 | android:theme="@style/Theme.AppCompat.Light.NoActionBar" /> |
| 61 | 65 | <activity |
| 62 | 66 | android:name=".YinsiActivity" |
| 67 | + android:screenOrientation="portrait" | |
| 63 | 68 | android:theme="@style/Theme.AppCompat.Light.NoActionBar" /> |
| 64 | 69 | <activity |
| 65 | 70 | android:name=".QRActivity" |
| 71 | + android:screenOrientation="portrait" | |
| 66 | 72 | android:theme="@style/Theme.AppCompat.Light.NoActionBar" /> |
| 67 | 73 | <activity |
| 68 | 74 | android:name=".AddStudentActivity" |
| 75 | + android:screenOrientation="portrait" | |
| 69 | 76 | android:theme="@style/Theme.AppCompat.Light.NoActionBar" /> |
| 70 | 77 | <activity |
| 71 | 78 | android:name=".NickActivity" |
| 79 | + android:screenOrientation="portrait" | |
| 72 | 80 | android:theme="@style/Theme.AppCompat.Light.NoActionBar" /> |
| 73 | 81 | <activity |
| 74 | 82 | android:name=".SexActivity" |
| 83 | + android:screenOrientation="portrait" | |
| 75 | 84 | android:theme="@style/Theme.AppCompat.Light.NoActionBar" /> |
| 76 | 85 | <activity |
| 77 | 86 | android:name=".NianActivity" |
| 87 | + android:screenOrientation="portrait" | |
| 78 | 88 | android:theme="@style/Theme.AppCompat.Light.NoActionBar" /> |
| 79 | 89 | <activity |
| 80 | 90 | android:name=".ShenActivity" |
| 91 | + android:screenOrientation="portrait" | |
| 81 | 92 | android:theme="@style/Theme.AppCompat.Light.NoActionBar" /> |
| 82 | 93 | <activity |
| 83 | 94 | android:name=".UserAgreementActivity" |
| 95 | + android:screenOrientation="portrait" | |
| 84 | 96 | android:theme="@style/Theme.AppCompat.Light.NoActionBar" /> |
| 85 | 97 | <activity |
| 86 | 98 | android:name=".AccountActivity" |
| 99 | + android:screenOrientation="portrait" | |
| 87 | 100 | android:theme="@style/Theme.AppCompat.Light.NoActionBar" /> |
| 88 | 101 | |
| 89 | 102 | <activity |
| 90 | 103 | android:name=".ChangePwdActivity" |
| 104 | + android:screenOrientation="portrait" | |
| 91 | 105 | android:theme="@style/Theme.AppCompat.Light.NoActionBar" /> |
| 92 | 106 | <activity |
| 93 | 107 | android:name=".EditStudentActivity" |
| 108 | + android:screenOrientation="portrait" | |
| 94 | 109 | android:theme="@style/Theme.AppCompat.Light.NoActionBar" /> |
| 95 | 110 | <activity |
| 96 | 111 | android:name=".ChooseActivity" |
| 112 | + android:screenOrientation="portrait" | |
| 97 | 113 | android:theme="@style/Theme.AppCompat.Light.NoActionBar" /> |
| 98 | 114 | <activity |
| 99 | 115 | android:name=".AddTeacherActivity" |
| 116 | + android:screenOrientation="portrait" | |
| 100 | 117 | android:theme="@style/Theme.AppCompat.Light.NoActionBar" /> |
| 101 | 118 | <activity |
| 102 | 119 | android:name=".ErrorBookActivity" |
| 120 | + android:screenOrientation="portrait" | |
| 103 | 121 | android:theme="@style/Theme.AppCompat.Light.NoActionBar" /> |
| 104 | 122 | <activity |
| 105 | 123 | android:name=".ImageActivity" |
| 124 | + android:screenOrientation="portrait" | |
| 106 | 125 | android:theme="@style/Theme.AppCompat.Light.NoActionBar" /> |
| 107 | 126 | <activity |
| 108 | 127 | android:name=".ImageEditActivity" |
| 128 | + android:screenOrientation="portrait" | |
| 109 | 129 | android:theme="@style/Theme.AppCompat.Light.NoActionBar" /> |
| 110 | 130 | <activity |
| 111 | 131 | android:name=".ImageSelectActivity" |
| 132 | + android:screenOrientation="portrait" | |
| 112 | 133 | android:theme="@style/Theme.AppCompat.Light.NoActionBar" /> |
| 113 | 134 | <activity |
| 114 | 135 | android:name=".AddSuccessActivity" |
| 136 | + android:screenOrientation="portrait" | |
| 115 | 137 | android:theme="@style/Theme.AppCompat.Light.NoActionBar" /> |
| 116 | 138 | <activity |
| 117 | 139 | android:name=".ErrorListActivity" |
| 140 | + android:screenOrientation="portrait" | |
| 118 | 141 | android:theme="@style/Theme.AppCompat.Light.NoActionBar" /> |
| 119 | 142 | <activity |
| 120 | 143 | android:name=".ErrorDetailActivity" |
| 144 | + android:screenOrientation="portrait" | |
| 121 | 145 | android:theme="@style/Theme.AppCompat.Light.NoActionBar" /> |
| 122 | 146 | <activity |
| 123 | 147 | android:name=".TeacherChooseActivity" |
| 148 | + android:screenOrientation="portrait" | |
| 124 | 149 | android:theme="@style/Theme.AppCompat.Light.NoActionBar" /> |
| 125 | 150 | <activity |
| 126 | 151 | android:name=".TeacherMainActivity" |
| 152 | + android:screenOrientation="portrait" | |
| 127 | 153 | android:theme="@style/Theme.AppCompat.Light.NoActionBar" /> |
| 128 | 154 | |
| 129 | 155 | <provider | ... | ... |
app/src/main/java/com/hjx/parent/AddSuccessActivity.java
| ... | ... | @@ -73,10 +73,10 @@ public class AddSuccessActivity extends BaseActivity<ActivityAddSuccessBinding> |
| 73 | 73 | .multiSelect(true) //是否多选 |
| 74 | 74 | .isShowCamera(false).isVideoPicker(false) //是否选择视频 默认false |
| 75 | 75 | .isImagePicker(true).imagePickerType(ImagePickerEnum.PHOTO_PICKER) //选择器打开类型 |
| 76 | - .maxImageSelectable(9) //图片可选择数 | |
| 76 | + .maxImageSelectable(5) //图片可选择数 | |
| 77 | 77 | .maxHeight(1920) //图片最大高度 |
| 78 | 78 | .maxWidth(1920) //图片最大宽度 |
| 79 | - .maxImageSize(10) //图片最大大小Mb | |
| 79 | + .maxImageSize(3) //图片最大大小Mb | |
| 80 | 80 | .isCrop(false).pathList(new ArrayList<>()).pickerThemeColorRes(R.color.image_picker_white).pickerTitleColorRes(R.color.image_picker_text_black).cropThemeColorRes(R.color.image_picker_white).cropTitleColorRes(R.color.image_picker_text_black).pickerBackRes(R.mipmap.image_picker_back_black).pickerFolderRes(R.mipmap.image_picker_folder_black).build(); |
| 81 | 81 | ImagePickerOpen.getInstance().setImagePickerConfig(imagePickerConfig).pathList(new ArrayList<>()).open(AddSuccessActivity.this); |
| 82 | 82 | ... | ... |
app/src/main/java/com/hjx/parent/ErrorBookActivity.java
| ... | ... | @@ -204,10 +204,10 @@ public class ErrorBookActivity extends BaseActivity<ActivityErrorBookBinding> { |
| 204 | 204 | .multiSelect(true) //是否多选 |
| 205 | 205 | .isShowCamera(false).isVideoPicker(false) //是否选择视频 默认false |
| 206 | 206 | .isImagePicker(true).imagePickerType(ImagePickerEnum.PHOTO_PICKER) //选择器打开类型 |
| 207 | - .maxImageSelectable(9) //图片可选择数 | |
| 207 | + .maxImageSelectable(5) //图片可选择数 | |
| 208 | 208 | .maxHeight(1920) //图片最大高度 |
| 209 | 209 | .maxWidth(1920) //图片最大宽度 |
| 210 | - .maxImageSize(10) //图片最大大小Mb | |
| 210 | + .maxImageSize(3) //图片最大大小Mb | |
| 211 | 211 | .isCrop(false).pathList(new ArrayList<>()).pickerThemeColorRes(R.color.image_picker_white).pickerTitleColorRes(R.color.image_picker_text_black).cropThemeColorRes(R.color.image_picker_white).cropTitleColorRes(R.color.image_picker_text_black).pickerBackRes(R.mipmap.image_picker_back_black).pickerFolderRes(R.mipmap.image_picker_folder_black).build(); |
| 212 | 212 | ImagePickerOpen.getInstance().setImagePickerConfig(imagePickerConfig).pathList(new ArrayList<>()).open(ErrorBookActivity.this); |
| 213 | 213 | ... | ... |
app/src/main/java/com/hjx/parent/ErrorListActivity.java
| ... | ... | @@ -33,6 +33,7 @@ import com.hjq.permissions.Permission; |
| 33 | 33 | import com.hjq.permissions.XXPermissions; |
| 34 | 34 | import com.hjx.parent.adapter.ErrorAdapter; |
| 35 | 35 | import com.hjx.parent.adapter.FilterAdapter; |
| 36 | +import com.hjx.parent.adapter.GradeAdapter; | |
| 36 | 37 | import com.hjx.parent.adapter.LoadMoreOnScrollListener; |
| 37 | 38 | import com.hjx.parent.bean.StudentBean; |
| 38 | 39 | import com.hjx.parent.databinding.ActivityErrorListBinding; |
| ... | ... | @@ -68,10 +69,13 @@ public class ErrorListActivity extends BaseActivity<ActivityErrorListBinding> im |
| 68 | 69 | private TextView last; |
| 69 | 70 | private String subject; |
| 70 | 71 | private String grade; |
| 72 | + private String grade1; | |
| 71 | 73 | private String manger; |
| 72 | 74 | private String type = "全部"; |
| 73 | 75 | private String time = "全部"; |
| 74 | 76 | private FilterAdapter filterAdapter; |
| 77 | + | |
| 78 | + private GradeAdapter gradeAdapter; | |
| 75 | 79 | StudentBean studentBean; |
| 76 | 80 | private int page = 1; |
| 77 | 81 | private ErrorAdapter adapter; |
| ... | ... | @@ -100,7 +104,9 @@ public class ErrorListActivity extends BaseActivity<ActivityErrorListBinding> im |
| 100 | 104 | binding.checkbox.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { |
| 101 | 105 | @Override |
| 102 | 106 | public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { |
| 103 | - adapter.checkAll(isChecked); | |
| 107 | + if (binding.llEmpty.getVisibility() != View.VISIBLE) { | |
| 108 | + adapter.checkAll(isChecked); | |
| 109 | + } | |
| 104 | 110 | } |
| 105 | 111 | }); |
| 106 | 112 | RadioButton timeButton = (RadioButton) binding.groupTime.getChildAt(3); |
| ... | ... | @@ -139,6 +145,38 @@ public class ErrorListActivity extends BaseActivity<ActivityErrorListBinding> im |
| 139 | 145 | } |
| 140 | 146 | } |
| 141 | 147 | }); |
| 148 | + setGradeFilter(); | |
| 149 | + } | |
| 150 | + | |
| 151 | + private void setGradeFilter() { | |
| 152 | + if (TextUtils.isEmpty(grade)) { | |
| 153 | + grade = "全部"; | |
| 154 | + } | |
| 155 | + List<String> grades = new ArrayList<>(); | |
| 156 | + for (GradeAndSubject gradeAndSubject : App.getInstance().getGradeAndSubjects()) { | |
| 157 | + grades.add(gradeAndSubject.getGrade().getGrade()); | |
| 158 | + } | |
| 159 | + grades.add("全部"); | |
| 160 | + gradeAdapter = new GradeAdapter(context, new GradeAdapter.Filter() { | |
| 161 | + @Override | |
| 162 | + public void onSelect(String select) { | |
| 163 | + grade = select; | |
| 164 | + page = 1; | |
| 165 | + gradeAdapter.refresh(select); | |
| 166 | + refreshError(); | |
| 167 | + } | |
| 168 | + }, grades, grade); | |
| 169 | + binding.recycleGrade.setLayoutManager(new GridLayoutManager(context, 4, LinearLayoutManager.VERTICAL, false)); | |
| 170 | + binding.recycleGrade.setAdapter(gradeAdapter); | |
| 171 | + binding.groupGrade.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() { | |
| 172 | + @Override | |
| 173 | + public void onCheckedChanged(RadioGroup group, int checkedId) { | |
| 174 | + RadioButton rcheck = (RadioButton) findViewById(checkedId); | |
| 175 | + grade1 = rcheck.getText().toString(); | |
| 176 | + page = 1; | |
| 177 | + refreshError(); | |
| 178 | + } | |
| 179 | + }); | |
| 142 | 180 | } |
| 143 | 181 | |
| 144 | 182 | @Override |
| ... | ... | @@ -154,12 +192,7 @@ public class ErrorListActivity extends BaseActivity<ActivityErrorListBinding> im |
| 154 | 192 | finish(); |
| 155 | 193 | break; |
| 156 | 194 | case R.id.tv_filter_grade: |
| 157 | - List<String> grades = new ArrayList<>(); | |
| 158 | - for (GradeAndSubject gradeAndSubject : App.getInstance().getGradeAndSubjects()) { | |
| 159 | - grades.add(gradeAndSubject.getGrade().getGrade()); | |
| 160 | - } | |
| 161 | - grades.add("全部"); | |
| 162 | - setFilterAdapter(grades, binding.tvFilterGrade, grade); | |
| 195 | + showFilerGrade(); | |
| 163 | 196 | break; |
| 164 | 197 | case R.id.tv_filter_subject: |
| 165 | 198 | List<String> subjects = new ArrayList<>(); |
| ... | ... | @@ -294,10 +327,10 @@ public class ErrorListActivity extends BaseActivity<ActivityErrorListBinding> im |
| 294 | 327 | .multiSelect(true) //是否多选 |
| 295 | 328 | .isShowCamera(false).isVideoPicker(false) //是否选择视频 默认false |
| 296 | 329 | .isImagePicker(true).imagePickerType(ImagePickerEnum.PHOTO_PICKER) //选择器打开类型 |
| 297 | - .maxImageSelectable(9) //图片可选择数 | |
| 330 | + .maxImageSelectable(5) //图片可选择数 | |
| 298 | 331 | .maxHeight(1920) //图片最大高度 |
| 299 | 332 | .maxWidth(1920) //图片最大宽度 |
| 300 | - .maxImageSize(10) //图片最大大小Mb | |
| 333 | + .maxImageSize(3) //图片最大大小Mb | |
| 301 | 334 | .isCrop(false).pathList(new ArrayList<>()).pickerThemeColorRes(R.color.image_picker_white).pickerTitleColorRes(R.color.image_picker_text_black).cropThemeColorRes(R.color.image_picker_white).cropTitleColorRes(R.color.image_picker_text_black).pickerBackRes(R.mipmap.image_picker_back_black).pickerFolderRes(R.mipmap.image_picker_folder_black).build(); |
| 302 | 335 | ImagePickerOpen.getInstance().setImagePickerConfig(imagePickerConfig).pathList(new ArrayList<>()).open(ErrorListActivity.this); |
| 303 | 336 | |
| ... | ... | @@ -350,10 +383,45 @@ public class ErrorListActivity extends BaseActivity<ActivityErrorListBinding> im |
| 350 | 383 | }); |
| 351 | 384 | } |
| 352 | 385 | |
| 386 | + private void showFilerGrade() { | |
| 387 | + binding.recycleFilter.setVisibility(View.GONE); | |
| 388 | + binding.llFilterMore.setVisibility(View.GONE); | |
| 389 | + if (binding.llFilterGrade.getVisibility() == View.VISIBLE) { | |
| 390 | + binding.llFilterGrade.setVisibility(View.GONE); | |
| 391 | + binding.tvFilterGrade.setTextColor(getColor(R.color.text_title)); | |
| 392 | + Drawable drawable = getResources().getDrawable(R.drawable.ic_filter_gray); | |
| 393 | + // 这一步必须要做,否则不会显示. | |
| 394 | + drawable.setBounds(0, 0, drawable.getMinimumWidth(), drawable.getMinimumHeight()); | |
| 395 | + binding.tvFilterGrade.setCompoundDrawables(null, null, drawable, null); | |
| 396 | + } else { | |
| 397 | + binding.llFilterGrade.setVisibility(View.VISIBLE); | |
| 398 | + if (last != null) { | |
| 399 | + last.setTextColor(getColor(R.color.text_title)); | |
| 400 | + Drawable drawable = getResources().getDrawable(R.drawable.ic_filter_gray); | |
| 401 | + // 这一步必须要做,否则不会显示. | |
| 402 | + drawable.setBounds(0, 0, drawable.getMinimumWidth(), drawable.getMinimumHeight()); | |
| 403 | + last.setCompoundDrawables(null, null, drawable, null); | |
| 404 | + } | |
| 405 | + binding.tvFilterGrade.setTextColor(Color.parseColor("#1C90F3")); | |
| 406 | + Drawable drawable1 = getResources().getDrawable(R.drawable.ic_filter_blue); | |
| 407 | + // 这一步必须要做,否则不会显示. | |
| 408 | + drawable1.setBounds(0, 0, drawable1.getMinimumWidth(), drawable1.getMinimumHeight()); | |
| 409 | + binding.tvFilterGrade.setCompoundDrawables(null, null, drawable1, null); | |
| 410 | + last = binding.tvFilterGrade; | |
| 411 | + } | |
| 412 | + | |
| 413 | + } | |
| 414 | + | |
| 353 | 415 | private void showFilterMore() { |
| 354 | 416 | binding.recycleFilter.setVisibility(View.GONE); |
| 417 | + binding.llFilterGrade.setVisibility(View.GONE); | |
| 355 | 418 | if (binding.llFilterMore.getVisibility() == View.VISIBLE) { |
| 356 | 419 | binding.llFilterMore.setVisibility(View.GONE); |
| 420 | + binding.tvFilterMore.setTextColor(getColor(R.color.text_title)); | |
| 421 | + Drawable drawable = getResources().getDrawable(R.drawable.ic_filter_gray); | |
| 422 | + // 这一步必须要做,否则不会显示. | |
| 423 | + drawable.setBounds(0, 0, drawable.getMinimumWidth(), drawable.getMinimumHeight()); | |
| 424 | + binding.tvFilterMore.setCompoundDrawables(null, null, drawable, null); | |
| 357 | 425 | } else { |
| 358 | 426 | binding.llFilterMore.setVisibility(View.VISIBLE); |
| 359 | 427 | if (last != null) { |
| ... | ... | @@ -376,8 +444,9 @@ public class ErrorListActivity extends BaseActivity<ActivityErrorListBinding> im |
| 376 | 444 | if (TextUtils.isEmpty(select)) { |
| 377 | 445 | select = "全部"; |
| 378 | 446 | } |
| 447 | + binding.llFilterGrade.setVisibility(View.GONE); | |
| 379 | 448 | binding.llFilterMore.setVisibility(View.GONE); |
| 380 | - if (last != null && last.getId() == R.id.tv_filter_more) { | |
| 449 | + if (last != null && (last.getId() == R.id.tv_filter_more || last.getId() == R.id.tv_filter_grade)) { | |
| 381 | 450 | last.setTextColor(getColor(R.color.text_title)); |
| 382 | 451 | Drawable drawable = getResources().getDrawable(R.drawable.ic_filter_gray); |
| 383 | 452 | // 这一步必须要做,否则不会显示. |
| ... | ... | @@ -392,9 +461,6 @@ public class ErrorListActivity extends BaseActivity<ActivityErrorListBinding> im |
| 392 | 461 | @Override |
| 393 | 462 | public void onSelect(TextView type, String select) { |
| 394 | 463 | switch (type.getId()) { |
| 395 | - case R.id.tv_filter_grade: | |
| 396 | - grade = select; | |
| 397 | - break; | |
| 398 | 464 | case R.id.tv_filter_subject: |
| 399 | 465 | subject = select; |
| 400 | 466 | break; |
| ... | ... | @@ -448,7 +514,15 @@ public class ErrorListActivity extends BaseActivity<ActivityErrorListBinding> im |
| 448 | 514 | map.put("subject", subject); |
| 449 | 515 | } |
| 450 | 516 | if (!TextUtils.isEmpty(grade) && !"全部".equals(grade)) { |
| 451 | - map.put("grade", grade); | |
| 517 | + if (!TextUtils.isEmpty(grade1) && !"全部".equals(grade1)) { | |
| 518 | + map.put("grade", grade + grade1); | |
| 519 | + } else { | |
| 520 | + map.put("grade", grade); | |
| 521 | + } | |
| 522 | + } else { | |
| 523 | + if (!TextUtils.isEmpty(grade1) && !"全部".equals(grade1)) { | |
| 524 | + map.put("grade", grade1); | |
| 525 | + } | |
| 452 | 526 | } |
| 453 | 527 | if (!TextUtils.isEmpty(time) && !"全部".equals(time)) { |
| 454 | 528 | if ("一周内".equals(time)) { | ... | ... |
app/src/main/java/com/hjx/parent/ImageActivity.java
| ... | ... | @@ -67,20 +67,24 @@ public class ImageActivity extends BaseActivity<ActivityImageBinding> implements |
| 67 | 67 | @Override |
| 68 | 68 | public void onPageSelected(int position) { |
| 69 | 69 | if (list.get(position).getCuts() == null) { |
| 70 | - binding.ivPrevious.setEnabled(false); | |
| 71 | - binding.ivNext.setEnabled(false); | |
| 70 | +// binding.ivPrevious.setEnabled(false); | |
| 71 | +// binding.ivNext.setEnabled(false); | |
| 72 | 72 | clearText(); |
| 73 | 73 | } |
| 74 | 74 | binding.tvTitle.setText((binding.viewPager.getCurrentItem() + 1) + "/" + list.size()); |
| 75 | 75 | if (position == 0) { |
| 76 | 76 | binding.ivPrevious.setImageResource(R.mipmap.ic_previous_gray); |
| 77 | +// binding.ivPrevious.setEnabled(true); | |
| 77 | 78 | } else { |
| 78 | 79 | binding.ivPrevious.setImageResource(R.mipmap.ic_previous); |
| 80 | +// binding.ivPrevious.setEnabled(false); | |
| 79 | 81 | } |
| 80 | 82 | if (position == list.size() - 1) { |
| 81 | 83 | binding.ivNext.setImageResource(R.mipmap.ic_next_gray); |
| 84 | +// binding.ivNext.setEnabled(true); | |
| 82 | 85 | } else { |
| 83 | 86 | binding.ivNext.setImageResource(R.mipmap.ic_next); |
| 87 | +// binding.ivNext.setEnabled(false); | |
| 84 | 88 | } |
| 85 | 89 | super.onPageSelected(position); |
| 86 | 90 | } |
| ... | ... | @@ -99,8 +103,8 @@ public class ImageActivity extends BaseActivity<ActivityImageBinding> implements |
| 99 | 103 | showLoadingDialog(getString(R.string.loading_text), new LoadingDialog.DismissListener() { |
| 100 | 104 | @Override |
| 101 | 105 | public void dimiss() { |
| 102 | - binding.ivPrevious.setEnabled(index != 0); | |
| 103 | - binding.ivNext.setEnabled(index != list.size() - 1); | |
| 106 | +// binding.ivPrevious.setEnabled(index != 0); | |
| 107 | +// binding.ivNext.setEnabled(index != list.size() - 1); | |
| 104 | 108 | } |
| 105 | 109 | }); |
| 106 | 110 | Log.i("clearText", list.get(index).getPath()); |
| ... | ... | @@ -275,10 +279,14 @@ public class ImageActivity extends BaseActivity<ActivityImageBinding> implements |
| 275 | 279 | back(); |
| 276 | 280 | break; |
| 277 | 281 | case R.id.iv_next: |
| 278 | - binding.viewPager.setCurrentItem(binding.viewPager.getCurrentItem() + 1); | |
| 282 | + if (binding.viewPager.getCurrentItem() + 1 < list.size()) { | |
| 283 | + binding.viewPager.setCurrentItem(binding.viewPager.getCurrentItem() + 1); | |
| 284 | + } | |
| 279 | 285 | break; |
| 280 | 286 | case R.id.iv_previous: |
| 281 | - binding.viewPager.setCurrentItem(binding.viewPager.getCurrentItem() - 1); | |
| 287 | + if (binding.viewPager.getCurrentItem() != 0) { | |
| 288 | + binding.viewPager.setCurrentItem(binding.viewPager.getCurrentItem() - 1); | |
| 289 | + } | |
| 282 | 290 | break; |
| 283 | 291 | case R.id.ll_edit: |
| 284 | 292 | Intent intent = new Intent(context, ImageEditActivity.class); | ... | ... |
app/src/main/java/com/hjx/parent/MainActivity.java
| ... | ... | @@ -84,7 +84,7 @@ public class MainActivity extends BaseActivity { |
| 84 | 84 | tv_1 = findViewById(R.id.tv_1); |
| 85 | 85 | tv_4 = findViewById(R.id.tv_4); |
| 86 | 86 | iv_3.setBackgroundResource(R.mipmap.hoss); |
| 87 | - tv_1.setTextColor(Color.parseColor("#FE5E09")); | |
| 87 | + tv_1.setTextColor(Color.parseColor("#1C90F3")); | |
| 88 | 88 | NetWorks.getBaiduToken(new Observer<JsonObject>() { |
| 89 | 89 | @Override |
| 90 | 90 | public void onSubscribe(Disposable d) { | ... | ... |
app/src/main/java/com/hjx/parent/TeacherMainActivity.java
| ... | ... | @@ -77,7 +77,7 @@ public class TeacherMainActivity extends BaseActivity { |
| 77 | 77 | tv_1 = findViewById(R.id.tv_1); |
| 78 | 78 | tv_4 = findViewById(R.id.tv_4); |
| 79 | 79 | iv_3.setBackgroundResource(R.mipmap.hoss); |
| 80 | - tv_1.setTextColor(Color.parseColor("#FE5E09")); | |
| 80 | + tv_1.setTextColor(Color.parseColor("#1C90F3")); | |
| 81 | 81 | NetWorks.getBaiduToken(new Observer<JsonObject>() { |
| 82 | 82 | @Override |
| 83 | 83 | public void onSubscribe(Disposable d) { |
| ... | ... | @@ -214,6 +214,14 @@ public class TeacherMainActivity extends BaseActivity { |
| 214 | 214 | startActivity(intentUpdate); |
| 215 | 215 | } |
| 216 | 216 | |
| 217 | + @Override | |
| 218 | + protected void onResume() { | |
| 219 | + super.onResume(); | |
| 220 | + if (errorFragment != null) { | |
| 221 | + errorFragment.refreshStudent(); | |
| 222 | + } | |
| 223 | + } | |
| 224 | + | |
| 217 | 225 | public void checkUpdate() { |
| 218 | 226 | NetWorks.checkUpdate(BuildConfig.VERSION_CODE, BuildConfig.APPLICATION_ID, new Callback<ResponseResult<UpdateBean>>() { |
| 219 | 227 | @Override | ... | ... |
app/src/main/java/com/hjx/parent/adapter/GradeAdapter.java
| ... | ... | @@ -0,0 +1,80 @@ |
| 1 | +package com.hjx.parent.adapter; | |
| 2 | + | |
| 3 | +import android.content.Context; | |
| 4 | +import android.graphics.Color; | |
| 5 | +import android.view.LayoutInflater; | |
| 6 | +import android.view.View; | |
| 7 | +import android.view.ViewGroup; | |
| 8 | +import android.widget.TextView; | |
| 9 | + | |
| 10 | +import androidx.annotation.NonNull; | |
| 11 | +import androidx.recyclerview.widget.RecyclerView; | |
| 12 | + | |
| 13 | +import com.hjx.parent.R; | |
| 14 | +import com.hjx.parent.databinding.ItemFilterTextBinding; | |
| 15 | + | |
| 16 | +import java.util.List; | |
| 17 | + | |
| 18 | +public class GradeAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> { | |
| 19 | + private List<String> list; | |
| 20 | + private Filter filter; | |
| 21 | + private Context context; | |
| 22 | + private String key; | |
| 23 | + | |
| 24 | + public interface Filter { | |
| 25 | + void onSelect(String select); | |
| 26 | + } | |
| 27 | + | |
| 28 | + public GradeAdapter(Context context, Filter filter, List<String> list, String key) { | |
| 29 | + this.context = context; | |
| 30 | + this.filter = filter; | |
| 31 | + this.list = list; | |
| 32 | + this.key = key; | |
| 33 | + } | |
| 34 | + | |
| 35 | + public void refresh( String key) { | |
| 36 | + this.key = key; | |
| 37 | + notifyDataSetChanged(); | |
| 38 | + } | |
| 39 | + | |
| 40 | + @NonNull | |
| 41 | + @Override | |
| 42 | + public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { | |
| 43 | + ItemFilterTextBinding itemFilterBinding = ItemFilterTextBinding.inflate(LayoutInflater.from(parent.getContext()), parent, false); | |
| 44 | + return new FilterHolder(itemFilterBinding); | |
| 45 | + } | |
| 46 | + | |
| 47 | + @Override | |
| 48 | + public void onBindViewHolder(@NonNull RecyclerView.ViewHolder viewHolder, int i) { | |
| 49 | + FilterHolder holder = (FilterHolder) viewHolder; | |
| 50 | + String value = list.get(i); | |
| 51 | + holder.binding.tvFilter.setText(value); | |
| 52 | + if (key.contains(value)) { | |
| 53 | + holder.binding.tvFilter.setTextColor(Color.WHITE); | |
| 54 | + holder.binding.tvFilter.setBackgroundResource(R.drawable.bg_soild_blue_25); | |
| 55 | + } else { | |
| 56 | + holder.binding.tvFilter.setTextColor(context.getColor(R.color.text_title)); | |
| 57 | + holder.binding.tvFilter.setBackgroundResource(R.drawable.bg_solid_btn_grad); | |
| 58 | + } | |
| 59 | + holder.itemView.setOnClickListener(new View.OnClickListener() { | |
| 60 | + @Override | |
| 61 | + public void onClick(View view) { | |
| 62 | + filter.onSelect(value); | |
| 63 | + } | |
| 64 | + }); | |
| 65 | + } | |
| 66 | + | |
| 67 | + @Override | |
| 68 | + public int getItemCount() { | |
| 69 | + return list.size(); | |
| 70 | + } | |
| 71 | + | |
| 72 | + static class FilterHolder extends RecyclerView.ViewHolder { | |
| 73 | + ItemFilterTextBinding binding; | |
| 74 | + | |
| 75 | + public FilterHolder(@NonNull ItemFilterTextBinding itemView) { | |
| 76 | + super(itemView.getRoot()); | |
| 77 | + binding = itemView; | |
| 78 | + } | |
| 79 | + } | |
| 80 | +} | ... | ... |
app/src/main/java/com/hjx/parent/adapter/ImageAdapter.java
| ... | ... | @@ -114,6 +114,13 @@ public class ImageAdapter extends RecyclerView.Adapter<ImageAdapter.ImageHolder> |
| 114 | 114 | ImageView iv_state = view.findViewById(R.id.iv_state); |
| 115 | 115 | ImageView iv_edit = view.findViewById(R.id.iv_edit); |
| 116 | 116 | int finalI = i; |
| 117 | + if (imageBean.getCuts().get(i).isSelect()) { | |
| 118 | + rl_add.setBackgroundResource(R.drawable.bg_cut_select); | |
| 119 | + iv_state.setImageResource(R.mipmap.ic_selected); | |
| 120 | + } else { | |
| 121 | + rl_add.setBackgroundResource(R.drawable.bg_cut_unselect); | |
| 122 | + iv_state.setImageResource(R.mipmap.ic_add); | |
| 123 | + } | |
| 117 | 124 | rl_add.setOnClickListener(new View.OnClickListener() { |
| 118 | 125 | @Override |
| 119 | 126 | public void onClick(View v) { | ... | ... |
app/src/main/java/com/hjx/parent/dialog/ErrorEditDialog.java
| ... | ... | @@ -53,6 +53,7 @@ public class ErrorEditDialog extends Dialog { |
| 53 | 53 | private DialogEditErrorBinding binding; |
| 54 | 54 | private List<TopicBean> list; |
| 55 | 55 | private Grade grade; |
| 56 | + private String term; | |
| 56 | 57 | private Subject subject; |
| 57 | 58 | private int reason; |
| 58 | 59 | private int type = 0; |
| ... | ... | @@ -97,6 +98,19 @@ public class ErrorEditDialog extends Dialog { |
| 97 | 98 | |
| 98 | 99 | } |
| 99 | 100 | }); |
| 101 | + ArrayAdapter<String> gradeAdapter1 = new ArrayAdapter<>(context, R.layout.item_for_custom_spinner, getContext().getResources().getStringArray(R.array.grade_array)); | |
| 102 | + binding.spinnerGrade1.setAdapter(gradeAdapter1); | |
| 103 | + binding.spinnerGrade1.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { | |
| 104 | + @Override | |
| 105 | + public void onItemSelected(AdapterView<?> parent, View view, int position, long id) { | |
| 106 | + term = getContext().getResources().getStringArray(R.array.grade_array)[position]; | |
| 107 | + } | |
| 108 | + | |
| 109 | + @Override | |
| 110 | + public void onNothingSelected(AdapterView<?> parent) { | |
| 111 | + | |
| 112 | + } | |
| 113 | + }); | |
| 100 | 114 | ArrayAdapter<String> reasonAdapter = new ArrayAdapter<>(context, R.layout.item_for_custom_spinner, context.getResources().getStringArray(R.array.error_reason)); |
| 101 | 115 | binding.spinnerReason.setAdapter(reasonAdapter); |
| 102 | 116 | binding.spinnerReason.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { |
| ... | ... | @@ -138,7 +152,7 @@ public class ErrorEditDialog extends Dialog { |
| 138 | 152 | for (TopicBean topicBean : list) { |
| 139 | 153 | HashMap<String, Object> map = new HashMap<>(); |
| 140 | 154 | map.put("bookId", topicBean.getId()); |
| 141 | - map.put("grade", grade.getGrade()); | |
| 155 | + map.put("grade", grade.getGrade() + term); | |
| 142 | 156 | map.put("subject", subject.getSubject()); |
| 143 | 157 | map.put("errorReason", String.valueOf(reason)); |
| 144 | 158 | map.put("title", grade.getGrade() + "-" + subject.getSubject() + "-" + (type == 0 ? "课内" : "课外") + "错题"); | ... | ... |
app/src/main/java/com/hjx/parent/dialog/ErrorInputDialog.java
| ... | ... | @@ -59,6 +59,7 @@ public class ErrorInputDialog extends Dialog { |
| 59 | 59 | private List<TopicBean> list; |
| 60 | 60 | private int select = 0; |
| 61 | 61 | private Grade grade; |
| 62 | + private String term; | |
| 62 | 63 | private Subject subject; |
| 63 | 64 | private int reason; |
| 64 | 65 | private int type = 0; |
| ... | ... | @@ -133,6 +134,19 @@ public class ErrorInputDialog extends Dialog { |
| 133 | 134 | |
| 134 | 135 | } |
| 135 | 136 | }); |
| 137 | + ArrayAdapter<String> gradeAdapter1 = new ArrayAdapter<>(context, R.layout.item_for_custom_spinner, getContext().getResources().getStringArray(R.array.grade_array)); | |
| 138 | + binding.spinnerGrade1.setAdapter(gradeAdapter1); | |
| 139 | + binding.spinnerGrade1.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { | |
| 140 | + @Override | |
| 141 | + public void onItemSelected(AdapterView<?> parent, View view, int position, long id) { | |
| 142 | + term = getContext().getResources().getStringArray(R.array.grade_array)[position]; | |
| 143 | + } | |
| 144 | + | |
| 145 | + @Override | |
| 146 | + public void onNothingSelected(AdapterView<?> parent) { | |
| 147 | + | |
| 148 | + } | |
| 149 | + }); | |
| 136 | 150 | ArrayAdapter<String> reasonAdapter = new ArrayAdapter<>(context, R.layout.item_for_custom_spinner, context.getResources().getStringArray(R.array.error_reason)); |
| 137 | 151 | binding.spinnerReason.setAdapter(reasonAdapter); |
| 138 | 152 | binding.spinnerReason.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { |
| ... | ... | @@ -231,7 +245,7 @@ public class ErrorInputDialog extends Dialog { |
| 231 | 245 | param.put("errorReason", String.valueOf(reason)); |
| 232 | 246 | param.put("title", grade.getGrade() + "-" + subject.getSubject() + "-" + (type == 0 ? "课内" : "课外") + "错题"); |
| 233 | 247 | param.put("subject", bean.getSubject()); |
| 234 | - param.put("grade", bean.getGrade()); | |
| 248 | + param.put("grade", bean.getGrade() + term); | |
| 235 | 249 | param.put("type", String.valueOf(bean.getType())); |
| 236 | 250 | param.put("teacherFlag", "0"); |
| 237 | 251 | param.put("controlFlag", "1"); | ... | ... |
app/src/main/java/com/hjx/parent/fragment/ErrorFragment.java
| ... | ... | @@ -80,9 +80,7 @@ public class ErrorFragment extends BaseBindingFragment<FragmentErrorBookBinding> |
| 80 | 80 | return FragmentErrorBookBinding.inflate(inflater, parent, false); |
| 81 | 81 | } |
| 82 | 82 | |
| 83 | - @Override | |
| 84 | - public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) { | |
| 85 | - super.onViewCreated(view, savedInstanceState); | |
| 83 | + public void refreshStudent() { | |
| 86 | 84 | String student = (String) SharedPreferencesUtil.getData("student", ""); |
| 87 | 85 | try { |
| 88 | 86 | studentBean = new Gson().fromJson(student, StudentBean.class); |
| ... | ... | @@ -97,6 +95,12 @@ public class ErrorFragment extends BaseBindingFragment<FragmentErrorBookBinding> |
| 97 | 95 | } catch (Exception e) { |
| 98 | 96 | |
| 99 | 97 | } |
| 98 | + } | |
| 99 | + | |
| 100 | + @Override | |
| 101 | + public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) { | |
| 102 | + super.onViewCreated(view, savedInstanceState); | |
| 103 | + refreshStudent(); | |
| 100 | 104 | getBinding().rlTakePhoto.post(new Runnable() { |
| 101 | 105 | @Override |
| 102 | 106 | public void run() { |
| ... | ... | @@ -110,7 +114,7 @@ public class ErrorFragment extends BaseBindingFragment<FragmentErrorBookBinding> |
| 110 | 114 | @Override |
| 111 | 115 | public void onClick(View v) { |
| 112 | 116 | startActivity(new Intent(getContext(), TeacherChooseActivity.class)); |
| 113 | - getActivity().finish(); | |
| 117 | +// getActivity().finish(); | |
| 114 | 118 | } |
| 115 | 119 | }); |
| 116 | 120 | getBinding().rlTakePhoto.setOnClickListener(new View.OnClickListener() { |
| ... | ... | @@ -224,10 +228,10 @@ public class ErrorFragment extends BaseBindingFragment<FragmentErrorBookBinding> |
| 224 | 228 | .multiSelect(true) //是否多选 |
| 225 | 229 | .isShowCamera(false).isVideoPicker(false) //是否选择视频 默认false |
| 226 | 230 | .isImagePicker(true).imagePickerType(ImagePickerEnum.PHOTO_PICKER) //选择器打开类型 |
| 227 | - .maxImageSelectable(9) //图片可选择数 | |
| 231 | + .maxImageSelectable(5) //图片可选择数 | |
| 228 | 232 | .maxHeight(1920) //图片最大高度 |
| 229 | 233 | .maxWidth(1920) //图片最大宽度 |
| 230 | - .maxImageSize(10) //图片最大大小Mb | |
| 234 | + .maxImageSize(3) //图片最大大小Mb | |
| 231 | 235 | .isCrop(false).pathList(new ArrayList<>()).pickerThemeColorRes(R.color.image_picker_white).pickerTitleColorRes(R.color.image_picker_text_black).cropThemeColorRes(R.color.image_picker_white).cropTitleColorRes(R.color.image_picker_text_black).pickerBackRes(R.mipmap.image_picker_back_black).pickerFolderRes(R.mipmap.image_picker_folder_black).build(); |
| 232 | 236 | ImagePickerOpen.getInstance().setImagePickerConfig(imagePickerConfig).pathList(new ArrayList<>()).open(getActivity()); |
| 233 | 237 | ... | ... |
app/src/main/res/layout/activity_error_list.xml
| ... | ... | @@ -19,15 +19,15 @@ |
| 19 | 19 | android:text="错题本" |
| 20 | 20 | android:textColor="#333333" |
| 21 | 21 | android:textSize="18sp" /> |
| 22 | - | |
| 22 | + | |
| 23 | 23 | <ImageView |
| 24 | - android:layout_width="30dp" | |
| 25 | 24 | android:id="@+id/iv_change" |
| 26 | - android:src="@mipmap/ic_change" | |
| 27 | - android:padding="5dp" | |
| 28 | - android:layout_toRightOf="@+id/tv_title" | |
| 25 | + android:layout_width="30dp" | |
| 26 | + android:layout_height="30dp" | |
| 29 | 27 | android:layout_centerVertical="true" |
| 30 | - android:layout_height="30dp"/> | |
| 28 | + android:layout_toRightOf="@+id/tv_title" | |
| 29 | + android:padding="5dp" | |
| 30 | + android:src="@mipmap/ic_change" /> | |
| 31 | 31 | |
| 32 | 32 | <CheckBox |
| 33 | 33 | android:id="@+id/checkbox" |
| ... | ... | @@ -175,6 +175,119 @@ |
| 175 | 175 | </LinearLayout> |
| 176 | 176 | |
| 177 | 177 | <LinearLayout |
| 178 | + android:id="@+id/ll_empty" | |
| 179 | + android:layout_width="wrap_content" | |
| 180 | + android:layout_height="wrap_content" | |
| 181 | + android:layout_above="@+id/rl_bottom" | |
| 182 | + android:layout_below="@+id/ll_filter" | |
| 183 | + android:layout_centerHorizontal="true" | |
| 184 | + android:layout_marginTop="150dp" | |
| 185 | + android:orientation="vertical" | |
| 186 | + android:visibility="gone"> | |
| 187 | + | |
| 188 | + <ImageView | |
| 189 | + android:layout_width="155dp" | |
| 190 | + android:layout_height="130dp" | |
| 191 | + android:src="@mipmap/ic_empty" /> | |
| 192 | + | |
| 193 | + <TextView | |
| 194 | + android:layout_width="wrap_content" | |
| 195 | + android:layout_height="wrap_content" | |
| 196 | + android:layout_gravity="center_horizontal" | |
| 197 | + android:text="暂无错题~" /> | |
| 198 | + </LinearLayout> | |
| 199 | + | |
| 200 | + <LinearLayout | |
| 201 | + android:id="@+id/ll_filter_grade" | |
| 202 | + android:layout_width="match_parent" | |
| 203 | + android:layout_height="wrap_content" | |
| 204 | + android:layout_below="@+id/ll_filter" | |
| 205 | + android:background="@drawable/bg_solid_white_10_bottom" | |
| 206 | + android:orientation="vertical" | |
| 207 | + android:visibility="gone"> | |
| 208 | + | |
| 209 | + <TextView | |
| 210 | + android:layout_width="wrap_content" | |
| 211 | + android:layout_height="wrap_content" | |
| 212 | + android:layout_marginLeft="15dp" | |
| 213 | + android:layout_marginTop="15dp" | |
| 214 | + android:text="年级" | |
| 215 | + android:textColor="@color/text_title" | |
| 216 | + android:textSize="14sp" | |
| 217 | + android:textStyle="bold" /> | |
| 218 | + | |
| 219 | + <androidx.recyclerview.widget.RecyclerView | |
| 220 | + android:id="@+id/recycle_grade" | |
| 221 | + android:layout_width="match_parent" | |
| 222 | + android:layout_height="wrap_content" | |
| 223 | + android:layout_marginLeft="15dp" | |
| 224 | + android:layout_marginTop="15dp" | |
| 225 | + android:visibility="visible" /> | |
| 226 | + | |
| 227 | + <TextView | |
| 228 | + android:layout_width="wrap_content" | |
| 229 | + android:layout_height="wrap_content" | |
| 230 | + android:layout_marginLeft="15dp" | |
| 231 | + android:layout_marginTop="15dp" | |
| 232 | + android:text="学期" | |
| 233 | + android:textColor="@color/text_title" | |
| 234 | + android:textSize="14sp" | |
| 235 | + android:textStyle="bold" /> | |
| 236 | + | |
| 237 | + <RadioGroup | |
| 238 | + android:id="@+id/group_grade" | |
| 239 | + android:layout_width="match_parent" | |
| 240 | + android:layout_height="30dp" | |
| 241 | + android:layout_marginLeft="15dp" | |
| 242 | + android:layout_marginTop="15dp" | |
| 243 | + android:layout_marginRight="15dp" | |
| 244 | + android:layout_marginBottom="15dp" | |
| 245 | + android:orientation="horizontal"> | |
| 246 | + | |
| 247 | + <RadioButton | |
| 248 | + android:layout_width="0dp" | |
| 249 | + android:layout_height="match_parent" | |
| 250 | + android:layout_marginRight="15dp" | |
| 251 | + android:layout_weight="1" | |
| 252 | + android:background="@drawable/filter_button_selector" | |
| 253 | + android:button="@null" | |
| 254 | + android:gravity="center" | |
| 255 | + android:text="全部" | |
| 256 | + android:textColor="@drawable/radio_text_selector" | |
| 257 | + android:textSize="14sp" /> | |
| 258 | + | |
| 259 | + <RadioButton | |
| 260 | + android:layout_width="0dp" | |
| 261 | + android:layout_height="match_parent" | |
| 262 | + android:layout_marginRight="15dp" | |
| 263 | + android:layout_weight="1" | |
| 264 | + android:background="@drawable/filter_button_selector" | |
| 265 | + android:button="@null" | |
| 266 | + android:gravity="center" | |
| 267 | + android:text="上学期" | |
| 268 | + android:textColor="@drawable/radio_text_selector" | |
| 269 | + android:textSize="14sp" /> | |
| 270 | + | |
| 271 | + <RadioButton | |
| 272 | + android:layout_width="0dp" | |
| 273 | + android:layout_height="match_parent" | |
| 274 | + android:layout_marginRight="15dp" | |
| 275 | + android:layout_weight="1" | |
| 276 | + android:background="@drawable/filter_button_selector" | |
| 277 | + android:button="@null" | |
| 278 | + android:gravity="center" | |
| 279 | + android:text="下学期" | |
| 280 | + android:textColor="@drawable/radio_text_selector" | |
| 281 | + android:textSize="14sp" /> | |
| 282 | + | |
| 283 | + <View | |
| 284 | + android:layout_width="0dp" | |
| 285 | + android:layout_height="match_parent" | |
| 286 | + android:layout_weight="1" /> | |
| 287 | + </RadioGroup> | |
| 288 | + </LinearLayout> | |
| 289 | + | |
| 290 | + <LinearLayout | |
| 178 | 291 | android:id="@+id/ll_filter_more" |
| 179 | 292 | android:layout_width="match_parent" |
| 180 | 293 | android:layout_height="wrap_content" |
| ... | ... | @@ -315,29 +428,6 @@ |
| 315 | 428 | </LinearLayout> |
| 316 | 429 | |
| 317 | 430 | |
| 318 | - <LinearLayout | |
| 319 | - android:id="@+id/ll_empty" | |
| 320 | - android:layout_width="wrap_content" | |
| 321 | - android:layout_height="wrap_content" | |
| 322 | - android:layout_above="@+id/rl_bottom" | |
| 323 | - android:layout_below="@+id/ll_filter" | |
| 324 | - android:layout_centerHorizontal="true" | |
| 325 | - android:layout_marginTop="150dp" | |
| 326 | - android:orientation="vertical" | |
| 327 | - android:visibility="gone"> | |
| 328 | - | |
| 329 | - <ImageView | |
| 330 | - android:layout_width="155dp" | |
| 331 | - android:layout_height="130dp" | |
| 332 | - android:src="@mipmap/ic_empty" /> | |
| 333 | - | |
| 334 | - <TextView | |
| 335 | - android:layout_width="wrap_content" | |
| 336 | - android:layout_height="wrap_content" | |
| 337 | - android:layout_gravity="center_horizontal" | |
| 338 | - android:text="暂无错题~" /> | |
| 339 | - </LinearLayout> | |
| 340 | - | |
| 341 | 431 | <RelativeLayout |
| 342 | 432 | android:id="@+id/rl_bottom" |
| 343 | 433 | android:layout_width="match_parent" | ... | ... |
app/src/main/res/layout/activity_image.xml
| ... | ... | @@ -154,7 +154,7 @@ |
| 154 | 154 | android:background="@drawable/bg_soild_blue_light_5" |
| 155 | 155 | android:enabled="false" |
| 156 | 156 | android:gravity="center" |
| 157 | - android:text="保留错题" | |
| 157 | + android:text="保存错题" | |
| 158 | 158 | android:textColor="@color/white" |
| 159 | 159 | android:textSize="18sp" /> |
| 160 | 160 | </RelativeLayout> | ... | ... |
app/src/main/res/layout/activity_main.xml
| ... | ... | @@ -56,7 +56,7 @@ |
| 56 | 56 | android:layout_height="wrap_content" |
| 57 | 57 | android:layout_marginTop="5dp" |
| 58 | 58 | android:text="首页" |
| 59 | - android:textColor="@drawable/select_t_1" | |
| 59 | + android:textColor="#333333" | |
| 60 | 60 | android:textSize="11dp" |
| 61 | 61 | app:layout_constraintLeft_toLeftOf="parent" |
| 62 | 62 | app:layout_constraintRight_toRightOf="parent" |
| ... | ... | @@ -90,7 +90,7 @@ |
| 90 | 90 | android:layout_height="wrap_content" |
| 91 | 91 | android:layout_marginTop="5dp" |
| 92 | 92 | android:text="我的" |
| 93 | - android:textColor="@drawable/select_t_1" | |
| 93 | + android:textColor="#333333" | |
| 94 | 94 | android:textSize="11dp" |
| 95 | 95 | app:layout_constraintLeft_toLeftOf="parent" |
| 96 | 96 | app:layout_constraintRight_toRightOf="parent" | ... | ... |
app/src/main/res/layout/dialog_add_error.xml
| ... | ... | @@ -62,7 +62,7 @@ |
| 62 | 62 | android:layout_centerVertical="true" |
| 63 | 63 | android:layout_marginLeft="20dp" |
| 64 | 64 | android:layout_marginTop="20dp" |
| 65 | - android:text="年级学期" | |
| 65 | + android:text="年级" | |
| 66 | 66 | android:textColor="@color/text_title" |
| 67 | 67 | android:textSize="15sp" |
| 68 | 68 | android:textStyle="bold" /> |
| ... | ... | @@ -77,7 +77,31 @@ |
| 77 | 77 | android:layout_marginTop="10dp" |
| 78 | 78 | android:layout_marginRight="20dp" |
| 79 | 79 | android:background="@drawable/selector_for_custom_spinner" |
| 80 | - android:entries="@array/filter_subject" | |
| 80 | + android:popupBackground="@drawable/shape_for_custom_spinner" | |
| 81 | + android:scrollbars="none" /> | |
| 82 | + | |
| 83 | + <TextView | |
| 84 | + android:layout_width="wrap_content" | |
| 85 | + android:layout_height="wrap_content" | |
| 86 | + android:layout_centerVertical="true" | |
| 87 | + android:layout_marginLeft="20dp" | |
| 88 | + android:layout_marginTop="20dp" | |
| 89 | + android:text="学期" | |
| 90 | + android:textColor="@color/text_title" | |
| 91 | + android:textSize="15sp" | |
| 92 | + android:textStyle="bold" /> | |
| 93 | + | |
| 94 | + <androidx.appcompat.widget.AppCompatSpinner | |
| 95 | + android:id="@+id/spinner_grade1" | |
| 96 | + style="@style/customSpinnerStyle" | |
| 97 | + android:layout_width="match_parent" | |
| 98 | + android:layout_height="40dp" | |
| 99 | + android:layout_centerHorizontal="true" | |
| 100 | + android:layout_marginLeft="20dp" | |
| 101 | + android:layout_marginTop="10dp" | |
| 102 | + android:layout_marginRight="20dp" | |
| 103 | + android:background="@drawable/selector_for_custom_spinner" | |
| 104 | + android:entries="@array/grade_array" | |
| 81 | 105 | android:popupBackground="@drawable/shape_for_custom_spinner" |
| 82 | 106 | android:scrollbars="none" /> |
| 83 | 107 | ... | ... |
app/src/main/res/layout/dialog_edit_error.xml
| ... | ... | @@ -34,7 +34,7 @@ |
| 34 | 34 | android:layout_centerVertical="true" |
| 35 | 35 | android:layout_marginLeft="20dp" |
| 36 | 36 | android:layout_marginTop="20dp" |
| 37 | - android:text="年级学期" | |
| 37 | + android:text="年级" | |
| 38 | 38 | android:textColor="@color/text_title" |
| 39 | 39 | android:textSize="15sp" |
| 40 | 40 | android:textStyle="bold" /> |
| ... | ... | @@ -59,6 +59,31 @@ |
| 59 | 59 | android:layout_centerVertical="true" |
| 60 | 60 | android:layout_marginLeft="20dp" |
| 61 | 61 | android:layout_marginTop="20dp" |
| 62 | + android:text="学期" | |
| 63 | + android:textColor="@color/text_title" | |
| 64 | + android:textSize="15sp" | |
| 65 | + android:textStyle="bold" /> | |
| 66 | + | |
| 67 | + <androidx.appcompat.widget.AppCompatSpinner | |
| 68 | + android:id="@+id/spinner_grade1" | |
| 69 | + style="@style/customSpinnerStyle" | |
| 70 | + android:layout_width="match_parent" | |
| 71 | + android:layout_height="40dp" | |
| 72 | + android:layout_centerHorizontal="true" | |
| 73 | + android:layout_marginLeft="20dp" | |
| 74 | + android:layout_marginTop="10dp" | |
| 75 | + android:layout_marginRight="20dp" | |
| 76 | + android:background="@drawable/selector_for_custom_spinner" | |
| 77 | + android:entries="@array/grade_array" | |
| 78 | + android:popupBackground="@drawable/shape_for_custom_spinner" | |
| 79 | + android:scrollbars="none" /> | |
| 80 | + | |
| 81 | + <TextView | |
| 82 | + android:layout_width="wrap_content" | |
| 83 | + android:layout_height="wrap_content" | |
| 84 | + android:layout_centerVertical="true" | |
| 85 | + android:layout_marginLeft="20dp" | |
| 86 | + android:layout_marginTop="20dp" | |
| 62 | 87 | android:text="科目" |
| 63 | 88 | android:textColor="@color/text_title" |
| 64 | 89 | android:textSize="15sp" | ... | ... |
app/src/main/res/mipmap-xxxhdpi/ic_chinese.png
app/src/main/res/values/strings.xml