Commit e89166e
committed
Refactor: Replace individual code-view activities with a shared
This commit refactors the "show code" functionality by introducing a single, reusable `LessonCodeTabsActivity`. This new activity replaces numerous boilerplate `...CodeActivity` classes that all performed the same function: displaying code and layout tabs for a specific lesson.
Key changes:
- A new generic `LessonCodeTabsActivity` is created to display fragments in a tabbed layout, configured via an `Intent`.
- All individual `...CodeActivity` files (e.g., `ButtonsCodeActivity`, `RoomCodeActivity`) have been deleted.
- Lesson activities (e.g., `ButtonsActivity`, `RoomActivity`) are updated to use the new shared activity, simplifying their intent creation logic.
- The `AndroidManifest.xml` has been cleaned up by removing declarations for the deleted activities and adding the new shared one.
- The app theme is updated to `AppThemeActionBar`.LessonCodeTabsActivity
1 parent ae5f161 commit e89166e
File tree
22 files changed
+423
-838
lines changed- app/src/main
- java/com/d4rk/androidtutorials/java/ui/screens/android/lessons
- buttons/buttons
- clocks/clock
- common
- data/room
- layouts
- linear
- relative
- table
- networking/retrofit
- progress/progressbar
- views
- images
- spinner
22 files changed
+423
-838
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
80 | 86 | | |
81 | 87 | | |
82 | 88 | | |
| |||
98 | 104 | | |
99 | 105 | | |
100 | 106 | | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | 107 | | |
107 | 108 | | |
108 | 109 | | |
109 | 110 | | |
110 | 111 | | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | 112 | | |
117 | 113 | | |
118 | 114 | | |
| |||
133 | 129 | | |
134 | 130 | | |
135 | 131 | | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | 132 | | |
142 | 133 | | |
143 | 134 | | |
| |||
149 | 140 | | |
150 | 141 | | |
151 | 142 | | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | 143 | | |
158 | 144 | | |
159 | 145 | | |
| |||
211 | 197 | | |
212 | 198 | | |
213 | 199 | | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | 200 | | |
220 | 201 | | |
221 | 202 | | |
222 | 203 | | |
223 | 204 | | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | 205 | | |
230 | 206 | | |
231 | 207 | | |
232 | 208 | | |
233 | 209 | | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | 210 | | |
240 | 211 | | |
241 | 212 | | |
242 | 213 | | |
243 | 214 | | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | 215 | | |
250 | 216 | | |
251 | 217 | | |
| |||
308 | 274 | | |
309 | 275 | | |
310 | 276 | | |
311 | | - | |
312 | | - | |
313 | | - | |
314 | | - | |
315 | | - | |
316 | 277 | | |
317 | 278 | | |
318 | 279 | | |
319 | 280 | | |
320 | 281 | | |
321 | 282 | | |
322 | 283 | | |
323 | | - | |
324 | | - | |
325 | | - | |
326 | | - | |
327 | | - | |
328 | 284 | | |
329 | 285 | | |
330 | 286 | | |
331 | 287 | | |
332 | 288 | | |
333 | | - | |
334 | | - | |
| 289 | + | |
335 | 290 | | |
336 | 291 | | |
337 | 292 | | |
| |||
Lines changed: 19 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | 3 | | |
5 | 4 | | |
6 | 5 | | |
| |||
9 | 8 | | |
10 | 9 | | |
11 | 10 | | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
12 | 14 | | |
13 | 15 | | |
14 | 16 | | |
15 | 17 | | |
| 18 | + | |
16 | 19 | | |
17 | 20 | | |
18 | 21 | | |
| |||
49 | 52 | | |
50 | 53 | | |
51 | 54 | | |
52 | | - | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
53 | 70 | | |
54 | 71 | | |
55 | 72 | | |
| |||
Lines changed: 0 additions & 76 deletions
This file was deleted.
Lines changed: 19 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | 3 | | |
5 | 4 | | |
6 | 5 | | |
| |||
9 | 8 | | |
10 | 9 | | |
11 | 10 | | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
12 | 14 | | |
13 | 15 | | |
14 | 16 | | |
| 17 | + | |
15 | 18 | | |
16 | 19 | | |
17 | 20 | | |
| |||
31 | 34 | | |
32 | 35 | | |
33 | 36 | | |
34 | | - | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
35 | 52 | | |
36 | 53 | | |
37 | 54 | | |
| |||
Lines changed: 0 additions & 76 deletions
This file was deleted.
0 commit comments