-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit 99395b9
author
committedMihai-Cristian Condrea
feat: Refactor shortcuts screens to use a single activity
This commit refactors the shortcuts feature by replacing multiple individual activity classes for each shortcut category with a single, generic `ShortcutsCategoryActivity`. This new activity dynamically loads the appropriate layout and sets the title based on intent extras, significantly reducing boilerplate code.
- A new `ShortcutsCategoryActivity` is introduced to display different shortcut categories.
- The `ShortcutsActivity` now uses preference click listeners to launch `ShortcutsCategoryActivity` with the correct layout and title resource IDs.
- Removed seven separate activity classes and their corresponding manifest entries, consolidating the logic into the new generic activity.
- The `EdgeToEdgeHelper` is updated to correctly apply system bar colors based on the current theme.1 parent 460d528 commit 99395b9
File tree
12 files changed
+111
-327
lines changed- app/src/main
- java/com/d4rk/androidtutorials/java
- ui/screens/android/lessons/basics/shortcuts
- tabs
- utils
- res/xml
12 files changed
+111
-327
lines changedOriginal file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
197 | 197 |
| |
198 | 198 |
| |
199 | 199 |
| |
200 | - | ||
200 | + | ||
201 | 201 |
| |
202 | - | ||
203 | - | ||
204 | - | ||
205 | - | ||
206 | - | ||
207 | - | ||
208 | - | ||
209 | - | ||
210 | - | ||
211 | - | ||
212 | - | ||
213 | - | ||
214 | - | ||
215 | - | ||
216 | - | ||
217 | - | ||
202 | + | ||
218 | 203 |
| |
219 | 204 |
| |
220 | 205 |
| |
221 | 206 |
| |
222 | 207 |
| |
223 | 208 |
| |
224 | - | ||
225 | - | ||
226 | - | ||
227 | - | ||
228 | - | ||
229 | - | ||
230 | - | ||
231 | - | ||
232 | - | ||
233 | - | ||
234 | - | ||
235 | - | ||
236 | - | ||
237 | - | ||
238 | - | ||
239 | 209 |
| |
240 | 210 |
| |
241 | 211 |
| |
|
Lines changed: 25 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
5 | 5 |
| |
6 | 6 |
| |
7 | 7 |
| |
8 | + | ||
8 | 9 |
| |
9 | 10 |
| |
10 | 11 |
| |
11 | 12 |
| |
12 | 13 |
| |
13 | 14 |
| |
15 | + | ||
14 | 16 |
| |
15 | 17 |
| |
16 | 18 |
| |
| |||
30 | 32 |
| |
31 | 33 |
| |
32 | 34 |
| |
35 | + | ||
36 | + | ||
37 | + | ||
38 | + | ||
39 | + | ||
40 | + | ||
41 | + | ||
42 | + | ||
43 | + | ||
44 | + | ||
45 | + | ||
46 | + | ||
47 | + | ||
48 | + | ||
49 | + | ||
50 | + | ||
51 | + | ||
52 | + | ||
53 | + | ||
54 | + | ||
55 | + | ||
56 | + | ||
33 | 57 |
| |
34 | 58 |
| |
35 | - | ||
59 | + |
Lines changed: 0 additions & 24 deletions
This file was deleted.
Lines changed: 0 additions & 24 deletions
This file was deleted.
Lines changed: 0 additions & 25 deletions
This file was deleted.
Lines changed: 0 additions & 24 deletions
This file was deleted.
Lines changed: 0 additions & 106 deletions
This file was deleted.
Lines changed: 0 additions & 24 deletions
This file was deleted.
Lines changed: 59 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 | + | ||
52 | + | ||
53 | + | ||
54 | + | ||
55 | + | ||
56 | + | ||
57 | + | ||
58 | + | ||
59 | + |
0 commit comments