1
+ <?xml version =" 1.0" encoding =" utf-8" ?>
2
+
3
+ <androidx .coordinatorlayout.widget.CoordinatorLayout xmlns : android =" http://schemas.android.com/apk/res/android"
4
+ xmlns : app =" http://schemas.android.com/apk/res-auto"
5
+ xmlns : tools =" http://schemas.android.com/tools"
6
+ android : layout_width =" match_parent"
7
+ android : layout_height =" match_parent"
8
+ android : background =" ?attr/alternativeBackgroundColor"
9
+ android : fitsSystemWindows =" true"
10
+ tools : context =" .ui.windows.reviewer.ReviewerFragment" >
11
+
12
+ <androidx .constraintlayout.widget.ConstraintLayout
13
+ android : layout_width =" match_parent"
14
+ android : layout_height =" match_parent"
15
+ android : layout_marginHorizontal =" @dimen/reviewer_side_margin"
16
+ >
17
+
18
+ <com .google.android.material.card.MaterialCardView
19
+ android : id =" @+id/webview_container"
20
+ style =" @style/CardView.ViewerStyle"
21
+ android : layout_width =" match_parent"
22
+ android : layout_height =" 0dp"
23
+ android : layout_marginBottom =" 8dp"
24
+ android : layout_marginTop =" @dimen/reviewer_side_margin"
25
+ app : layout_constraintBottom_toTopOf =" @id/type_answer_container"
26
+ app : layout_constraintTop_toTopOf =" parent" >
27
+
28
+ <WebView
29
+ android : id =" @+id/webview"
30
+ android : layout_width =" match_parent"
31
+ android : layout_height =" match_parent"
32
+ tools : backgroundTint =" @color/white" />
33
+ </com .google.android.material.card.MaterialCardView>
34
+
35
+ <!-- Use the same card style of the WebView -->
36
+ <com .google.android.material.card.MaterialCardView
37
+ android : id =" @+id/type_answer_container"
38
+ style =" @style/CardView.ViewerStyle"
39
+ android : layout_width =" match_parent"
40
+ android : layout_height =" wrap_content"
41
+ android : layout_marginBottom =" 8dp"
42
+ app : layout_constraintTop_toBottomOf =" @id/webview_container"
43
+ app : layout_constraintBottom_toTopOf =" @id/bottom_bar"
44
+ android : visibility =" gone"
45
+ tools : visibility =" visible" >
46
+
47
+ <com .google.android.material.textfield.TextInputLayout
48
+ android : layout_width =" match_parent"
49
+ android : layout_height =" wrap_content"
50
+ android : hint =" @string/type_answer_hint"
51
+ app : boxBackgroundMode =" filled"
52
+ app : boxStrokeWidth =" 0dp"
53
+ app : endIconMode =" clear_text" >
54
+
55
+ <com .google.android.material.textfield.TextInputEditText
56
+ android : id =" @+id/type_answer_edit_text"
57
+ android : layout_width =" match_parent"
58
+ android : layout_height =" wrap_content"
59
+ android : imeOptions =" actionDone"
60
+ android : inputType =" text|textNoSuggestions"
61
+ />
62
+ </com .google.android.material.textfield.TextInputLayout>
63
+ </com .google.android.material.card.MaterialCardView>
64
+
65
+ <androidx .constraintlayout.widget.Guideline
66
+ android : id =" @+id/guideline_answer_buttons_start"
67
+ android : layout_width =" wrap_content"
68
+ android : layout_height =" wrap_content"
69
+ android : orientation =" vertical"
70
+ app : layout_constraintGuide_begin =" 160dp" />
71
+
72
+ <androidx .constraintlayout.widget.Guideline
73
+ android : id =" @+id/guideline_answer_buttons_end"
74
+ android : layout_width =" wrap_content"
75
+ android : layout_height =" wrap_content"
76
+ android : orientation =" vertical"
77
+ app : layout_constraintGuide_end =" 160dp" />
78
+
79
+ <androidx .constraintlayout.widget.Barrier
80
+ android : id =" @+id/bottom_bar"
81
+ android : layout_width =" wrap_content"
82
+ android : layout_height =" wrap_content"
83
+ app : barrierDirection =" top"
84
+ app : constraint_referenced_ids =" answer_buttons, back_button, reviewer_menu_view"
85
+ />
86
+
87
+ <androidx .appcompat.widget.AppCompatImageButton
88
+ android : id =" @+id/back_button"
89
+ style =" ?actionButtonStyle"
90
+ android : layout_width =" ?minTouchTargetSize"
91
+ android : layout_height =" ?actionBarSize"
92
+ android : src =" ?attr/homeAsUpIndicator"
93
+ android : contentDescription =" @string/abc_action_bar_up_description"
94
+ android : tooltipText =" @string/abc_action_bar_up_description"
95
+ app : layout_constraintTop_toBottomOf =" @id/bottom_bar"
96
+ app : layout_constraintBottom_toBottomOf =" parent"
97
+ />
98
+
99
+ <com .google.android.material.textview.MaterialTextView
100
+ android : id =" @+id/new_count"
101
+ android : layout_width =" wrap_content"
102
+ android : layout_height =" wrap_content"
103
+ android : textColor =" ?attr/newCountColor"
104
+ android : paddingEnd =" 4dp"
105
+ app : layout_constraintTop_toTopOf =" @id/back_button"
106
+ app : layout_constraintBottom_toBottomOf =" @id/back_button"
107
+ app : layout_constraintStart_toEndOf =" @id/back_button"
108
+ app : layout_constraintEnd_toStartOf =" @id/lrn_count"
109
+ app : layout_constraintHorizontal_chainStyle =" packed"
110
+ tools : text =" 127"
111
+ />
112
+
113
+ <com .google.android.material.textview.MaterialTextView
114
+ android : id =" @+id/lrn_count"
115
+ android : layout_width =" wrap_content"
116
+ android : layout_height =" wrap_content"
117
+ android : textColor =" ?attr/learnCountColor"
118
+ android : paddingHorizontal =" 4dp"
119
+ app : layout_constraintTop_toTopOf =" @id/back_button"
120
+ app : layout_constraintBottom_toBottomOf =" @id/back_button"
121
+ app : layout_constraintStart_toEndOf =" @id/new_count"
122
+ app : layout_constraintEnd_toStartOf =" @id/rev_count"
123
+ app : layout_constraintHorizontal_chainStyle =" packed"
124
+ tools : text =" 381"
125
+ />
126
+
127
+ <com .google.android.material.textview.MaterialTextView
128
+ android : id =" @+id/rev_count"
129
+ android : layout_width =" wrap_content"
130
+ android : layout_height =" wrap_content"
131
+ android : textColor =" ?attr/reviewCountColor"
132
+ android : paddingStart =" 4dp"
133
+ app : layout_constraintTop_toTopOf =" @id/back_button"
134
+ app : layout_constraintBottom_toBottomOf =" @id/back_button"
135
+ app : layout_constraintStart_toEndOf =" @id/lrn_count"
136
+ app : layout_constraintEnd_toStartOf =" @id/guideline_answer_buttons_start"
137
+ android : layout_marginEnd =" 12dp"
138
+ tools : text =" 954"
139
+ />
140
+
141
+ <com .google.android.material.button.MaterialButton
142
+ android : id =" @+id/show_answer"
143
+ style =" @style/Widget.Material3.Button.TextButton"
144
+ android : layout_width =" 0dp"
145
+ android : layout_height =" 0dp"
146
+ android : minHeight =" ?actionBarSize"
147
+ android : text =" @string/show_answer"
148
+ android : textSize =" @dimen/reviewer_text_size"
149
+ app : layout_constraintBottom_toBottomOf =" parent"
150
+ app : layout_constraintEnd_toEndOf =" @id/answer_buttons"
151
+ app : layout_constraintStart_toStartOf =" @id/answer_buttons"
152
+ app : layout_constraintTop_toTopOf =" @id/answer_buttons"
153
+ tools : visibility =" invisible"
154
+ />
155
+
156
+ <LinearLayout
157
+ android : id =" @+id/answer_buttons"
158
+ android : layout_height =" wrap_content"
159
+ android : layout_width =" 0dp"
160
+ android : minHeight =" ?actionBarSize"
161
+ android : visibility =" invisible"
162
+ tools : visibility =" visible"
163
+ app : layout_constraintStart_toStartOf =" @id/guideline_answer_buttons_start"
164
+ app : layout_constraintEnd_toStartOf =" @id/guideline_answer_buttons_end"
165
+ app : layout_constraintBottom_toBottomOf =" parent"
166
+ >
167
+
168
+ <com .google.android.material.button.MaterialButton
169
+ android : id =" @+id/again_button"
170
+ style =" @style/AnswerButton"
171
+ android : layout_width =" 0dp"
172
+ android : layout_height =" match_parent"
173
+ android : layout_marginHorizontal =" @dimen/answer_button_margin_horizontal"
174
+ android : backgroundTint =" @color/again_button_bg"
175
+ android : text =" @string/ease_button_again"
176
+ android : textColor =" @color/again_button_text"
177
+ android : layout_weight =" 1"
178
+ />
179
+
180
+ <com .google.android.material.button.MaterialButton
181
+ android : id =" @+id/hard_button"
182
+ style =" @style/AnswerButton"
183
+ android : layout_width =" 0dp"
184
+ android : layout_height =" match_parent"
185
+ android : layout_marginHorizontal =" @dimen/answer_button_margin_horizontal"
186
+ android : backgroundTint =" @color/hard_button_bg"
187
+ android : text =" @string/ease_button_hard"
188
+ android : textColor =" @color/hard_button_text"
189
+ android : layout_weight =" 1"
190
+ />
191
+
192
+ <com .google.android.material.button.MaterialButton
193
+ android : id =" @+id/good_button"
194
+ style =" @style/AnswerButton"
195
+ android : layout_width =" 0dp"
196
+ android : layout_height =" match_parent"
197
+ android : layout_marginHorizontal =" @dimen/answer_button_margin_horizontal"
198
+ android : backgroundTint =" @color/good_button_bg"
199
+ android : text =" @string/ease_button_good"
200
+ android : textColor =" @color/good_button_text"
201
+ android : layout_weight =" 1"
202
+ />
203
+
204
+ <com .google.android.material.button.MaterialButton
205
+ android : id =" @+id/easy_button"
206
+ style =" @style/AnswerButton"
207
+ android : layout_width =" 0dp"
208
+ android : layout_height =" match_parent"
209
+ android : layout_marginHorizontal =" @dimen/answer_button_margin_horizontal"
210
+ android : backgroundTint =" @color/easy_button_bg"
211
+ android : text =" @string/ease_button_easy"
212
+ android : textColor =" @color/easy_button_text"
213
+ android : layout_weight =" 1"
214
+ />
215
+ </LinearLayout >
216
+
217
+ <com .ichi2.anki.preferences.reviewer.ReviewerMenuView
218
+ android : id =" @+id/reviewer_menu_view"
219
+ android : layout_width =" 0dp"
220
+ android : layout_height =" ?actionBarSize"
221
+ app : layout_constraintStart_toStartOf =" @id/guideline_answer_buttons_end"
222
+ app : layout_constraintEnd_toEndOf =" parent"
223
+ app : layout_constraintTop_toBottomOf =" @id/bottom_bar"
224
+ app : layout_constraintBottom_toBottomOf =" parent"
225
+ android : layout_marginStart =" 12dp"
226
+ />
227
+
228
+ </androidx .constraintlayout.widget.ConstraintLayout>
229
+ </androidx .coordinatorlayout.widget.CoordinatorLayout>
0 commit comments