Compare View
Commits (5)
Showing
51 changed files
Show diff stats
app/src/main/java/com/hjx/parent/ErrorBookActivity.java
... | ... | @@ -29,8 +29,6 @@ import com.hjq.permissions.XXPermissions; |
29 | 29 | import com.hjx.parent.adapter.ErrorAdapter; |
30 | 30 | import com.hjx.parent.bean.StudentBean; |
31 | 31 | import com.hjx.parent.databinding.ActivityErrorBookBinding; |
32 | -import com.prws.common.base.BasePresenter; | |
33 | -import com.prws.common.bean.ImageBean; | |
34 | 32 | import com.prws.common.bean.PageInfo; |
35 | 33 | import com.prws.common.bean.ResponseResult; |
36 | 34 | import com.prws.common.bean.TopicBean; |
... | ... | @@ -40,7 +38,6 @@ import com.prws.common.utils.CommonUtil; |
40 | 38 | import com.prws.common.utils.SharedPreferencesUtil; |
41 | 39 | import com.prws.common.utils.dialog.MyButtomDialog; |
42 | 40 | import com.zhangteng.imagepicker.bean.ImageInfo; |
43 | -import com.zhangteng.imagepicker.callback.HandlerCallBack; | |
44 | 41 | import com.zhangteng.imagepicker.config.ImagePickerConfig; |
45 | 42 | import com.zhangteng.imagepicker.config.ImagePickerEnum; |
46 | 43 | import com.zhangteng.imagepicker.config.ImagePickerOpen; |
... | ... | @@ -127,19 +124,19 @@ public class ErrorBookActivity extends BaseActivity<ActivityErrorBookBinding> { |
127 | 124 | item.setText(R.id.tv_subject, getResources().getStringArray(R.array.filter_subject)[item.getAdapterPosition()]); |
128 | 125 | switch (item.getAdapterPosition()) { |
129 | 126 | case 0: |
130 | - item.setImageResource(R.id.iv_subject, R.mipmap.ic_chinese); | |
127 | + item.setImageResource(R.id.iv_subject, R.drawable.png_ic_chinese); | |
131 | 128 | break; |
132 | 129 | case 1: |
133 | - item.setImageResource(R.id.iv_subject, R.mipmap.ic_math); | |
130 | + item.setImageResource(R.id.iv_subject, R.drawable.png_ic_math); | |
134 | 131 | break; |
135 | 132 | case 2: |
136 | - item.setImageResource(R.id.iv_subject, R.mipmap.ic_english); | |
133 | + item.setImageResource(R.id.iv_subject, R.drawable.png_ic_english); | |
137 | 134 | break; |
138 | 135 | case 3: |
139 | - item.setImageResource(R.id.iv_subject, R.mipmap.ic_physics); | |
136 | + item.setImageResource(R.id.iv_subject, R.drawable.png_ic_physics); | |
140 | 137 | break; |
141 | 138 | case 4: |
142 | - item.setImageResource(R.id.iv_subject, R.mipmap.ic_chemistry); | |
139 | + item.setImageResource(R.id.iv_subject, R.drawable.png_ic_chemistry); | |
143 | 140 | break; |
144 | 141 | } |
145 | 142 | ViewGroup.LayoutParams layoutParams = item.getView(R.id.rl_subject).getLayoutParams(); | ... | ... |
app/src/main/java/com/hjx/parent/ImageActivity.java
... | ... | @@ -63,6 +63,10 @@ public class ImageActivity extends BaseRxActivity<ActivityImageBinding> implemen |
63 | 63 | binding.tvSave.setText(type == 0 ? "保存错题" : "录入题目"); |
64 | 64 | |
65 | 65 | images = getIntent().getStringArrayListExtra("images"); |
66 | + if (images == null || images.size() <= 1) { | |
67 | + binding.rlPrevious.setVisibility(View.GONE); | |
68 | + binding.rlNext.setVisibility(View.GONE); | |
69 | + } | |
66 | 70 | for (String s : images) { |
67 | 71 | String filepath = context.getExternalFilesDir("images").getPath() + "/" + System.currentTimeMillis() + CommonUtil.getStr() + ".jpg"; |
68 | 72 | ImageBean imageBean = new ImageBean(); |
... | ... | @@ -382,6 +386,10 @@ public class ImageActivity extends BaseRxActivity<ActivityImageBinding> implemen |
382 | 386 | if (resultCode == 1002) { |
383 | 387 | if (list.size() > 1) { |
384 | 388 | list.remove(binding.viewPager.getCurrentItem()); |
389 | + if (list.size() <= 1) { | |
390 | + binding.rlPrevious.setVisibility(View.GONE); | |
391 | + binding.rlNext.setVisibility(View.GONE); | |
392 | + } | |
385 | 393 | imageAdapter.notifyItemRemoved(binding.viewPager.getCurrentItem()); |
386 | 394 | binding.tvTitle.setText((binding.viewPager.getCurrentItem() + 1) + "/" + list.size()); |
387 | 395 | refreshNum(); | ... | ... |
app/src/main/java/com/hjx/parent/StuHomeworkActivity.java
... | ... | @@ -36,7 +36,6 @@ import com.trello.rxlifecycle2.android.RxLifecycleAndroid; |
36 | 36 | import java.text.SimpleDateFormat; |
37 | 37 | import java.util.ArrayList; |
38 | 38 | import java.util.Calendar; |
39 | -import java.util.Collections; | |
40 | 39 | import java.util.Date; |
41 | 40 | import java.util.HashMap; |
42 | 41 | import java.util.List; |
... | ... | @@ -505,20 +504,20 @@ public class StuHomeworkActivity extends BaseRxActivity<ActivityStudentHomeworkB |
505 | 504 | int subjectImg; |
506 | 505 | switch (data.homeworkSubject) { |
507 | 506 | case "语文": |
508 | - subjectImg = R.drawable.ic_chinese; | |
507 | + subjectImg = R.drawable.png_cover_chinese; | |
509 | 508 | break; |
510 | 509 | case "英语": |
511 | - subjectImg = R.drawable.ic_english; | |
510 | + subjectImg = R.drawable.png_cover_english; | |
512 | 511 | break; |
513 | 512 | case "物理": |
514 | - subjectImg = R.drawable.ic_physics; | |
513 | + subjectImg = R.drawable.png_cover_physics; | |
515 | 514 | break; |
516 | 515 | case "化学": |
517 | - subjectImg = R.drawable.ic_chemistry; | |
516 | + subjectImg = R.drawable.png_cover_chemistry; | |
518 | 517 | break; |
519 | 518 | case "数学": |
520 | 519 | default: |
521 | - subjectImg = R.drawable.ic_math; | |
520 | + subjectImg = R.drawable.png_cover_math; | |
522 | 521 | } |
523 | 522 | holder.setImageResource(R.id.ivSubject, subjectImg); |
524 | 523 | Date endDate = new Date(data.endTime.getTime() - 1000); | ... | ... |
app/src/main/java/com/hjx/parent/adapter/HomeworkAdapter.java
... | ... | @@ -23,20 +23,20 @@ public class HomeworkAdapter extends BaseQuickAdapter<HomeworkList, BaseViewHold |
23 | 23 | int subjectImg; |
24 | 24 | switch (homework.getSubject()) { |
25 | 25 | case "语文": |
26 | - subjectImg = R.drawable.ic_chinese; | |
26 | + subjectImg = R.drawable.png_cover_chinese; | |
27 | 27 | break; |
28 | 28 | case "英语": |
29 | - subjectImg = R.drawable.ic_english; | |
29 | + subjectImg = R.drawable.png_cover_english; | |
30 | 30 | break; |
31 | 31 | case "物理": |
32 | - subjectImg = R.drawable.ic_physics; | |
32 | + subjectImg = R.drawable.png_cover_physics; | |
33 | 33 | break; |
34 | 34 | case "化学": |
35 | - subjectImg = R.drawable.ic_chemistry; | |
35 | + subjectImg = R.drawable.png_cover_chemistry; | |
36 | 36 | break; |
37 | 37 | case "数学": |
38 | 38 | default: |
39 | - subjectImg = R.drawable.ic_math; | |
39 | + subjectImg = R.drawable.png_cover_math; | |
40 | 40 | } |
41 | 41 | helper.setImageResource(R.id.ivSubject, subjectImg); |
42 | 42 | ... | ... |
app/src/main/java/com/hjx/parent/adapter/HomeworkListAdapter.java
1 | 1 | package com.hjx.parent.adapter; |
2 | 2 | |
3 | -import android.content.Intent; | |
4 | 3 | import android.view.View; |
5 | 4 | import android.widget.TextView; |
6 | 5 | |
... | ... | @@ -8,10 +7,7 @@ import androidx.annotation.NonNull; |
8 | 7 | |
9 | 8 | import com.chad.library.adapter.base.BaseQuickAdapter; |
10 | 9 | import com.chad.library.adapter.base.BaseViewHolder; |
11 | -import com.google.gson.Gson; | |
12 | -import com.hjx.parent.HomeworkDetailActivity; | |
13 | 10 | import com.hjx.parent.R; |
14 | -import com.hjx.parent.function.Function0; | |
15 | 11 | import com.hjx.parent.function.Function1; |
16 | 12 | import com.prws.common.bean.homework.HomeworkList; |
17 | 13 | |
... | ... | @@ -32,20 +28,20 @@ public class HomeworkListAdapter extends BaseQuickAdapter<HomeworkList, BaseView |
32 | 28 | int subjectImg; |
33 | 29 | switch (homework.getSubject()) { |
34 | 30 | case "语文": |
35 | - subjectImg = R.drawable.ic_chinese; | |
31 | + subjectImg = R.drawable.png_cover_chinese; | |
36 | 32 | break; |
37 | 33 | case "英语": |
38 | - subjectImg = R.drawable.ic_english; | |
34 | + subjectImg = R.drawable.png_cover_english; | |
39 | 35 | break; |
40 | 36 | case "物理": |
41 | - subjectImg = R.drawable.ic_physics; | |
37 | + subjectImg = R.drawable.png_cover_physics; | |
42 | 38 | break; |
43 | 39 | case "化学": |
44 | - subjectImg = R.drawable.ic_chemistry; | |
40 | + subjectImg = R.drawable.png_cover_chemistry; | |
45 | 41 | break; |
46 | 42 | case "数学": |
47 | 43 | default: |
48 | - subjectImg = R.drawable.ic_math; | |
44 | + subjectImg = R.drawable.png_cover_math; | |
49 | 45 | } |
50 | 46 | holder.setImageResource(R.id.ivSubject, subjectImg); |
51 | 47 | ... | ... |
app/src/main/java/com/hjx/parent/fragment/ErrorFragment.java
... | ... | @@ -14,6 +14,7 @@ import android.util.Log; |
14 | 14 | import android.view.LayoutInflater; |
15 | 15 | import android.view.View; |
16 | 16 | import android.view.ViewGroup; |
17 | +import android.widget.TextView; | |
17 | 18 | import android.widget.Toast; |
18 | 19 | |
19 | 20 | import androidx.annotation.NonNull; |
... | ... | @@ -66,7 +67,6 @@ import java.io.File; |
66 | 67 | import java.text.SimpleDateFormat; |
67 | 68 | import java.util.ArrayList; |
68 | 69 | import java.util.Arrays; |
69 | -import java.util.Collections; | |
70 | 70 | import java.util.HashMap; |
71 | 71 | import java.util.List; |
72 | 72 | import java.util.Locale; |
... | ... | @@ -123,33 +123,37 @@ public class ErrorFragment extends BaseRxFragment<FragmentErrorBookBinding> { |
123 | 123 | |
124 | 124 | @Override |
125 | 125 | protected void convert(@NonNull BaseViewHolder item, Object o) { |
126 | - item.setText(R.id.tv_subject, getResources().getStringArray(R.array.filter_subject)[item.getAdapterPosition()]); | |
127 | - switch (item.getAdapterPosition()) { | |
128 | - case 0: | |
129 | - item.setImageResource(R.id.iv_subject, R.mipmap.ic_chinese); | |
126 | + int position = item.getBindingAdapterPosition(); | |
127 | + String name = getResources().getStringArray(R.array.filter_subject)[position]; | |
128 | + item.setText(R.id.tv_subject, name); | |
129 | + switch (name) { | |
130 | + case "语文": | |
131 | + item.setImageResource(R.id.iv_subject, R.drawable.state_ic_chinese); | |
130 | 132 | break; |
131 | - case 1: | |
132 | - item.setImageResource(R.id.iv_subject, R.mipmap.ic_math); | |
133 | + case "数学": | |
134 | + item.setImageResource(R.id.iv_subject, R.drawable.state_ic_math); | |
133 | 135 | break; |
134 | - case 2: | |
135 | - item.setImageResource(R.id.iv_subject, R.mipmap.ic_english); | |
136 | + case "英语": | |
137 | + item.setImageResource(R.id.iv_subject, R.drawable.state_ic_english); | |
136 | 138 | break; |
137 | - case 3: | |
138 | - item.setImageResource(R.id.iv_subject, R.mipmap.ic_physics); | |
139 | + case "物理": | |
140 | + item.setImageResource(R.id.iv_subject, R.drawable.state_ic_physics); | |
139 | 141 | break; |
140 | - case 4: | |
141 | - item.setImageResource(R.id.iv_subject, R.mipmap.ic_chemistry); | |
142 | + case "化学": | |
143 | + item.setImageResource(R.id.iv_subject, R.drawable.state_ic_chemistry); | |
142 | 144 | break; |
143 | 145 | } |
146 | + item.itemView.setActivated(subject == position); | |
144 | 147 | ViewGroup.LayoutParams layoutParams = item.getView(R.id.rl_subject).getLayoutParams(); |
145 | - layoutParams.width = (CommonUtil.getScreenWidth(getContext()) - CommonUtil.dpToPx(getContext(), 30)) / 4; | |
148 | + layoutParams.width = (CommonUtil.getScreenWidth(mContext) - CommonUtil.dpToPx(mContext, 30)) / 4; | |
146 | 149 | item.getView(R.id.rl_subject).setLayoutParams(layoutParams); |
147 | - item.getConvertView().setOnClickListener(v -> { | |
148 | - if (subject != item.getAdapterPosition()) { | |
149 | - subject = item.getAdapterPosition(); | |
150 | + item.itemView.setOnClickListener(v -> { | |
151 | + if (subject != position) { | |
152 | + subject = position; | |
150 | 153 | String subStr = getResources().getStringArray(R.array.filter_subject)[subject]; |
151 | 154 | getError(subStr); |
152 | 155 | getHomework(subStr); |
156 | + notifyDataSetChanged(); | |
153 | 157 | } |
154 | 158 | }); |
155 | 159 | } | ... | ... |
app/src/main/res/drawable/png_cover_chemistry.png
74.3 KB
app/src/main/res/drawable/png_cover_chinese.png
73.7 KB
app/src/main/res/drawable/png_cover_english.png
79.7 KB
app/src/main/res/drawable/png_cover_math.png
73 KB
app/src/main/res/drawable/png_cover_physics.png
71 KB
app/src/main/res/drawable/png_entry_error.png
app/src/main/res/drawable/png_entry_homework.png
app/src/main/res/drawable/png_ic_chemistry.png
17.2 KB
app/src/main/res/drawable/png_ic_chemistry_off.png
12.3 KB
app/src/main/res/drawable/png_ic_chinese.png
23.2 KB
app/src/main/res/drawable/png_ic_chinese_off.png
11.1 KB
app/src/main/res/drawable/png_ic_english.png
19 KB
app/src/main/res/drawable/png_ic_english_off.png
13.9 KB
app/src/main/res/drawable/png_ic_math.png
17.7 KB
app/src/main/res/drawable/png_ic_math_off.png
10.8 KB
app/src/main/res/drawable/png_ic_physics.png
17.1 KB
app/src/main/res/drawable/png_ic_physics_off.png
11.8 KB
app/src/main/res/drawable/state_ic_chemistry.xml
... | ... | @@ -0,0 +1,5 @@ |
1 | +<?xml version="1.0" encoding="utf-8"?> | |
2 | +<selector xmlns:android="http://schemas.android.com/apk/res/android"> | |
3 | + <item android:drawable="@drawable/png_ic_chemistry" android:state_activated="true"/> | |
4 | + <item android:drawable="@drawable/png_ic_chemistry_off"/> | |
5 | +</selector> | |
0 | 6 | \ No newline at end of file | ... | ... |
app/src/main/res/drawable/state_ic_chinese.xml
... | ... | @@ -0,0 +1,5 @@ |
1 | +<?xml version="1.0" encoding="utf-8"?> | |
2 | +<selector xmlns:android="http://schemas.android.com/apk/res/android"> | |
3 | + <item android:drawable="@drawable/png_ic_chinese" android:state_activated="true"/> | |
4 | + <item android:drawable="@drawable/png_ic_chinese_off" /> | |
5 | +</selector> | |
0 | 6 | \ No newline at end of file | ... | ... |
app/src/main/res/drawable/state_ic_english.xml
... | ... | @@ -0,0 +1,5 @@ |
1 | +<?xml version="1.0" encoding="utf-8"?> | |
2 | +<selector xmlns:android="http://schemas.android.com/apk/res/android"> | |
3 | + <item android:drawable="@drawable/png_ic_english" android:state_activated="true"/> | |
4 | + <item android:drawable="@drawable/png_ic_english_off"/> | |
5 | +</selector> | |
0 | 6 | \ No newline at end of file | ... | ... |
app/src/main/res/drawable/state_ic_math.xml
... | ... | @@ -0,0 +1,7 @@ |
1 | +<?xml version="1.0" encoding="utf-8"?> | |
2 | +<selector xmlns:android="http://schemas.android.com/apk/res/android"> | |
3 | + | |
4 | + <item android:drawable="@drawable/png_ic_math" android:state_activated="true"/> | |
5 | + <item android:drawable="@drawable/png_ic_math_off"/> | |
6 | + | |
7 | +</selector> | |
0 | 8 | \ No newline at end of file | ... | ... |
app/src/main/res/drawable/state_ic_physics.xml
... | ... | @@ -0,0 +1,5 @@ |
1 | +<?xml version="1.0" encoding="utf-8"?> | |
2 | +<selector xmlns:android="http://schemas.android.com/apk/res/android"> | |
3 | + <item android:drawable="@drawable/png_ic_physics" android:state_activated="true"/> | |
4 | + <item android:drawable="@drawable/png_ic_physics_off"/> | |
5 | +</selector> | |
0 | 6 | \ No newline at end of file | ... | ... |
app/src/main/res/layout/fragment_error_book.xml
... | ... | @@ -60,16 +60,6 @@ |
60 | 60 | android:adjustViewBounds="true" |
61 | 61 | android:layout_width="match_parent" |
62 | 62 | android:layout_height="wrap_content"/> |
63 | - | |
64 | - <TextView | |
65 | - android:layout_width="wrap_content" | |
66 | - android:layout_height="wrap_content" | |
67 | - android:layout_gravity="center_horizontal|bottom" | |
68 | - android:layout_marginBottom="38dp" | |
69 | - android:text="录入错题" | |
70 | - android:textColor="#EDF6FF" | |
71 | - android:textSize="20sp" | |
72 | - android:textStyle="bold" /> | |
73 | 63 | </FrameLayout> |
74 | 64 | |
75 | 65 | <FrameLayout |
... | ... | @@ -83,15 +73,6 @@ |
83 | 73 | android:layout_width="match_parent" |
84 | 74 | android:layout_height="wrap_content"/> |
85 | 75 | |
86 | - <TextView | |
87 | - android:layout_width="wrap_content" | |
88 | - android:layout_height="wrap_content" | |
89 | - android:layout_gravity="center_horizontal|bottom" | |
90 | - android:layout_marginBottom="38dp" | |
91 | - android:text="录入作业" | |
92 | - android:textColor="#EDF6FF" | |
93 | - android:textSize="20sp" | |
94 | - android:textStyle="bold" /> | |
95 | 76 | </FrameLayout> |
96 | 77 | </LinearLayout> |
97 | 78 | |
... | ... | @@ -116,86 +97,97 @@ |
116 | 97 | app:tabTextAppearance="@style/tab_home_item" |
117 | 98 | app:tabRippleColor="@color/transparent" |
118 | 99 | android:background="@drawable/bg_tab_home" |
119 | - android:paddingBottom="4dp" | |
120 | - android:layout_width="match_parent" | |
121 | - android:layout_height="36dp"/> | |
122 | - | |
123 | - <androidx.recyclerview.widget.RecyclerView | |
124 | - android:id="@+id/rvSubject" | |
125 | - android:orientation="horizontal" | |
126 | - app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" | |
127 | - android:layout_marginTop="15dp" | |
100 | + app:tabIndicatorHeight="2dp" | |
101 | + android:paddingVertical="8dp" | |
128 | 102 | android:layout_width="match_parent" |
129 | - android:layout_height="wrap_content" /> | |
103 | + android:layout_height="48dp"/> | |
130 | 104 | |
131 | - <LinearLayout | |
132 | - android:layout_marginTop="16dp" | |
133 | - android:layout_marginHorizontal="10dp" | |
105 | + <androidx.core.widget.NestedScrollView | |
134 | 106 | android:layout_width="match_parent" |
135 | - android:layout_height="25dp"> | |
136 | - <TextView | |
137 | - android:id="@+id/tvListTitle" | |
138 | - android:layout_width="wrap_content" | |
139 | - android:layout_height="wrap_content" | |
140 | - android:text="最近错题" | |
141 | - android:textColor="#333333" | |
142 | - android:textSize="16sp" | |
143 | - android:textStyle="bold" /> | |
144 | - | |
145 | - <Space style="@style/empty_space"/> | |
146 | - | |
107 | + android:layout_height="match_parent"> | |
147 | 108 | <LinearLayout |
148 | - android:id="@+id/ll_all" | |
149 | - android:layout_width="wrap_content" | |
150 | - android:layout_height="wrap_content" | |
151 | - android:layout_gravity="center_vertical"> | |
109 | + android:orientation="vertical" | |
110 | + android:layout_width="match_parent" | |
111 | + android:layout_height="wrap_content"> | |
112 | + | |
113 | + <androidx.recyclerview.widget.RecyclerView | |
114 | + android:id="@+id/rvSubject" | |
115 | + android:orientation="horizontal" | |
116 | + app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" | |
117 | + android:layout_marginTop="15dp" | |
118 | + android:layout_width="match_parent" | |
119 | + android:layout_height="wrap_content" /> | |
120 | + | |
121 | + <LinearLayout | |
122 | + android:layout_marginTop="16dp" | |
123 | + android:layout_marginHorizontal="10dp" | |
124 | + android:layout_width="match_parent" | |
125 | + android:layout_height="25dp"> | |
126 | + <TextView | |
127 | + android:id="@+id/tvListTitle" | |
128 | + android:layout_width="wrap_content" | |
129 | + android:layout_height="wrap_content" | |
130 | + android:text="最近错题" | |
131 | + android:textColor="#333333" | |
132 | + android:textSize="16sp" | |
133 | + android:textStyle="bold" /> | |
134 | + | |
135 | + <Space style="@style/empty_space"/> | |
136 | + | |
137 | + <LinearLayout | |
138 | + android:id="@+id/ll_all" | |
139 | + android:layout_width="wrap_content" | |
140 | + android:layout_height="wrap_content" | |
141 | + android:layout_gravity="center_vertical"> | |
142 | + | |
143 | + <TextView | |
144 | + android:layout_width="wrap_content" | |
145 | + android:layout_height="wrap_content" | |
146 | + android:layout_gravity="center_vertical" | |
147 | + android:text="查看全部" | |
148 | + android:textColor="#666666" | |
149 | + android:textSize="12sp" /> | |
150 | + | |
151 | + <ImageView | |
152 | + android:layout_width="9dp" | |
153 | + android:layout_height="10dp" | |
154 | + android:layout_gravity="center_vertical" | |
155 | + android:layout_marginStart="5dp" | |
156 | + android:src="@mipmap/ic_arrow_right" /> | |
157 | + </LinearLayout> | |
158 | + </LinearLayout> | |
159 | + | |
160 | + <androidx.recyclerview.widget.RecyclerView | |
161 | + android:id="@+id/rvMain" | |
162 | + android:orientation="vertical" | |
163 | + app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" | |
164 | + android:layout_width="match_parent" | |
165 | + android:layout_height="wrap_content" | |
166 | + android:layout_marginTop="15dp" /> | |
152 | 167 | |
153 | - <TextView | |
168 | + <LinearLayout | |
169 | + android:id="@+id/ll_empty" | |
154 | 170 | android:layout_width="wrap_content" |
155 | 171 | android:layout_height="wrap_content" |
156 | - android:layout_gravity="center_vertical" | |
157 | - android:text="查看全部" | |
158 | - android:textColor="#666666" | |
159 | - android:textSize="12sp" /> | |
160 | - | |
161 | - <ImageView | |
162 | - android:layout_width="9dp" | |
163 | - android:layout_height="10dp" | |
164 | - android:layout_gravity="center_vertical" | |
165 | - android:layout_marginStart="5dp" | |
166 | - android:src="@mipmap/ic_arrow_right" /> | |
167 | - </LinearLayout> | |
168 | - </LinearLayout> | |
169 | - | |
170 | - <androidx.recyclerview.widget.RecyclerView | |
171 | - android:id="@+id/rvMain" | |
172 | - android:orientation="vertical" | |
173 | - app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" | |
174 | - android:layout_width="match_parent" | |
175 | - android:layout_height="match_parent" | |
176 | - android:layout_marginTop="15dp" /> | |
177 | - | |
178 | - <LinearLayout | |
179 | - android:id="@+id/ll_empty" | |
180 | - android:layout_width="wrap_content" | |
181 | - android:layout_height="wrap_content" | |
182 | - android:layout_gravity="center_horizontal" | |
183 | - android:layout_marginTop="30dp" | |
184 | - android:orientation="vertical" | |
185 | - android:visibility="gone"> | |
186 | - | |
187 | - <ImageView | |
188 | - android:layout_width="155dp" | |
189 | - android:layout_height="130dp" | |
190 | - android:src="@mipmap/ic_empty" /> | |
191 | - | |
192 | - <TextView | |
193 | - android:id="@+id/tvEmpty" | |
194 | - android:layout_width="wrap_content" | |
195 | - android:layout_height="wrap_content" | |
196 | - android:layout_gravity="center_horizontal" | |
197 | - android:text="暂无错题~" /> | |
198 | - </LinearLayout> | |
172 | + android:layout_gravity="center_horizontal" | |
173 | + android:layout_marginTop="30dp" | |
174 | + android:orientation="vertical" | |
175 | + android:visibility="gone"> | |
176 | + | |
177 | + <ImageView | |
178 | + android:layout_width="155dp" | |
179 | + android:layout_height="130dp" | |
180 | + android:src="@mipmap/ic_empty" /> | |
181 | + | |
182 | + <TextView | |
183 | + android:id="@+id/tvEmpty" | |
184 | + android:layout_width="wrap_content" | |
185 | + android:layout_height="wrap_content" | |
186 | + android:layout_gravity="center_horizontal" | |
187 | + android:text="暂无错题~" /> | |
188 | + </LinearLayout> | |
199 | 189 | |
190 | + </LinearLayout> | |
191 | + </androidx.core.widget.NestedScrollView> | |
200 | 192 | </LinearLayout> |
201 | 193 | </LinearLayout> |
202 | 194 | \ No newline at end of file | ... | ... |
app/src/main/res/layout/item_homework.xml
... | ... | @@ -29,7 +29,7 @@ |
29 | 29 | android:layout_height="75dp"> |
30 | 30 | <ImageView |
31 | 31 | android:id="@+id/ivSubject" |
32 | - tools:src="@drawable/ic_math" | |
32 | + tools:src="@drawable/png_cover_math" | |
33 | 33 | android:layout_marginStart="10dp" |
34 | 34 | android:layout_width="44dp" |
35 | 35 | android:layout_height="56dp" | ... | ... |
app/src/main/res/layout/item_homework_list.xml
... | ... | @@ -33,7 +33,7 @@ |
33 | 33 | android:layout_height="match_parent"> |
34 | 34 | <ImageView |
35 | 35 | android:id="@+id/ivSubject" |
36 | - tools:src="@drawable/ic_math" | |
36 | + tools:src="@drawable/png_cover_math" | |
37 | 37 | android:layout_marginStart="10dp" |
38 | 38 | android:layout_width="50dp" |
39 | 39 | android:layout_height="64dp" | ... | ... |