Commit a99a767
committed
searchfilters: make default dialog not stretch vertically
Originally stretching vertically over the whole screen was used
to avoid resizing the UI each time the selected content filter
selects another set of sort filters.
As it turns out fullscreen vertically dialogs can be ugly and my
other attempt to use View.INVISIBLE instead of (View.GONE) in order
to have some sort of placeholder, didn't work well with the Spinner
Views either. So we go back and let Android resize the UI.
Another resizing annoyance is now avoided. The Material's Chip with the
Filter style was also resized each time a Chip was selected.
To avoid resizing for the Chip views the checkmark icon is removed
by using a custom chip style: "@style/ChipSearchFilter". The
custom chip style also improves the contrast when a chip is selected
To save some space a ChipGroup that holds more than
CHIP_GROUP_ELEMENTS_THRESHOLD elements will be spanned
over all cells of a row in the GridLayout.1 parent d7bfb0a commit a99a767
5 files changed
Lines changed: 69 additions & 10 deletions
File tree
- app/src/main
- java/org/schabi/newpipe/fragments/list/search/filter
- res
- color
- layout
- values
app/src/main/java/org/schabi/newpipe/fragments/list/search/filter/SearchFilterDialogGenerator.java
Lines changed: 40 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
26 | | - | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
| 30 | + | |
| 31 | + | |
29 | 32 | | |
30 | 33 | | |
31 | 34 | | |
| |||
62 | 65 | | |
63 | 66 | | |
64 | 67 | | |
| 68 | + | |
65 | 69 | | |
66 | | - | |
| 70 | + | |
67 | 71 | | |
68 | 72 | | |
69 | 73 | | |
| |||
73 | 77 | | |
74 | 78 | | |
75 | 79 | | |
76 | | - | |
77 | 80 | | |
78 | 81 | | |
| 82 | + | |
79 | 83 | | |
80 | 84 | | |
81 | 85 | | |
82 | 86 | | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
83 | 90 | | |
84 | 91 | | |
85 | 92 | | |
| |||
97 | 104 | | |
98 | 105 | | |
99 | 106 | | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
100 | 110 | | |
101 | 111 | | |
102 | 112 | | |
| |||
110 | 120 | | |
111 | 121 | | |
112 | 122 | | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
113 | 145 | | |
114 | 146 | | |
115 | 147 | | |
| |||
143 | 175 | | |
144 | 176 | | |
145 | 177 | | |
146 | | - | |
147 | | - | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
148 | 182 | | |
149 | 183 | | |
150 | 184 | | |
| |||
205 | 239 | | |
206 | 240 | | |
207 | 241 | | |
208 | | - | |
| 242 | + | |
209 | 243 | | |
210 | 244 | | |
211 | 245 | | |
| |||
247 | 281 | | |
248 | 282 | | |
249 | 283 | | |
250 | | - | |
251 | 284 | | |
252 | 285 | | |
253 | 286 | | |
| |||
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | | - | |
| 12 | + | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
158 | 166 | | |
0 commit comments