Commit e09b441
committed
Refactor(UI): Improve app drawer context menu and keyboard behavior
This commit refactors the context menu logic in the app drawer to ensure only one menu is open at a time. Previously, multiple menus could be open simultaneously.
The key changes are:
* Replaced the `visibleHideLayouts` set with a single `openedContextMenuPosition` integer to track the currently open menu item.
* The `ViewHolder` is now an inner class to access adapter properties.
* When a new context menu is opened, any previously opened menu is now automatically closed by notifying the adapter of the change.
* Clicking on another app item or the main layout now closes the open context menu.
* Added padding to the bottom of the app and contact lists to account for the on-screen keyboard (IME), preventing it from covering list items.
closes #989
closes #9881 parent 16bec17 commit e09b441
File tree
3 files changed
+68
-21
lines changed- app/src/main
- java/com/github/codeworkscreativehub/mlauncher/ui
- adapter
- res/layout
3 files changed
+68
-21
lines changedLines changed: 22 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
| 30 | + | |
29 | 31 | | |
| 32 | + | |
30 | 33 | | |
31 | 34 | | |
32 | 35 | | |
| |||
88 | 91 | | |
89 | 92 | | |
90 | 93 | | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
91 | 101 | | |
92 | 102 | | |
93 | 103 | | |
| |||
115 | 125 | | |
116 | 126 | | |
117 | 127 | | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | 128 | | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
122 | 133 | | |
123 | 134 | | |
124 | 135 | | |
| |||
248 | 259 | | |
249 | 260 | | |
250 | 261 | | |
251 | | - | |
| 262 | + | |
252 | 263 | | |
253 | 264 | | |
254 | 265 | | |
| |||
313 | 324 | | |
314 | 325 | | |
315 | 326 | | |
| 327 | + | |
316 | 328 | | |
317 | | - | |
318 | 329 | | |
319 | 330 | | |
320 | 331 | | |
| |||
414 | 425 | | |
415 | 426 | | |
416 | 427 | | |
417 | | - | |
418 | 428 | | |
419 | 429 | | |
420 | 430 | | |
| |||
429 | 439 | | |
430 | 440 | | |
431 | 441 | | |
432 | | - | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
433 | 448 | | |
434 | 449 | | |
435 | 450 | | |
| |||
Lines changed: 40 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
47 | 46 | | |
48 | 47 | | |
49 | 48 | | |
| |||
67 | 66 | | |
68 | 67 | | |
69 | 68 | | |
| 69 | + | |
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| |||
299 | 299 | | |
300 | 300 | | |
301 | 301 | | |
302 | | - | |
| 302 | + | |
303 | 303 | | |
304 | 304 | | |
305 | 305 | | |
| |||
337 | 337 | | |
338 | 338 | | |
339 | 339 | | |
340 | | - | |
341 | | - | |
| 340 | + | |
| 341 | + | |
342 | 342 | | |
343 | 343 | | |
344 | 344 | | |
| |||
438 | 438 | | |
439 | 439 | | |
440 | 440 | | |
441 | | - | |
442 | | - | |
443 | | - | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
444 | 447 | | |
445 | 448 | | |
446 | 449 | | |
| |||
485 | 488 | | |
486 | 489 | | |
487 | 490 | | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
488 | 501 | | |
489 | 502 | | |
490 | | - | |
| 503 | + | |
| 504 | + | |
491 | 505 | | |
492 | 506 | | |
493 | 507 | | |
| |||
510 | 524 | | |
511 | 525 | | |
512 | 526 | | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
513 | 535 | | |
514 | 536 | | |
515 | 537 | | |
| |||
547 | 569 | | |
548 | 570 | | |
549 | 571 | | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
550 | 582 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| |||
0 commit comments