Commit 42c831f
committed
feat: Implement dynamic and accessible AZ sidebar
This commit introduces significant enhancements to the `AZSidebarView` to make it dynamic and more accessible. The sidebar now only displays letters corresponding to the available items in the app or contact lists.
Key changes include:
- **Dynamic Letter Filtering**: A new `setAvailableLetters` method in `AZSidebarView` allows it to dynamically hide letters that are not present in the current data set.
- **Improved Sizing**: The sidebar's item spacing is now calculated within `onSizeChanged` using the view's actual height, ensuring it renders correctly regardless of screen size.
- **Accessibility**: When a letter is selected, it is now announced for accessibility services.
- **Code Refinements**:
- Touch event handling has been streamlined into a `handleSelection` method to avoid duplicate code.
- The `setSelectedLetter` function now correctly handles the "★" symbol.
- Typeface lookups are now more efficient, occurring once per draw cycle.
- **Integration**: The `AppDrawerFragment` has been updated to call `setAvailableLetters` whenever the app or contact list is populated or updated, keeping the sidebar in sync.
closes #9561 parent 28b9db5 commit 42c831f
File tree
2 files changed
+127
-36
lines changed- app/src/main/java/com/github/codeworkscreativehub/mlauncher/ui
- components
2 files changed
+127
-36
lines changedLines changed: 37 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
268 | 268 | | |
269 | 269 | | |
270 | 270 | | |
271 | | - | |
272 | | - | |
273 | | - | |
274 | | - | |
275 | | - | |
| 271 | + | |
| 272 | + | |
276 | 273 | | |
277 | 274 | | |
278 | 275 | | |
| |||
587 | 584 | | |
588 | 585 | | |
589 | 586 | | |
| 587 | + | |
590 | 588 | | |
591 | 589 | | |
592 | 590 | | |
593 | 591 | | |
| 592 | + | |
594 | 593 | | |
595 | 594 | | |
596 | 595 | | |
597 | 596 | | |
598 | 597 | | |
| 598 | + | |
599 | 599 | | |
600 | 600 | | |
601 | 601 | | |
| |||
772 | 772 | | |
773 | 773 | | |
774 | 774 | | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
775 | 778 | | |
776 | 779 | | |
777 | 780 | | |
778 | 781 | | |
779 | 782 | | |
780 | 783 | | |
781 | 784 | | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
782 | 788 | | |
783 | 789 | | |
784 | 790 | | |
| |||
863 | 869 | | |
864 | 870 | | |
865 | 871 | | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
866 | 898 | | |
Lines changed: 90 additions & 31 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
23 | 28 | | |
24 | | - | |
25 | 29 | | |
26 | 30 | | |
27 | 31 | | |
28 | 32 | | |
29 | 33 | | |
30 | | - | |
31 | 34 | | |
32 | 35 | | |
| 36 | + | |
33 | 37 | | |
34 | 38 | | |
35 | 39 | | |
36 | | - | |
37 | 40 | | |
38 | | - | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
39 | 52 | | |
40 | 53 | | |
41 | | - | |
| 54 | + | |
42 | 55 | | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
47 | 59 | | |
48 | | - | |
| 60 | + | |
49 | 61 | | |
50 | | - | |
51 | 62 | | |
52 | 63 | | |
| 64 | + | |
53 | 65 | | |
54 | 66 | | |
55 | | - | |
56 | | - | |
| 67 | + | |
57 | 68 | | |
58 | 69 | | |
59 | 70 | | |
60 | 71 | | |
61 | 72 | | |
62 | | - | |
| 73 | + | |
| 74 | + | |
63 | 75 | | |
64 | 76 | | |
65 | 77 | | |
66 | | - | |
67 | | - | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
68 | 83 | | |
69 | 84 | | |
70 | | - | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
71 | 89 | | |
72 | | - | |
73 | 90 | | |
74 | 91 | | |
75 | | - | |
| 92 | + | |
| 93 | + | |
76 | 94 | | |
77 | 95 | | |
78 | 96 | | |
79 | 97 | | |
80 | 98 | | |
81 | 99 | | |
82 | 100 | | |
83 | | - | |
| 101 | + | |
| 102 | + | |
84 | 103 | | |
85 | 104 | | |
86 | 105 | | |
87 | 106 | | |
88 | | - | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
89 | 110 | | |
90 | 111 | | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
| 112 | + | |
97 | 113 | | |
| 114 | + | |
98 | 115 | | |
99 | 116 | | |
100 | | - | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
101 | 123 | | |
102 | 124 | | |
103 | 125 | | |
104 | 126 | | |
105 | 127 | | |
106 | 128 | | |
107 | 129 | | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
108 | 145 | | |
109 | | - | |
110 | | - | |
111 | | - | |
| 146 | + | |
| 147 | + | |
112 | 148 | | |
113 | 149 | | |
114 | 150 | | |
115 | 151 | | |
116 | 152 | | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
117 | 170 | | |
118 | 171 | | |
119 | 172 | | |
120 | 173 | | |
121 | 174 | | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
122 | 181 | | |
0 commit comments