-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit 0dc6b98
committed
Refactor: Introduce LessonUiUtils to simplify lesson UI setup
This commit introduces a new `LessonUiUtils` class to centralize and simplify the setup of the description section in various lesson activities.
Key changes include:
- A new `setupDescriptionSection` method in `LessonUiUtils` that handles setting the description text, header, layout preview header, and loading the banner ad.
- Refactoring multiple lesson activities (`LinearLayoutActivity`, `ChronometerActivity`, `ImageButtonsActivity`, etc.) to use the new utility method, reducing repetitive code.
- Minor code cleanup, including import reordering in several files.1 parent 86f0f20 commit 0dc6b98
File tree
28 files changed
+136
-68
lines changed- app/src
- main/java/com/d4rk/androidtutorials/java/ui
- screens/android/lessons
- alerts
- alertdialog
- snackbar
- basics/shortcuts/tabs
- clocks
- chronometer
- clock
- datepicker
- timepicker
- layouts
- linear
- relative
- table
- networking/retrofit
- notifications
- inbox
- simple
- progress/progressbar
- textboxes/textbox
- views
- images
- spinner
- utils
- test/java/com/d4rk/androidtutorials/java
- ads
- data/repository
- startup
28 files changed
+136
-68
lines changedLines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | + | ||
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | + | ||
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | + | ||
9 | + | ||
10 | + | ||
8 | 11 | | |
9 | 12 | | |
13 | + | ||
10 | 14 | | |
11 | 15 | | |
12 | 16 | | |
13 | - | ||
14 | 17 | | |
15 | 18 | | |
16 | 19 | | |
17 | 20 | | |
18 | 21 | | |
19 | - | ||
20 | - | ||
21 | - | ||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
Lines changed: 7 additions & 6 deletions
| 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 | | |
12 | 13 | | |
13 | 14 | | |
14 | - | ||
15 | 15 | | |
16 | 16 | | |
17 | + | ||
18 | + | ||
17 | 19 | | |
18 | 20 | | |
19 | 21 | | |
| |||
24 | 26 | | |
25 | 27 | | |
26 | 28 | | |
27 | - | ||
28 | - | ||
29 | - | ||
30 | - | ||
29 | + | ||
30 | + | ||
31 | + | ||
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | + | ||
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
Lines changed: 5 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | + | ||
5 | 6 | | |
6 | - | ||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | + | ||
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
23 | - | ||
24 | - | ||
25 | - | ||
26 | - | ||
24 | + | ||
25 | + | ||
26 | + | ||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| |||
Lines changed: 5 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | + | ||
5 | 6 | | |
6 | - | ||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | + | ||
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
25 | - | ||
26 | - | ||
27 | - | ||
28 | - | ||
26 | + | ||
27 | + | ||
28 | + | ||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| |||
Lines changed: 4 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | - | ||
11 | 10 | | |
12 | 11 | | |
13 | 12 | | |
13 | + | ||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | - | ||
28 | - | ||
29 | - | ||
30 | - | ||
27 | + | ||
28 | + | ||
29 | + | ||
31 | 30 | | |
32 | 31 | | |
33 | 32 | | |
| |||
Lines changed: 7 additions & 6 deletions
| 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 | | |
12 | 13 | | |
13 | - | ||
14 | 14 | | |
15 | 15 | | |
16 | + | ||
17 | + | ||
16 | 18 | | |
17 | 19 | | |
18 | 20 | | |
| |||
23 | 25 | | |
24 | 26 | | |
25 | 27 | | |
26 | - | ||
27 | - | ||
28 | - | ||
29 | - | ||
28 | + | ||
29 | + | ||
30 | + | ||
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | + | ||
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
0 commit comments