Commit 7eb90a5ec115687f5f075028b3dc19d1ec54bda7
1 parent
b49795b72f
Exists in
master
作业反馈
Showing
13 changed files
with
260 additions
and
2 deletions
Show diff stats
app/build.gradle
1 | apply plugin: 'com.android.application' | 1 | apply plugin: 'com.android.application' |
2 | apply from: '../config.gradle' | 2 | apply from: '../config.gradle' |
3 | 3 | ||
4 | 4 | ||
5 | def androidId = rootProject.ext.androidId | 5 | def androidId = rootProject.ext.androidId |
6 | def support = rootProject.ext.dependencies | 6 | def support = rootProject.ext.dependencies |
7 | def url = rootProject.ext.url | 7 | def url = rootProject.ext.url |
8 | 8 | ||
9 | 9 | ||
10 | android { | 10 | android { |
11 | signingConfigs { | 11 | signingConfigs { |
12 | 12 | ||
13 | config { | 13 | config { |
14 | keyAlias 'alias' | 14 | keyAlias 'alias' |
15 | keyPassword '123456' | 15 | keyPassword '123456' |
16 | storeFile file('key.jks') | 16 | storeFile file('key.jks') |
17 | storePassword '123456' | 17 | storePassword '123456' |
18 | } | 18 | } |
19 | debug { | 19 | debug { |
20 | } | 20 | } |
21 | } | 21 | } |
22 | compileSdk 32 | 22 | compileSdk 32 |
23 | 23 | ||
24 | defaultConfig { | 24 | defaultConfig { |
25 | applicationId "com.hjx.parent" | 25 | applicationId "com.hjx.parent" |
26 | minSdk 24 | 26 | minSdk 24 |
27 | targetSdk 32 | 27 | targetSdk 32 |
28 | versionCode 1005 | 28 | versionCode 1005 |
29 | versionName "1.0.0.5" | 29 | versionName "1.0.0.5" |
30 | 30 | ||
31 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" | 31 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" |
32 | } | 32 | } |
33 | 33 | ||
34 | android.applicationVariants.all { | 34 | android.applicationVariants.all { |
35 | variant -> | 35 | variant -> |
36 | variant.outputs.all { | 36 | variant.outputs.all { |
37 | //在这里修改apk文件名 | 37 | //在这里修改apk文件名 |
38 | outputFileName = "parent-${variant.name}-v${variant.versionName}.apk" | 38 | outputFileName = "parent-${variant.name}-v${variant.versionName}.apk" |
39 | } | 39 | } |
40 | } | 40 | } |
41 | buildTypes { | 41 | buildTypes { |
42 | debug { | 42 | debug { |
43 | debuggable true | 43 | debuggable true |
44 | minifyEnabled false | 44 | minifyEnabled false |
45 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' | 45 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' |
46 | signingConfig signingConfigs.config | 46 | signingConfig signingConfigs.config |
47 | } | 47 | } |
48 | release { | 48 | release { |
49 | debuggable true | 49 | debuggable true |
50 | minifyEnabled false | 50 | minifyEnabled false |
51 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' | 51 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' |
52 | signingConfig signingConfigs.config | 52 | signingConfig signingConfigs.config |
53 | } | 53 | } |
54 | } | 54 | } |
55 | lintOptions { | 55 | lintOptions { |
56 | checkReleaseBuilds false | 56 | checkReleaseBuilds false |
57 | abortOnError false | 57 | abortOnError false |
58 | } | 58 | } |
59 | buildFeatures { | 59 | buildFeatures { |
60 | viewBinding true | 60 | viewBinding true |
61 | dataBinding true | 61 | dataBinding true |
62 | } | 62 | } |
63 | compileOptions { | 63 | compileOptions { |
64 | sourceCompatibility JavaVersion.VERSION_1_8 | 64 | sourceCompatibility JavaVersion.VERSION_1_8 |
65 | targetCompatibility JavaVersion.VERSION_1_8 | 65 | targetCompatibility JavaVersion.VERSION_1_8 |
66 | } | 66 | } |
67 | } | 67 | } |
68 | 68 | ||
69 | dependencies { | 69 | dependencies { |
70 | support.each { k, v -> implementation v } | 70 | support.each { k, v -> implementation v } |
71 | api project(path: ':libs:common') | 71 | api project(path: ':libs:common') |
72 | implementation 'androidx.appcompat:appcompat:1.5.1' | 72 | implementation 'androidx.appcompat:appcompat:1.5.1' |
73 | implementation 'com.google.android.material:material:1.6.1' | 73 | implementation 'com.google.android.material:material:1.6.1' |
74 | implementation 'androidx.constraintlayout:constraintlayout:2.1.4' | 74 | implementation 'androidx.constraintlayout:constraintlayout:2.1.4' |
75 | implementation 'com.github.CymChad:BaseRecyclerViewAdapterHelper:2.9.50' | 75 | implementation 'com.github.CymChad:BaseRecyclerViewAdapterHelper:2.9.50' |
76 | implementation 'com.github.ForgetAll:LoadingDialog:1.1.2' | 76 | implementation 'com.github.ForgetAll:LoadingDialog:1.1.2' |
77 | implementation 'com.github.DL-ZhangTeng:ImagePicker:1.5.0' | 77 | implementation 'com.github.DL-ZhangTeng:ImagePicker:1.5.0' |
78 | //使用的三方 | 78 | //使用的三方 |
79 | implementation 'com.yalantis:ucrop:2.2.0' | 79 | implementation 'com.yalantis:ucrop:2.2.0' |
80 | implementation 'com.github.DL-ZhangTeng:RequestPermission:1.3.0' | 80 | implementation 'com.github.DL-ZhangTeng:RequestPermission:1.3.0' |
81 | implementation 'com.github.DL-ZhangTeng:Utils:2.2.0' | 81 | implementation 'com.github.DL-ZhangTeng:Utils:2.2.0' |
82 | 82 | ||
83 | // rx | 83 | // rx |
84 | implementation("com.trello.rxlifecycle2:rxlifecycle:2.2.2") | 84 | implementation("com.trello.rxlifecycle2:rxlifecycle:2.2.2") |
85 | implementation("com.trello.rxlifecycle2:rxlifecycle-android:2.2.2") | 85 | implementation("com.trello.rxlifecycle2:rxlifecycle-android:2.2.2") |
86 | 86 | ||
87 | implementation("com.github.PhilJay:MPAndroidChart:v3.1.0") | 87 | implementation("com.github.PhilJay:MPAndroidChart:v3.1.0") |
88 | implementation("com.contrarywind:Android-PickerView:4.1.9") | 88 | implementation("com.contrarywind:Android-PickerView:4.1.9") |
89 | |||
90 | implementation 'com.google.android:flexbox:1.0.0' | ||
89 | } | 91 | } |
app/src/main/java/com/hjx/parent/HomeworkFeedbackActivity.java
1 | package com.hjx.parent; | 1 | package com.hjx.parent; |
2 | 2 | ||
3 | import android.os.Bundle; | 3 | import android.os.Bundle; |
4 | import android.view.View; | ||
5 | import android.widget.ImageView; | ||
6 | import android.widget.RadioButton; | ||
4 | 7 | ||
8 | import androidx.annotation.NonNull; | ||
9 | import androidx.annotation.Nullable; | ||
10 | |||
11 | import com.bumptech.glide.Glide; | ||
12 | import com.chad.library.adapter.base.BaseQuickAdapter; | ||
13 | import com.chad.library.adapter.base.BaseViewHolder; | ||
14 | import com.google.android.flexbox.FlexboxLayoutManager; | ||
5 | import com.hjx.parent.databinding.ActivityHomeworkFeedbackBinding; | 15 | import com.hjx.parent.databinding.ActivityHomeworkFeedbackBinding; |
6 | import com.hjx.parent.rx.BaseRxActivity; | 16 | import com.hjx.parent.rx.BaseRxActivity; |
7 | import com.prws.common.bean.Student; | 17 | import com.prws.common.bean.Student; |
8 | import com.prws.common.bean.homework.HomeWork; | 18 | import com.prws.common.bean.homework.HomeWork; |
9 | import com.prws.common.bean.homework.HomeworkList; | 19 | import com.prws.common.bean.homework.HomeworkList; |
10 | 20 | ||
11 | import java.text.DecimalFormat; | 21 | import java.text.DecimalFormat; |
12 | import java.util.ArrayList; | 22 | import java.util.ArrayList; |
23 | import java.util.List; | ||
13 | 24 | ||
14 | public class HomeworkFeedbackActivity extends BaseRxActivity<ActivityHomeworkFeedbackBinding> { | 25 | public class HomeworkFeedbackActivity extends BaseRxActivity<ActivityHomeworkFeedbackBinding> { |
15 | private Student student; | 26 | private Student student; |
16 | private HomeworkList mData; | 27 | private HomeworkList mData; |
17 | private ArrayList<HomeWork> mList; | 28 | private ArrayList<HomeWork> mList; |
18 | 29 | ||
19 | @SuppressWarnings("unchecked") | 30 | @SuppressWarnings("unchecked") |
20 | @Override | 31 | @Override |
21 | public void initView(Bundle savedInstanceState) { | 32 | public void initView(Bundle savedInstanceState) { |
22 | binding.toolbar.setNavigationOnClickListener(v -> onBackPressed()); | 33 | binding.toolbar.setNavigationOnClickListener(v -> onBackPressed()); |
23 | student = (Student) getIntent().getSerializableExtra("student"); | 34 | student = (Student) getIntent().getSerializableExtra("student"); |
24 | mData = (HomeworkList) getIntent().getSerializableExtra("data"); | 35 | mData = (HomeworkList) getIntent().getSerializableExtra("data"); |
25 | mList = (ArrayList<HomeWork>) getIntent().getSerializableExtra("list"); | 36 | mList = (ArrayList<HomeWork>) getIntent().getSerializableExtra("list"); |
26 | 37 | ||
27 | binding.tvStuName.setText(student.stuName); | 38 | binding.tvStuName.setText(student.stuName); |
28 | binding.tvGrade.setText(student.grade); | 39 | binding.tvGrade.setText(student.grade); |
29 | 40 | ||
41 | List<HomeWork> errorList = new ArrayList<>(); | ||
30 | int correctNo = 0; | 42 | int correctNo = 0; |
31 | for (HomeWork homeWork: mList) { | 43 | for (HomeWork homeWork: mList) { |
32 | homeWork.homeworkId = mData.getId(); | 44 | homeWork.homeworkId = mData.getId(); |
33 | if (!homeWork.check) correctNo ++; | 45 | if (!homeWork.check) correctNo ++; |
46 | else errorList.add(homeWork); | ||
34 | } | 47 | } |
35 | binding.tvPercent.setText(new DecimalFormat("0%").format(1f * correctNo / mList.size())); | 48 | binding.tvPercent.setText(new DecimalFormat("0%").format(1f * correctNo / mList.size())); |
49 | |||
50 | binding.rvCorrect.setLayoutManager(new FlexboxLayoutManager(this)); | ||
51 | binding.rvCorrect.setAdapter(new NumberAdapter(mList)); | ||
52 | binding.rvError.setVisibility(errorList.isEmpty() ? View.GONE : View.VISIBLE); | ||
53 | binding.rvError.setAdapter(new EvalAdapter(errorList)); | ||
36 | } | 54 | } |
37 | 55 | ||
38 | @Override | 56 | @Override |
39 | protected ActivityHomeworkFeedbackBinding getViewBinding() { | 57 | protected ActivityHomeworkFeedbackBinding getViewBinding() { |
40 | return ActivityHomeworkFeedbackBinding.inflate(getLayoutInflater()); | 58 | return ActivityHomeworkFeedbackBinding.inflate(getLayoutInflater()); |
41 | } | 59 | } |
60 | |||
61 | static class NumberAdapter extends BaseQuickAdapter<HomeWork, BaseViewHolder> { | ||
62 | |||
63 | public NumberAdapter(List<HomeWork> list) { | ||
64 | super(R.layout.item_feedback_num, list); | ||
65 | } | ||
66 | |||
67 | @Override | ||
68 | protected void convert(@NonNull BaseViewHolder holder, HomeWork homeWork) { | ||
69 | int position = getData().indexOf(homeWork); | ||
70 | holder.setText(R.id.tvNum, String.valueOf(position + 1)); | ||
71 | if (homeWork.check) { | ||
72 | holder.setImageResource(R.id.ivType, R.drawable.ic_wrong_small); | ||
73 | } else { | ||
74 | holder.setImageResource(R.id.ivType, R.drawable.ic_correct_small); | ||
75 | } | ||
76 | } | ||
77 | } | ||
78 | |||
79 | static class EvalAdapter extends BaseQuickAdapter<HomeWork, BaseViewHolder> { | ||
80 | |||
81 | public EvalAdapter(@Nullable List<HomeWork> data) { | ||
82 | super(R.layout.item_homework_eval, data); | ||
83 | } | ||
84 | |||
85 | @Override | ||
86 | protected void convert(@NonNull BaseViewHolder holder, HomeWork homeWork) { | ||
87 | holder.itemView.setClipToOutline(true); | ||
88 | holder.setText(R.id.tvNo, "题目" + (homeWork.index + 1)); | ||
89 | ImageView iv = holder.getView(R.id.ivTopic); | ||
90 | Glide.with(mContext).load(homeWork.url).into(iv); | ||
91 | |||
92 | RadioButton chk1 = holder.getView(R.id.chk1); | ||
93 | RadioButton chk2 = holder.getView(R.id.chk2); | ||
94 | RadioButton chk3 = holder.getView(R.id.chk3); | ||
95 | chk1.setOnCheckedChangeListener((v, b) -> { | ||
96 | if (b) { | ||
97 | homeWork.state = 1; | ||
98 | } | ||
99 | }); | ||
100 | chk2.setOnCheckedChangeListener((v, b) -> { | ||
101 | if (b) { | ||
102 | homeWork.state = 2; | ||
103 | } | ||
104 | }); | ||
105 | chk3.setOnCheckedChangeListener((v, b) -> { | ||
106 | if (b) { | ||
107 | homeWork.state = 3; | ||
108 | } | ||
109 | }); | ||
110 | chk1.setChecked(homeWork.state == 1); | ||
111 | chk2.setChecked(homeWork.state == 2); | ||
112 | chk3.setChecked(homeWork.state == 3); | ||
113 | } | ||
114 | } | ||
42 | } | 115 | } |
43 | 116 |
app/src/main/res/drawable/bg_homework_eval_item.xml
File was created | 1 | <?xml version="1.0" encoding="utf-8"?> | |
2 | <shape xmlns:android="http://schemas.android.com/apk/res/android"> | ||
3 | <corners android:radius="5dp"/> | ||
4 | <stroke android:width="1dp" android:color="#EEEEEE"/> | ||
5 | </shape> |
app/src/main/res/drawable/bg_homework_num.xml
File was created | 1 | <shape xmlns:android="http://schemas.android.com/apk/res/android" | |
2 | android:shape="rectangle"> | ||
3 | <corners android:topRightRadius="5dp" | ||
4 | android:bottomLeftRadius="5dp"/> | ||
5 | <solid android:color="#489AFA" /> | ||
6 | </shape> |
app/src/main/res/drawable/btn_homework_eval1.xml
File was created | 1 | <?xml version="1.0" encoding="utf-8"?> | |
2 | <selector xmlns:android="http://schemas.android.com/apk/res/android"> | ||
3 | |||
4 | <item android:state_checked="true"> | ||
5 | <shape> | ||
6 | <corners android:radius="888dp"/> | ||
7 | <solid android:color="#489AFA"/> | ||
8 | </shape> | ||
9 | </item> | ||
10 | |||
11 | <item> | ||
12 | <shape> | ||
13 | <corners android:radius="888dp"/> | ||
14 | <solid android:color="#DCDCDC"/> | ||
15 | </shape> | ||
16 | </item> | ||
17 | |||
18 | </selector> |
app/src/main/res/drawable/btn_homework_eval2.xml
File was created | 1 | <?xml version="1.0" encoding="utf-8"?> | |
2 | <selector xmlns:android="http://schemas.android.com/apk/res/android"> | ||
3 | |||
4 | <item android:state_checked="true"> | ||
5 | <shape> | ||
6 | <corners android:radius="888dp"/> | ||
7 | <solid android:color="#FF7E00"/> | ||
8 | </shape> | ||
9 | </item> | ||
10 | |||
11 | <item> | ||
12 | <shape> | ||
13 | <corners android:radius="888dp"/> | ||
14 | <solid android:color="#DCDCDC"/> | ||
15 | </shape> | ||
16 | </item> | ||
17 | |||
18 | </selector> |
app/src/main/res/drawable/btn_homework_eval3.xml
File was created | 1 | <?xml version="1.0" encoding="utf-8"?> | |
2 | <selector xmlns:android="http://schemas.android.com/apk/res/android"> | ||
3 | |||
4 | <item android:state_checked="true"> | ||
5 | <shape> | ||
6 | <corners android:radius="888dp"/> | ||
7 | <solid android:color="#FF4133"/> | ||
8 | </shape> | ||
9 | </item> | ||
10 | |||
11 | <item> | ||
12 | <shape> | ||
13 | <corners android:radius="888dp"/> | ||
14 | <solid android:color="#DCDCDC"/> | ||
15 | </shape> | ||
16 | </item> | ||
17 | |||
18 | </selector> |
app/src/main/res/drawable/ic_correct_small.png
1.31 KB
app/src/main/res/drawable/ic_wrong_small.png
1.29 KB
app/src/main/res/layout/activity_homework_feedback.xml
1 | <?xml version="1.0" encoding="utf-8"?> | 1 | <?xml version="1.0" encoding="utf-8"?> |
2 | <LinearLayout | 2 | <LinearLayout |
3 | xmlns:android="http://schemas.android.com/apk/res/android" | 3 | xmlns:android="http://schemas.android.com/apk/res/android" |
4 | xmlns:app="http://schemas.android.com/apk/res-auto" | 4 | xmlns:app="http://schemas.android.com/apk/res-auto" |
5 | xmlns:tools="http://schemas.android.com/tools" | 5 | xmlns:tools="http://schemas.android.com/tools" |
6 | android:orientation="vertical" | 6 | android:orientation="vertical" |
7 | android:layout_width="match_parent" | 7 | android:layout_width="match_parent" |
8 | android:layout_height="match_parent" | 8 | android:layout_height="match_parent" |
9 | tools:ignore="UseCompoundDrawables,HardcodedText,SmallSp,ContentDescription"> | 9 | tools:ignore="UseCompoundDrawables,HardcodedText,SmallSp,ContentDescription"> |
10 | 10 | ||
11 | <androidx.appcompat.widget.Toolbar | 11 | <androidx.appcompat.widget.Toolbar |
12 | android:id="@+id/toolbar" | 12 | android:id="@+id/toolbar" |
13 | app:navigationIcon="@drawable/svg_back" | 13 | app:navigationIcon="@drawable/svg_back" |
14 | app:contentInsetStartWithNavigation="14dp" | 14 | app:contentInsetStartWithNavigation="14dp" |
15 | android:paddingStart="-8dp" | 15 | android:paddingStart="-8dp" |
16 | android:paddingEnd="-8dp" | 16 | android:paddingEnd="-8dp" |
17 | android:background="@color/white" | 17 | android:background="@color/white" |
18 | android:layout_width="match_parent" | 18 | android:layout_width="match_parent" |
19 | android:layout_height="40dp"> | 19 | android:layout_height="40dp"> |
20 | <TextView | 20 | <TextView |
21 | android:text="第二步:教师评语" | 21 | android:text="第二步:教师评语" |
22 | android:textSize="18sp" | 22 | android:textSize="18sp" |
23 | android:textColor="#333" | 23 | android:textColor="#333" |
24 | android:textStyle="bold" | 24 | android:textStyle="bold" |
25 | android:layout_gravity="center" | 25 | android:layout_gravity="center" |
26 | android:layout_width="wrap_content" | 26 | android:layout_width="wrap_content" |
27 | android:layout_height="wrap_content"/> | 27 | android:layout_height="wrap_content"/> |
28 | <TextView | 28 | <TextView |
29 | android:id="@+id/btnPublish" | 29 | android:id="@+id/btnPublish" |
30 | android:text="发布" | 30 | android:text="发布" |
31 | android:textSize="13sp" | 31 | android:textSize="13sp" |
32 | android:textColor="#1C90F3" | 32 | android:textColor="#1C90F3" |
33 | android:textStyle="bold" | 33 | android:textStyle="bold" |
34 | android:layout_gravity="end|center_vertical" | 34 | android:layout_gravity="end|center_vertical" |
35 | android:layout_marginEnd="24dp" | 35 | android:layout_marginEnd="24dp" |
36 | android:layout_width="wrap_content" | 36 | android:layout_width="wrap_content" |
37 | android:layout_height="wrap_content"/> | 37 | android:layout_height="wrap_content"/> |
38 | </androidx.appcompat.widget.Toolbar> | 38 | </androidx.appcompat.widget.Toolbar> |
39 | 39 | ||
40 | <androidx.core.widget.NestedScrollView | 40 | <androidx.core.widget.NestedScrollView |
41 | android:layout_width="match_parent" | 41 | android:layout_width="match_parent" |
42 | android:layout_height="match_parent"> | 42 | android:layout_height="match_parent"> |
43 | <LinearLayout | 43 | <LinearLayout |
44 | android:orientation="vertical" | 44 | android:orientation="vertical" |
45 | android:paddingHorizontal="15dp" | 45 | android:paddingHorizontal="15dp" |
46 | android:paddingBottom="20dp" | 46 | android:paddingBottom="20dp" |
47 | android:layout_width="match_parent" | 47 | android:layout_width="match_parent" |
48 | android:layout_height="wrap_content"> | 48 | android:layout_height="wrap_content"> |
49 | 49 | ||
50 | <LinearLayout | 50 | <LinearLayout |
51 | android:orientation="vertical" | 51 | android:orientation="vertical" |
52 | android:background="@drawable/shape_radius_10" | 52 | android:background="@drawable/shape_radius_10" |
53 | android:backgroundTint="@color/white" | 53 | android:backgroundTint="@color/white" |
54 | android:layout_marginTop="15dp" | 54 | android:layout_marginTop="15dp" |
55 | android:layout_width="match_parent" | 55 | android:layout_width="match_parent" |
56 | android:layout_height="wrap_content"> | 56 | android:layout_height="wrap_content"> |
57 | <androidx.appcompat.widget.AppCompatTextView | 57 | <androidx.appcompat.widget.AppCompatTextView |
58 | android:text="学生信息" | 58 | android:text="学生信息" |
59 | android:textSize="16sp" | 59 | android:textSize="16sp" |
60 | android:textColor="#333" | 60 | android:textColor="#333" |
61 | android:textStyle="bold" | 61 | android:textStyle="bold" |
62 | android:gravity="center_vertical" | 62 | android:gravity="center_vertical" |
63 | android:paddingHorizontal="15dp" | 63 | android:paddingHorizontal="15dp" |
64 | android:drawablePadding="5dp" | 64 | android:drawablePadding="5dp" |
65 | android:drawableStart="@drawable/svg_ic_stu_info" | 65 | android:drawableStart="@drawable/svg_ic_stu_info" |
66 | android:background="@drawable/shape_radius_top_10" | 66 | android:background="@drawable/shape_radius_top_10" |
67 | android:backgroundTint="#DAEBFE" | 67 | android:backgroundTint="#DAEBFE" |
68 | android:layout_width="match_parent" | 68 | android:layout_width="match_parent" |
69 | android:layout_height="40dp"/> | 69 | android:layout_height="40dp"/> |
70 | <LinearLayout | 70 | <LinearLayout |
71 | android:orientation="horizontal" | 71 | android:orientation="horizontal" |
72 | android:layout_marginHorizontal="15dp" | 72 | android:layout_marginHorizontal="15dp" |
73 | android:layout_marginVertical="18dp" | 73 | android:layout_marginVertical="18dp" |
74 | android:layout_width="match_parent" | 74 | android:layout_width="match_parent" |
75 | android:layout_height="wrap_content"> | 75 | android:layout_height="wrap_content"> |
76 | <TextView | 76 | <TextView |
77 | android:text="学生姓名:" | 77 | android:text="学生姓名:" |
78 | android:textSize="14sp" | 78 | android:textSize="14sp" |
79 | android:textColor="#333" | 79 | android:textColor="#333" |
80 | android:layout_width="wrap_content" | 80 | android:layout_width="wrap_content" |
81 | android:layout_height="wrap_content"/> | 81 | android:layout_height="wrap_content"/> |
82 | <TextView | 82 | <TextView |
83 | android:id="@+id/tvStuName" | 83 | android:id="@+id/tvStuName" |
84 | tools:text="杨小凯" | 84 | tools:text="杨小凯" |
85 | android:textSize="14sp" | 85 | android:textSize="14sp" |
86 | android:textColor="#333" | 86 | android:textColor="#333" |
87 | android:layout_width="wrap_content" | 87 | android:layout_width="wrap_content" |
88 | android:layout_height="wrap_content"/> | 88 | android:layout_height="wrap_content"/> |
89 | <Space style="@style/empty_space"/> | 89 | <Space style="@style/empty_space"/> |
90 | <TextView | 90 | <TextView |
91 | android:text="年级:" | 91 | android:text="年级:" |
92 | android:textSize="14sp" | 92 | android:textSize="14sp" |
93 | android:textColor="#333" | 93 | android:textColor="#333" |
94 | android:layout_width="wrap_content" | 94 | android:layout_width="wrap_content" |
95 | android:layout_height="wrap_content"/> | 95 | android:layout_height="wrap_content"/> |
96 | <TextView | 96 | <TextView |
97 | android:id="@+id/tvGrade" | 97 | android:id="@+id/tvGrade" |
98 | tools:text="六年级" | 98 | tools:text="六年级" |
99 | android:textSize="14sp" | 99 | android:textSize="14sp" |
100 | android:textColor="#333" | 100 | android:textColor="#333" |
101 | android:layout_width="96dp" | 101 | android:layout_width="96dp" |
102 | android:layout_height="wrap_content"/> | 102 | android:layout_height="wrap_content"/> |
103 | </LinearLayout> | 103 | </LinearLayout> |
104 | </LinearLayout> | 104 | </LinearLayout> |
105 | 105 | ||
106 | <LinearLayout | 106 | <LinearLayout |
107 | android:orientation="vertical" | 107 | android:orientation="vertical" |
108 | android:background="@drawable/shape_radius_10" | 108 | android:background="@drawable/shape_radius_10" |
109 | android:backgroundTint="@color/white" | 109 | android:backgroundTint="@color/white" |
110 | android:paddingBottom="15dp" | 110 | android:paddingBottom="15dp" |
111 | android:layout_marginTop="15dp" | 111 | android:layout_marginTop="15dp" |
112 | android:layout_width="match_parent" | 112 | android:layout_width="match_parent" |
113 | android:layout_height="wrap_content"> | 113 | android:layout_height="wrap_content"> |
114 | <androidx.appcompat.widget.AppCompatTextView | 114 | <androidx.appcompat.widget.AppCompatTextView |
115 | android:text="作业详情" | 115 | android:text="作业详情" |
116 | android:textSize="16sp" | 116 | android:textSize="16sp" |
117 | android:textColor="#333" | 117 | android:textColor="#333" |
118 | android:textStyle="bold" | 118 | android:textStyle="bold" |
119 | android:gravity="center_vertical" | 119 | android:gravity="center_vertical" |
120 | android:paddingHorizontal="15dp" | 120 | android:paddingHorizontal="15dp" |
121 | android:drawablePadding="5dp" | 121 | android:drawablePadding="5dp" |
122 | android:drawableStart="@drawable/svg_ic_correct" | 122 | android:drawableStart="@drawable/svg_ic_correct" |
123 | android:background="@drawable/shape_radius_top_10" | 123 | android:background="@drawable/shape_radius_top_10" |
124 | android:backgroundTint="#DAEBFE" | 124 | android:backgroundTint="#DAEBFE" |
125 | android:layout_width="match_parent" | 125 | android:layout_width="match_parent" |
126 | android:layout_height="40dp"/> | 126 | android:layout_height="40dp"/> |
127 | <LinearLayout | 127 | <LinearLayout |
128 | android:orientation="horizontal" | 128 | android:orientation="horizontal" |
129 | android:layout_marginHorizontal="15dp" | 129 | android:layout_marginHorizontal="15dp" |
130 | android:layout_marginTop="15dp" | 130 | android:layout_marginTop="15dp" |
131 | android:layout_width="match_parent" | 131 | android:layout_width="match_parent" |
132 | android:layout_height="wrap_content"> | 132 | android:layout_height="wrap_content"> |
133 | <TextView | 133 | <TextView |
134 | android:text="正确率:" | 134 | android:text="正确率:" |
135 | android:textSize="14sp" | 135 | android:textSize="14sp" |
136 | android:textColor="#333" | 136 | android:textColor="#333" |
137 | android:layout_width="wrap_content" | 137 | android:layout_width="wrap_content" |
138 | android:layout_height="wrap_content"/> | 138 | android:layout_height="wrap_content"/> |
139 | <TextView | 139 | <TextView |
140 | android:id="@+id/tvPercent" | 140 | android:id="@+id/tvPercent" |
141 | tools:text="60%" | 141 | tools:text="60%" |
142 | android:textSize="14sp" | 142 | android:textSize="14sp" |
143 | android:textColor="#333" | 143 | android:textColor="#333" |
144 | android:layout_width="wrap_content" | 144 | android:layout_width="wrap_content" |
145 | android:layout_height="wrap_content"/> | 145 | android:layout_height="wrap_content"/> |
146 | <Space style="@style/empty_space"/> | 146 | <Space style="@style/empty_space"/> |
147 | <TextView | 147 | <TextView |
148 | android:text="答题结果" | 148 | android:text="答题结果" |
149 | android:textSize="14sp" | 149 | android:textSize="14sp" |
150 | android:textColor="#333" | 150 | android:textColor="#333" |
151 | android:layout_width="wrap_content" | 151 | android:layout_width="wrap_content" |
152 | android:layout_height="wrap_content"/> | 152 | android:layout_height="wrap_content"/> |
153 | <TextView | 153 | <TextView |
154 | android:text="(点击查看题目详情)" | 154 | android:text="(点击查看题目详情)" |
155 | android:textSize="14sp" | 155 | android:textSize="14sp" |
156 | android:textColor="#1C90F3" | 156 | android:textColor="#1C90F3" |
157 | android:layout_width="wrap_content" | 157 | android:layout_width="wrap_content" |
158 | android:layout_height="wrap_content"/> | 158 | android:layout_height="wrap_content"/> |
159 | </LinearLayout> | 159 | </LinearLayout> |
160 | 160 | ||
161 | <androidx.recyclerview.widget.RecyclerView | 161 | <androidx.recyclerview.widget.RecyclerView |
162 | android:id="@+id/rvCorrect" | 162 | android:id="@+id/rvCorrect" |
163 | tools:listitem="@layout/item_feedback_num" | ||
163 | tools:itemCount="1" | 164 | tools:itemCount="1" |
164 | android:layout_marginTop="15dp" | 165 | android:layout_marginTop="15dp" |
165 | android:layout_marginHorizontal="15dp" | 166 | android:layout_marginHorizontal="15dp" |
166 | android:layout_width="match_parent" | 167 | android:layout_width="match_parent" |
167 | android:layout_height="wrap_content"/> | 168 | android:layout_height="wrap_content"/> |
168 | <TextView | 169 | <TextView |
169 | android:text="错题已经加入到错题本,到错题本查看详情" | 170 | android:text="错题已经加入到错题本,到错题本查看详情" |
170 | android:textSize="12sp" | 171 | android:textSize="12sp" |
171 | android:textColor="#666" | 172 | android:textColor="#666" |
172 | android:layout_marginTop="15dp" | ||
173 | android:layout_marginHorizontal="15dp" | 173 | android:layout_marginHorizontal="15dp" |
174 | android:layout_width="wrap_content" | 174 | android:layout_width="wrap_content" |
175 | android:layout_height="wrap_content"/> | 175 | android:layout_height="wrap_content"/> |
176 | </LinearLayout> | 176 | </LinearLayout> |
177 | 177 | ||
178 | <LinearLayout | 178 | <LinearLayout |
179 | android:id="@+id/flEval" | ||
179 | android:orientation="vertical" | 180 | android:orientation="vertical" |
180 | android:background="@drawable/shape_radius_10" | 181 | android:background="@drawable/shape_radius_10" |
181 | android:backgroundTint="@color/white" | 182 | android:backgroundTint="@color/white" |
182 | android:layout_marginTop="15dp" | 183 | android:layout_marginTop="15dp" |
183 | android:layout_width="match_parent" | 184 | android:layout_width="match_parent" |
184 | android:layout_height="wrap_content"> | 185 | android:layout_height="wrap_content"> |
185 | <androidx.appcompat.widget.AppCompatTextView | 186 | <androidx.appcompat.widget.AppCompatTextView |
186 | android:text="作业详情" | 187 | android:text="辅导后错题掌握评估" |
187 | android:textSize="16sp" | 188 | android:textSize="16sp" |
188 | android:textColor="#333" | 189 | android:textColor="#333" |
189 | android:textStyle="bold" | 190 | android:textStyle="bold" |
190 | android:gravity="center_vertical" | 191 | android:gravity="center_vertical" |
191 | android:paddingHorizontal="15dp" | 192 | android:paddingHorizontal="15dp" |
192 | android:drawablePadding="5dp" | 193 | android:drawablePadding="5dp" |
193 | android:drawableStart="@drawable/svg_ic_paper" | 194 | android:drawableStart="@drawable/svg_ic_paper" |
194 | android:background="@drawable/shape_radius_top_10" | 195 | android:background="@drawable/shape_radius_top_10" |
195 | android:backgroundTint="#DAEBFE" | 196 | android:backgroundTint="#DAEBFE" |
196 | android:layout_width="match_parent" | 197 | android:layout_width="match_parent" |
197 | android:layout_height="40dp"/> | 198 | android:layout_height="40dp"/> |
198 | <androidx.recyclerview.widget.RecyclerView | 199 | <androidx.recyclerview.widget.RecyclerView |
199 | android:id="@+id/rvError" | 200 | android:id="@+id/rvError" |
200 | android:orientation="vertical" | 201 | android:orientation="vertical" |
201 | app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" | 202 | app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" |
202 | android:layout_width="match_parent" | 203 | android:layout_width="match_parent" |
203 | android:layout_height="wrap_content"/> | 204 | android:layout_height="wrap_content"/> |
204 | </LinearLayout> | 205 | </LinearLayout> |
205 | 206 | ||
206 | <LinearLayout | 207 | <LinearLayout |
207 | android:orientation="vertical" | 208 | android:orientation="vertical" |
208 | android:background="@drawable/shape_radius_10" | 209 | android:background="@drawable/shape_radius_10" |
209 | android:backgroundTint="@color/white" | 210 | android:backgroundTint="@color/white" |
210 | android:layout_marginTop="15dp" | 211 | android:layout_marginTop="15dp" |
211 | android:layout_width="match_parent" | 212 | android:layout_width="match_parent" |
212 | android:layout_height="wrap_content"> | 213 | android:layout_height="wrap_content"> |
213 | <androidx.appcompat.widget.AppCompatTextView | 214 | <androidx.appcompat.widget.AppCompatTextView |
214 | android:text="教师评语" | 215 | android:text="教师评语" |
215 | android:textSize="16sp" | 216 | android:textSize="16sp" |
216 | android:textColor="#333" | 217 | android:textColor="#333" |
217 | android:textStyle="bold" | 218 | android:textStyle="bold" |
218 | android:gravity="center_vertical" | 219 | android:gravity="center_vertical" |
219 | android:paddingHorizontal="15dp" | 220 | android:paddingHorizontal="15dp" |
220 | android:drawablePadding="5dp" | 221 | android:drawablePadding="5dp" |
221 | android:drawableStart="@drawable/svg_ic_comment" | 222 | android:drawableStart="@drawable/svg_ic_comment" |
222 | android:background="@drawable/shape_radius_top_10" | 223 | android:background="@drawable/shape_radius_top_10" |
223 | android:backgroundTint="#DAEBFE" | 224 | android:backgroundTint="#DAEBFE" |
224 | android:layout_width="match_parent" | 225 | android:layout_width="match_parent" |
225 | android:layout_height="40dp"/> | 226 | android:layout_height="40dp"/> |
226 | <EditText | 227 | <EditText |
227 | android:id="@+id/etComment" | 228 | android:id="@+id/etComment" |
228 | android:hint="非必填" | 229 | android:hint="非必填" |
229 | android:textSize="13sp" | 230 | android:textSize="13sp" |
230 | android:textColor="#333" | 231 | android:textColor="#333" |
231 | android:textColorHint="#999" | 232 | android:textColorHint="#999" |
232 | android:gravity="start" | 233 | android:gravity="start" |
233 | android:background="@null" | 234 | android:background="@null" |
234 | android:layout_margin="14dp" | 235 | android:layout_margin="14dp" |
235 | android:layout_width="match_parent" | 236 | android:layout_width="match_parent" |
236 | android:layout_height="wrap_content" | 237 | android:layout_height="wrap_content" |
237 | tools:ignore="Autofill,LabelFor,TextFields" /> | 238 | tools:ignore="Autofill,LabelFor,TextFields" /> |
238 | </LinearLayout> | 239 | </LinearLayout> |
239 | 240 | ||
240 | 241 | ||
241 | </LinearLayout> | 242 | </LinearLayout> |
242 | </androidx.core.widget.NestedScrollView> | 243 | </androidx.core.widget.NestedScrollView> |
app/src/main/res/layout/item_feedback_num.xml
File was created | 1 | <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
2 | android:layout_width="28dp" | ||
3 | android:layout_height="28dp" | ||
4 | android:layout_marginBottom="10dp" | ||
5 | android:layout_marginEnd="20dp"> | ||
6 | |||
7 | <TextView | ||
8 | android:id="@+id/tvNum" | ||
9 | android:layout_width="25dp" | ||
10 | android:layout_height="25dp" | ||
11 | android:background="@drawable/shape_radius_5" | ||
12 | android:backgroundTint="#D7EBFF" | ||
13 | android:gravity="center" | ||
14 | android:textColor="#4D9CF7" | ||
15 | android:textSize="18sp" /> | ||
16 | |||
17 | <ImageView | ||
18 | android:id="@+id/ivType" | ||
19 | android:layout_width="12dp" | ||
20 | android:layout_height="12dp" | ||
21 | android:layout_gravity="end|bottom"/> | ||
22 | </FrameLayout> |
app/src/main/res/layout/item_homework_eval.xml
File was created | 1 | <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
2 | xmlns:app="http://schemas.android.com/apk/res-auto" | ||
3 | xmlns:tools="http://schemas.android.com/tools" | ||
4 | android:orientation="vertical" | ||
5 | tools:layout_width="280dp" | ||
6 | android:layout_width="match_parent" | ||
7 | android:layout_height="wrap_content" | ||
8 | android:layout_marginHorizontal="16dp" | ||
9 | android:layout_marginTop="16dp" | ||
10 | android:background="@drawable/bg_homework_eval_item" | ||
11 | tools:ignore="HardcodedText,SmallSp"> | ||
12 | |||
13 | <FrameLayout | ||
14 | android:layout_width="match_parent" | ||
15 | android:layout_height="110dp"> | ||
16 | |||
17 | <androidx.constraintlayout.utils.widget.ImageFilterView | ||
18 | android:id="@+id/ivTopic" | ||
19 | app:round="10dp" | ||
20 | android:layout_margin="1dp" | ||
21 | android:layout_width="match_parent" | ||
22 | android:layout_height="match_parent" /> | ||
23 | |||
24 | <TextView | ||
25 | android:id="@+id/tvNo" | ||
26 | tools:text="题目8" | ||
27 | android:layout_width="40dp" | ||
28 | android:layout_height="16dp" | ||
29 | android:layout_gravity="end" | ||
30 | android:background="@drawable/bg_homework_num" | ||
31 | android:gravity="center" | ||
32 | android:textColor="@color/white" | ||
33 | android:textSize="9sp" /> | ||
34 | </FrameLayout> | ||
35 | |||
36 | <View | ||
37 | android:background="#EEEEEE" | ||
38 | android:layout_width="match_parent" | ||
39 | android:layout_height="1dp"/> | ||
40 | |||
41 | <RadioGroup | ||
42 | android:id="@+id/chkGroup" | ||
43 | android:orientation="horizontal" | ||
44 | android:gravity="center_vertical" | ||
45 | android:paddingHorizontal="10dp" | ||
46 | android:layout_width="match_parent" | ||
47 | android:layout_height="46dp"> | ||
48 | |||
49 | <RadioButton | ||
50 | android:id="@+id/chk1" | ||
51 | android:text="已听懂" | ||
52 | android:textSize="12sp" | ||
53 | android:textColor="@color/white" | ||
54 | android:gravity="center" | ||
55 | android:button="@null" | ||
56 | tools:checked="true" | ||
57 | android:background="@drawable/btn_homework_eval1" | ||
58 | android:layout_marginHorizontal="10dp" | ||
59 | android:layout_weight="1" | ||
60 | android:layout_width="0dp" | ||
61 | android:layout_height="25dp" /> | ||
62 | |||
63 | <RadioButton | ||
64 | android:id="@+id/chk2" | ||
65 | android:text="基本听懂" | ||
66 | android:textSize="12sp" | ||
67 | android:textColor="@color/white" | ||
68 | android:gravity="center" | ||
69 | android:button="@null" | ||
70 | tools:checked="true" | ||
71 | android:background="@drawable/btn_homework_eval2" | ||
72 | android:layout_marginHorizontal="10dp" | ||
73 | android:layout_weight="1" | ||
74 | android:layout_width="0dp" | ||
75 | android:layout_height="25dp" /> | ||
76 | |||
77 | <RadioButton | ||
78 | android:id="@+id/chk3" | ||
79 | android:text="一般听懂" | ||
80 | android:textSize="12sp" | ||
81 | android:textColor="@color/white" | ||
82 | android:gravity="center" | ||
83 | android:button="@null" | ||
84 | tools:checked="true" | ||
85 | android:background="@drawable/btn_homework_eval3" | ||
86 | android:layout_marginHorizontal="10dp" | ||
87 | android:layout_weight="1" | ||
88 | android:layout_width="0dp" | ||
89 | android:layout_height="25dp" /> | ||
90 | |||
91 | </RadioGroup> | ||
92 | |||
93 | </LinearLayout> |
libs/common/src/main/java/com/prws/common/bean/homework/HomeWork.java
1 | package com.prws.common.bean.homework; | 1 | package com.prws.common.bean.homework; |
2 | 2 | ||
3 | import com.google.gson.annotations.SerializedName; | 3 | import com.google.gson.annotations.SerializedName; |
4 | 4 | ||
5 | import java.io.Serializable; | 5 | import java.io.Serializable; |
6 | 6 | ||
7 | public class HomeWork implements Serializable { | 7 | public class HomeWork implements Serializable { |
8 | 8 | ||
9 | @SerializedName(value = "homeworkId", alternate = "id") | 9 | @SerializedName(value = "homeworkId", alternate = "id") |
10 | public String homeworkId; | 10 | public String homeworkId; |
11 | public String brief; | 11 | public String brief; |
12 | public String url; | 12 | public String url; |
13 | public String analyseUrl; | 13 | public String analyseUrl; |
14 | public String analyseVideoUrl; | 14 | public String analyseVideoUrl; |
15 | public Integer correction; | 15 | public Integer correction; |
16 | public String answer; | 16 | public String answer; |
17 | public String points; | 17 | public String points; |
18 | 18 | ||
19 | public boolean check = false; | 19 | public boolean check = false; |
20 | public transient int index = 0; | ||
21 | public transient int state = 1; | ||
20 | 22 | ||
21 | } | 23 | } |
22 | 24 |