Commit 7a86619
committed
feat(study-screen):
This removes suggestions from the IME, so a language learner can learn
an orthography without hints. It also removes the 'swipe' operation on
the keyboard without showing the incognito icon.
This input mode (TYPE_NULL) will not be for all users: it makes Mandarin
Chinese keyboards output in QWERTY only mode, and likely will disable
voice input.
It is to be treated as an advanced feature, and is currently a hidden
feature, planned to be exposed by the FieldFilter class.
`nosuggest` needs to come before `type` in the field filter list: `type`
is processed by the backend, and AnkiDroid processes the remaining
'custom' filters
so: `{{nosuggest:type:Field}}` becomes [[type:nosuggest:Field]] which is
exposed by TypeAnswer, and implemented by the study screen
----
The following were considered:
TYPE_TEXT_FLAG_AUTO_COMPLETE = false
TYPE_TEXT_FLAG_AUTO_CORRECT = false
TYPE_TEXT_FLAG_AUTO_CORRECT = false
TYPE_TEXT_VARIATION_FILTER = true
IME_FLAG_NO_PERSONALIZED_LEARNING = true
The above are not sufficient for GBoard - incognito shows, and the strip
showing suggested words is still visible
`TYPE_TEXT_VARIATION_VISIBLE_PASSWORD` removed suggestions, but with an
in-IME hint to open the password manager and a monospaced font on the
field
Fixes 10352
https://developer.android.com/reference/android/text/InputType#TYPE_NULL
Assisted-by: Claude Opus 4.7 - the code and a lot of bad researchnosuggest:type field filter1 parent 195046a commit 7a86619
12 files changed
Lines changed: 388 additions & 97 deletions
File tree
- .idea/dictionaries
- AnkiDroid/src
- main/java/com/ichi2/anki
- cardviewer
- model
- previewer
- ui/windows/reviewer
- test/java/com/ichi2/anki
- cardviewer
- model
- previewer
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
Lines changed: 28 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
| |||
71 | 72 | | |
72 | 73 | | |
73 | 74 | | |
| 75 | + | |
74 | 76 | | |
75 | 77 | | |
76 | 78 | | |
| |||
127 | 129 | | |
128 | 130 | | |
129 | 131 | | |
| 132 | + | |
130 | 133 | | |
131 | 134 | | |
132 | 135 | | |
| |||
245 | 248 | | |
246 | 249 | | |
247 | 250 | | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
248 | 255 | | |
249 | 256 | | |
250 | 257 | | |
| |||
569 | 576 | | |
570 | 577 | | |
571 | 578 | | |
| 579 | + | |
572 | 580 | | |
573 | 581 | | |
574 | 582 | | |
| |||
737 | 745 | | |
738 | 746 | | |
739 | 747 | | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
740 | 762 | | |
741 | 763 | | |
742 | 764 | | |
| |||
971 | 993 | | |
972 | 994 | | |
973 | 995 | | |
974 | | - | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
| 999 | + | |
975 | 1000 | | |
976 | 1001 | | |
977 | 1002 | | |
| |||
1333 | 1358 | | |
1334 | 1359 | | |
1335 | 1360 | | |
| 1361 | + | |
1336 | 1362 | | |
1337 | 1363 | | |
1338 | 1364 | | |
| |||
1978 | 2004 | | |
1979 | 2005 | | |
1980 | 2006 | | |
| 2007 | + | |
1981 | 2008 | | |
1982 | 2009 | | |
1983 | 2010 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| 54 | + | |
54 | 55 | | |
55 | 56 | | |
56 | 57 | | |
| |||
267 | 268 | | |
268 | 269 | | |
269 | 270 | | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
270 | 281 | | |
271 | 282 | | |
| 283 | + | |
| 284 | + | |
272 | 285 | | |
273 | 286 | | |
274 | 287 | | |
| |||
Lines changed: 17 additions & 27 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
| 1 | + | |
16 | 2 | | |
17 | 3 | | |
18 | 4 | | |
| |||
31 | 17 | | |
32 | 18 | | |
33 | 19 | | |
| 20 | + | |
| 21 | + | |
34 | 22 | | |
35 | 23 | | |
36 | 24 | | |
| |||
45 | 33 | | |
46 | 34 | | |
47 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
48 | 44 | | |
49 | 45 | | |
50 | 46 | | |
| |||
86 | 82 | | |
87 | 83 | | |
88 | 84 | | |
| 85 | + | |
89 | 86 | | |
90 | 87 | | |
91 | 88 | | |
92 | | - | |
93 | 89 | | |
94 | 90 | | |
95 | 91 | | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
107 | 97 | | |
108 | 98 | | |
109 | 99 | | |
| |||
Lines changed: 51 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
Lines changed: 52 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
| 1 | + | |
16 | 2 | | |
17 | 3 | | |
18 | 4 | | |
19 | 5 | | |
20 | 6 | | |
| 7 | + | |
21 | 8 | | |
22 | 9 | | |
23 | 10 | | |
| |||
34 | 21 | | |
35 | 22 | | |
36 | 23 | | |
37 | | - | |
| 24 | + | |
38 | 25 | | |
39 | 26 | | |
40 | 27 | | |
| |||
69 | 56 | | |
70 | 57 | | |
71 | 58 | | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
72 | 63 | | |
73 | 64 | | |
74 | 65 | | |
| |||
133 | 124 | | |
134 | 125 | | |
135 | 126 | | |
| 127 | + | |
136 | 128 | | |
137 | 129 | | |
138 | 130 | | |
| |||
240 | 232 | | |
241 | 233 | | |
242 | 234 | | |
243 | | - | |
| 235 | + | |
244 | 236 | | |
245 | 237 | | |
246 | 238 | | |
| |||
263 | 255 | | |
264 | 256 | | |
265 | 257 | | |
266 | | - | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
267 | 301 | | |
268 | 302 | | |
269 | 303 | | |
| |||
0 commit comments