Commit cafc2abf7bffe38ed73e0ef8c9766cd48cb31645
1 parent
db9a5f8f1f
Exists in
master
序号调整到左上角
Showing
3 changed files
with
10 additions
and
4 deletions
Show diff stats
app/src/main/res/drawable/bg_homework_num_left.xml
File was created | 1 | <shape xmlns:android="http://schemas.android.com/apk/res/android" | |
2 | android:shape="rectangle"> | ||
3 | <corners android:topLeftRadius="5dp" | ||
4 | android:bottomRightRadius="5dp"/> | ||
5 | <solid android:color="#489AFA" /> | ||
6 | </shape> |
app/src/main/res/layout/activity_topic_detail.xml
1 | <?xml version="1.0" encoding="utf-8"?> | 1 | <?xml version="1.0" encoding="utf-8"?> |
2 | <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | 2 | <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" |
3 | xmlns:app="http://schemas.android.com/apk/res-auto" | 3 | xmlns:app="http://schemas.android.com/apk/res-auto" |
4 | xmlns:tools="http://schemas.android.com/tools" | 4 | xmlns:tools="http://schemas.android.com/tools" |
5 | android:orientation="vertical" | 5 | android:orientation="vertical" |
6 | android:layout_width="match_parent" | 6 | android:layout_width="match_parent" |
7 | android:layout_height="match_parent" | 7 | android:layout_height="match_parent" |
8 | tools:ignore="UseCompoundDrawables,HardcodedText,SmallSp,ContentDescription"> | 8 | tools:ignore="UseCompoundDrawables,HardcodedText,SmallSp,ContentDescription"> |
9 | 9 | ||
10 | <androidx.appcompat.widget.Toolbar | 10 | <androidx.appcompat.widget.Toolbar |
11 | android:id="@+id/toolbar" | 11 | android:id="@+id/toolbar" |
12 | app:navigationIcon="@drawable/svg_back" | 12 | app:navigationIcon="@drawable/svg_back" |
13 | app:contentInsetStartWithNavigation="14dp" | 13 | app:contentInsetStartWithNavigation="14dp" |
14 | android:paddingStart="-8dp" | 14 | android:paddingStart="-8dp" |
15 | android:paddingEnd="-8dp" | 15 | android:paddingEnd="-8dp" |
16 | android:background="@color/white" | 16 | android:background="@color/white" |
17 | android:layout_width="match_parent" | 17 | android:layout_width="match_parent" |
18 | android:layout_height="40dp"> | 18 | android:layout_height="40dp"> |
19 | <TextView | 19 | <TextView |
20 | android:id="@+id/tvTitle" | 20 | android:id="@+id/tvTitle" |
21 | tools:text="1/6" | 21 | tools:text="1/6" |
22 | android:textSize="18sp" | 22 | android:textSize="18sp" |
23 | android:textColor="#333" | 23 | android:textColor="#333" |
24 | android:textStyle="bold" | 24 | android:textStyle="bold" |
25 | android:layout_gravity="center" | 25 | android:layout_gravity="center" |
26 | android:layout_width="wrap_content" | 26 | android:layout_width="wrap_content" |
27 | android:layout_height="wrap_content"/> | 27 | android:layout_height="wrap_content"/> |
28 | </androidx.appcompat.widget.Toolbar> | 28 | </androidx.appcompat.widget.Toolbar> |
29 | 29 | ||
30 | <androidx.core.widget.NestedScrollView | 30 | <androidx.core.widget.NestedScrollView |
31 | android:layout_width="match_parent" | 31 | android:layout_width="match_parent" |
32 | android:layout_height="0dp" | 32 | android:layout_height="0dp" |
33 | android:layout_weight="1"> | 33 | android:layout_weight="1"> |
34 | <LinearLayout | 34 | <LinearLayout |
35 | android:orientation="vertical" | 35 | android:orientation="vertical" |
36 | android:paddingHorizontal="15dp" | 36 | android:paddingHorizontal="15dp" |
37 | android:layout_width="match_parent" | 37 | android:layout_width="match_parent" |
38 | android:layout_height="wrap_content"> | 38 | android:layout_height="wrap_content"> |
39 | 39 | ||
40 | <androidx.recyclerview.widget.RecyclerView | 40 | <androidx.recyclerview.widget.RecyclerView |
41 | android:id="@+id/rvNumber" | 41 | android:id="@+id/rvNumber" |
42 | android:orientation="horizontal" | 42 | android:orientation="horizontal" |
43 | app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" | 43 | app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" |
44 | android:layout_marginTop="15dp" | 44 | android:layout_marginTop="15dp" |
45 | android:layout_width="match_parent" | 45 | android:layout_width="match_parent" |
46 | android:layout_height="wrap_content"/> | 46 | android:layout_height="wrap_content"/> |
47 | 47 | ||
48 | <LinearLayout | 48 | <LinearLayout |
49 | android:orientation="vertical" | 49 | android:orientation="vertical" |
50 | android:layout_marginTop="15dp" | 50 | android:layout_marginTop="15dp" |
51 | android:background="@drawable/shape_radius_5" | 51 | android:background="@drawable/shape_radius_5" |
52 | android:backgroundTint="@color/white" | 52 | android:backgroundTint="@color/white" |
53 | android:layout_width="match_parent" | 53 | android:layout_width="match_parent" |
54 | android:layout_height="wrap_content"> | 54 | android:layout_height="wrap_content"> |
55 | <TextView | 55 | <TextView |
56 | android:id="@+id/tvNo" | 56 | android:id="@+id/tvNo" |
57 | tools:text="题目8" | 57 | tools:text="题目8" |
58 | android:layout_width="40dp" | 58 | android:layout_width="40dp" |
59 | android:layout_height="16dp" | 59 | android:layout_height="16dp" |
60 | android:layout_gravity="end" | 60 | android:layout_gravity="start" |
61 | android:background="@drawable/bg_homework_num" | 61 | android:background="@drawable/bg_homework_num_left" |
62 | android:gravity="center" | 62 | android:gravity="center" |
63 | android:textColor="@color/white" | 63 | android:textColor="@color/white" |
64 | android:textSize="9sp" /> | 64 | android:textSize="9sp" /> |
65 | <ImageView | 65 | <ImageView |
66 | android:id="@+id/ivTopic" | 66 | android:id="@+id/ivTopic" |
67 | android:adjustViewBounds="true" | 67 | android:adjustViewBounds="true" |
68 | android:layout_marginHorizontal="20dp" | 68 | android:layout_marginHorizontal="20dp" |
69 | android:layout_marginVertical="16dp" | 69 | android:layout_marginVertical="16dp" |
70 | android:layout_width="match_parent" | 70 | android:layout_width="match_parent" |
71 | android:layout_height="wrap_content"/> | 71 | android:layout_height="wrap_content"/> |
72 | </LinearLayout> | 72 | </LinearLayout> |
73 | 73 | ||
74 | <LinearLayout | 74 | <LinearLayout |
75 | android:orientation="vertical" | 75 | android:orientation="vertical" |
76 | android:layout_marginTop="15dp" | 76 | android:layout_marginTop="15dp" |
77 | android:background="@drawable/shape_radius_5" | 77 | android:background="@drawable/shape_radius_5" |
78 | android:backgroundTint="@color/white" | 78 | android:backgroundTint="@color/white" |
79 | android:layout_width="match_parent" | 79 | android:layout_width="match_parent" |
80 | android:layout_height="wrap_content"> | 80 | android:layout_height="wrap_content"> |
81 | <androidx.appcompat.widget.AppCompatTextView | 81 | <androidx.appcompat.widget.AppCompatTextView |
82 | android:text="解析" | 82 | android:text="解析" |
83 | android:layout_width="wrap_content" | 83 | android:layout_width="wrap_content" |
84 | android:layout_height="wrap_content" | 84 | android:layout_height="wrap_content" |
85 | android:layout_marginTop="15dp" | 85 | android:layout_marginTop="15dp" |
86 | android:layout_marginHorizontal="15dp" | 86 | android:layout_marginHorizontal="15dp" |
87 | android:drawableStart="@drawable/ic_analyse" | 87 | android:drawableStart="@drawable/ic_analyse" |
88 | android:drawablePadding="5dp" | 88 | android:drawablePadding="5dp" |
89 | android:gravity="center|center_vertical" | 89 | android:gravity="center|center_vertical" |
90 | android:textStyle="bold" | 90 | android:textStyle="bold" |
91 | android:textColor="#333" | 91 | android:textColor="#333" |
92 | android:textSize="16sp" /> | 92 | android:textSize="16sp" /> |
93 | <ImageView | 93 | <ImageView |
94 | android:id="@+id/ivAnalyse" | 94 | android:id="@+id/ivAnalyse" |
95 | android:adjustViewBounds="true" | 95 | android:adjustViewBounds="true" |
96 | android:layout_marginHorizontal="15dp" | 96 | android:layout_marginHorizontal="15dp" |
97 | android:layout_marginVertical="15dp" | 97 | android:layout_marginVertical="15dp" |
98 | android:layout_width="match_parent" | 98 | android:layout_width="match_parent" |
99 | android:layout_height="wrap_content"/> | 99 | android:layout_height="wrap_content"/> |
100 | </LinearLayout> | 100 | </LinearLayout> |
101 | 101 | ||
102 | <LinearLayout | 102 | <LinearLayout |
103 | android:orientation="vertical" | 103 | android:orientation="vertical" |
104 | android:layout_marginTop="15dp" | 104 | android:layout_marginTop="15dp" |
105 | android:background="@drawable/shape_radius_5" | 105 | android:background="@drawable/shape_radius_5" |
106 | android:backgroundTint="@color/white" | 106 | android:backgroundTint="@color/white" |
107 | android:layout_width="match_parent" | 107 | android:layout_width="match_parent" |
108 | android:layout_height="wrap_content"> | 108 | android:layout_height="wrap_content"> |
109 | <androidx.appcompat.widget.AppCompatTextView | 109 | <androidx.appcompat.widget.AppCompatTextView |
110 | android:text="答案" | 110 | android:text="答案" |
111 | android:layout_width="wrap_content" | 111 | android:layout_width="wrap_content" |
112 | android:layout_height="wrap_content" | 112 | android:layout_height="wrap_content" |
113 | android:layout_marginTop="15dp" | 113 | android:layout_marginTop="15dp" |
114 | android:layout_marginHorizontal="15dp" | 114 | android:layout_marginHorizontal="15dp" |
115 | android:drawableStart="@drawable/ic_analyse" | 115 | android:drawableStart="@drawable/ic_analyse" |
116 | android:drawablePadding="5dp" | 116 | android:drawablePadding="5dp" |
117 | android:gravity="center|center_vertical" | 117 | android:gravity="center|center_vertical" |
118 | android:textStyle="bold" | 118 | android:textStyle="bold" |
119 | android:textColor="#333" | 119 | android:textColor="#333" |
120 | android:textSize="16sp" /> | 120 | android:textSize="16sp" /> |
121 | <TextView | 121 | <TextView |
122 | android:id="@+id/tvAnswer" | 122 | android:id="@+id/tvAnswer" |
123 | android:textSize="12sp" | 123 | android:textSize="12sp" |
124 | android:textColor="#333" | 124 | android:textColor="#333" |
125 | android:layout_margin="15dp" | 125 | android:layout_margin="15dp" |
126 | android:layout_width="match_parent" | 126 | android:layout_width="match_parent" |
127 | android:layout_height="wrap_content"/> | 127 | android:layout_height="wrap_content"/> |
128 | </LinearLayout> | 128 | </LinearLayout> |
129 | 129 | ||
130 | <LinearLayout | 130 | <LinearLayout |
131 | android:orientation="vertical" | 131 | android:orientation="vertical" |
132 | android:layout_marginTop="15dp" | 132 | android:layout_marginTop="15dp" |
133 | android:background="@drawable/shape_radius_5" | 133 | android:background="@drawable/shape_radius_5" |
134 | android:backgroundTint="@color/white" | 134 | android:backgroundTint="@color/white" |
135 | android:layout_width="match_parent" | 135 | android:layout_width="match_parent" |
136 | android:layout_height="wrap_content"> | 136 | android:layout_height="wrap_content"> |
137 | <androidx.appcompat.widget.AppCompatTextView | 137 | <androidx.appcompat.widget.AppCompatTextView |
138 | android:text="知识点" | 138 | android:text="知识点" |
139 | android:layout_width="wrap_content" | 139 | android:layout_width="wrap_content" |
140 | android:layout_height="wrap_content" | 140 | android:layout_height="wrap_content" |
141 | android:layout_marginTop="15dp" | 141 | android:layout_marginTop="15dp" |
142 | android:layout_marginHorizontal="15dp" | 142 | android:layout_marginHorizontal="15dp" |
143 | android:drawableStart="@drawable/ic_analyse" | 143 | android:drawableStart="@drawable/ic_analyse" |
144 | android:drawablePadding="5dp" | 144 | android:drawablePadding="5dp" |
145 | android:gravity="center|center_vertical" | 145 | android:gravity="center|center_vertical" |
146 | android:textStyle="bold" | 146 | android:textStyle="bold" |
147 | android:textColor="#333" | 147 | android:textColor="#333" |
148 | android:textSize="16sp" /> | 148 | android:textSize="16sp" /> |
149 | <TextView | 149 | <TextView |
150 | android:id="@+id/tvPoint" | 150 | android:id="@+id/tvPoint" |
151 | android:textSize="12sp" | 151 | android:textSize="12sp" |
152 | android:textColor="#333" | 152 | android:textColor="#333" |
153 | android:layout_margin="15dp" | 153 | android:layout_margin="15dp" |
154 | android:layout_width="match_parent" | 154 | android:layout_width="match_parent" |
155 | android:layout_height="wrap_content"/> | 155 | android:layout_height="wrap_content"/> |
156 | </LinearLayout> | 156 | </LinearLayout> |
157 | 157 | ||
158 | </LinearLayout> | 158 | </LinearLayout> |
159 | </androidx.core.widget.NestedScrollView> | 159 | </androidx.core.widget.NestedScrollView> |
160 | 160 | ||
161 | <LinearLayout | 161 | <LinearLayout |
162 | android:orientation="horizontal" | 162 | android:orientation="horizontal" |
163 | android:gravity="center_vertical" | 163 | android:gravity="center_vertical" |
164 | android:paddingHorizontal="15dp" | 164 | android:paddingHorizontal="15dp" |
165 | android:layout_marginVertical="15dp" | 165 | android:layout_marginVertical="15dp" |
166 | android:layout_width="match_parent" | 166 | android:layout_width="match_parent" |
167 | android:layout_height="wrap_content"> | 167 | android:layout_height="wrap_content"> |
168 | <androidx.constraintlayout.utils.widget.ImageFilterView | 168 | <androidx.constraintlayout.utils.widget.ImageFilterView |
169 | android:id="@+id/btnPre" | 169 | android:id="@+id/btnPre" |
170 | app:round="10dp" | 170 | app:round="10dp" |
171 | android:src="@drawable/svg_pre" | 171 | android:src="@drawable/svg_pre" |
172 | android:tint="@color/color_btn_pre_state" | 172 | android:tint="@color/color_btn_pre_state" |
173 | android:background="@color/white" | 173 | android:background="@color/white" |
174 | android:paddingHorizontal="6dp" | 174 | android:paddingHorizontal="6dp" |
175 | android:layout_width="20dp" | 175 | android:layout_width="20dp" |
176 | android:layout_height="20dp"/> | 176 | android:layout_height="20dp"/> |
177 | <Space style="@style/empty_space"/> | 177 | <Space style="@style/empty_space"/> |
178 | <androidx.constraintlayout.utils.widget.ImageFilterView | 178 | <androidx.constraintlayout.utils.widget.ImageFilterView |
179 | android:id="@+id/btnNext" | 179 | android:id="@+id/btnNext" |
180 | android:rotation="180" | 180 | android:rotation="180" |
181 | app:round="10dp" | 181 | app:round="10dp" |
182 | android:src="@drawable/svg_pre" | 182 | android:src="@drawable/svg_pre" |
183 | android:tint="@color/color_btn_pre_state" | 183 | android:tint="@color/color_btn_pre_state" |
184 | android:background="@color/white" | 184 | android:background="@color/white" |
185 | android:paddingHorizontal="6dp" | 185 | android:paddingHorizontal="6dp" |
186 | android:layout_width="20dp" | 186 | android:layout_width="20dp" |
187 | android:layout_height="20dp"/> | 187 | android:layout_height="20dp"/> |
188 | </LinearLayout> | 188 | </LinearLayout> |
189 | </LinearLayout> | 189 | </LinearLayout> |
app/src/main/res/layout/item_homework_eval.xml
1 | <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | 1 | <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" |
2 | xmlns:app="http://schemas.android.com/apk/res-auto" | 2 | xmlns:app="http://schemas.android.com/apk/res-auto" |
3 | xmlns:tools="http://schemas.android.com/tools" | 3 | xmlns:tools="http://schemas.android.com/tools" |
4 | android:orientation="vertical" | 4 | android:orientation="vertical" |
5 | tools:layout_width="280dp" | 5 | tools:layout_width="280dp" |
6 | android:layout_width="match_parent" | 6 | android:layout_width="match_parent" |
7 | android:layout_height="wrap_content" | 7 | android:layout_height="wrap_content" |
8 | android:layout_marginHorizontal="16dp" | 8 | android:layout_marginHorizontal="16dp" |
9 | android:layout_marginTop="16dp" | 9 | android:layout_marginTop="16dp" |
10 | android:background="@drawable/bg_homework_eval_item" | 10 | android:background="@drawable/bg_homework_eval_item" |
11 | tools:ignore="HardcodedText,SmallSp"> | 11 | tools:ignore="HardcodedText,SmallSp"> |
12 | 12 | ||
13 | <FrameLayout | 13 | <FrameLayout |
14 | android:layout_width="match_parent" | 14 | android:layout_width="match_parent" |
15 | android:layout_height="110dp"> | 15 | android:layout_height="110dp"> |
16 | 16 | ||
17 | <androidx.constraintlayout.utils.widget.ImageFilterView | 17 | <androidx.constraintlayout.utils.widget.ImageFilterView |
18 | android:id="@+id/ivTopic" | 18 | android:id="@+id/ivTopic" |
19 | app:round="10dp" | 19 | app:round="10dp" |
20 | android:layout_margin="1dp" | 20 | android:layout_margin="1dp" |
21 | android:layout_width="match_parent" | 21 | android:layout_width="match_parent" |
22 | android:layout_height="match_parent" /> | 22 | android:layout_height="match_parent" /> |
23 | 23 | ||
24 | <TextView | 24 | <TextView |
25 | android:id="@+id/tvNo" | 25 | android:id="@+id/tvNo" |
26 | tools:text="题目8" | 26 | tools:text="题目8" |
27 | android:layout_width="40dp" | 27 | android:layout_width="40dp" |
28 | android:layout_height="16dp" | 28 | android:layout_height="16dp" |
29 | android:layout_gravity="end" | 29 | android:layout_gravity="start" |
30 | android:background="@drawable/bg_homework_num" | 30 | android:background="@drawable/bg_homework_num_left" |
31 | android:gravity="center" | 31 | android:gravity="center" |
32 | android:textColor="@color/white" | 32 | android:textColor="@color/white" |
33 | android:textSize="9sp" /> | 33 | android:textSize="9sp" /> |
34 | </FrameLayout> | 34 | </FrameLayout> |
35 | 35 | ||
36 | <View | 36 | <View |
37 | android:background="#EEEEEE" | 37 | android:background="#EEEEEE" |
38 | android:layout_width="match_parent" | 38 | android:layout_width="match_parent" |
39 | android:layout_height="1dp"/> | 39 | android:layout_height="1dp"/> |
40 | 40 | ||
41 | <RadioGroup | 41 | <RadioGroup |
42 | android:id="@+id/chkGroup" | 42 | android:id="@+id/chkGroup" |
43 | android:orientation="horizontal" | 43 | android:orientation="horizontal" |
44 | android:gravity="center_vertical" | 44 | android:gravity="center_vertical" |
45 | android:paddingHorizontal="10dp" | 45 | android:paddingHorizontal="10dp" |
46 | android:layout_width="match_parent" | 46 | android:layout_width="match_parent" |
47 | android:layout_height="46dp"> | 47 | android:layout_height="46dp"> |
48 | 48 | ||
49 | <RadioButton | 49 | <RadioButton |
50 | android:id="@+id/chk1" | 50 | android:id="@+id/chk1" |
51 | android:text="已听懂" | 51 | android:text="已听懂" |
52 | android:textSize="12sp" | 52 | android:textSize="12sp" |
53 | android:textColor="@color/white" | 53 | android:textColor="@color/white" |
54 | android:gravity="center" | 54 | android:gravity="center" |
55 | android:button="@null" | 55 | android:button="@null" |
56 | tools:checked="true" | 56 | tools:checked="true" |
57 | android:background="@drawable/btn_homework_eval1" | 57 | android:background="@drawable/btn_homework_eval1" |
58 | android:layout_marginHorizontal="10dp" | 58 | android:layout_marginHorizontal="10dp" |
59 | android:layout_weight="1" | 59 | android:layout_weight="1" |
60 | android:layout_width="0dp" | 60 | android:layout_width="0dp" |
61 | android:layout_height="25dp" /> | 61 | android:layout_height="25dp" /> |
62 | 62 | ||
63 | <RadioButton | 63 | <RadioButton |
64 | android:id="@+id/chk2" | 64 | android:id="@+id/chk2" |
65 | android:text="基本听懂" | 65 | android:text="基本听懂" |
66 | android:textSize="12sp" | 66 | android:textSize="12sp" |
67 | android:textColor="@color/white" | 67 | android:textColor="@color/white" |
68 | android:gravity="center" | 68 | android:gravity="center" |
69 | android:button="@null" | 69 | android:button="@null" |
70 | tools:checked="true" | 70 | tools:checked="true" |
71 | android:background="@drawable/btn_homework_eval2" | 71 | android:background="@drawable/btn_homework_eval2" |
72 | android:layout_marginHorizontal="10dp" | 72 | android:layout_marginHorizontal="10dp" |
73 | android:layout_weight="1" | 73 | android:layout_weight="1" |
74 | android:layout_width="0dp" | 74 | android:layout_width="0dp" |
75 | android:layout_height="25dp" /> | 75 | android:layout_height="25dp" /> |
76 | 76 | ||
77 | <RadioButton | 77 | <RadioButton |
78 | android:id="@+id/chk3" | 78 | android:id="@+id/chk3" |
79 | android:text="一般听懂" | 79 | android:text="一般听懂" |
80 | android:textSize="12sp" | 80 | android:textSize="12sp" |
81 | android:textColor="@color/white" | 81 | android:textColor="@color/white" |
82 | android:gravity="center" | 82 | android:gravity="center" |
83 | android:button="@null" | 83 | android:button="@null" |
84 | tools:checked="true" | 84 | tools:checked="true" |
85 | android:background="@drawable/btn_homework_eval3" | 85 | android:background="@drawable/btn_homework_eval3" |
86 | android:layout_marginHorizontal="10dp" | 86 | android:layout_marginHorizontal="10dp" |
87 | android:layout_weight="1" | 87 | android:layout_weight="1" |
88 | android:layout_width="0dp" | 88 | android:layout_width="0dp" |
89 | android:layout_height="25dp" /> | 89 | android:layout_height="25dp" /> |
90 | 90 | ||
91 | </RadioGroup> | 91 | </RadioGroup> |
92 | 92 | ||
93 | </LinearLayout> | 93 | </LinearLayout> |