Commit 5c17818
committed
Feat(Icons): Add custom default app icon
This commit introduces a new vector drawable `ic_default_app.xml` to be used as a placeholder icon when an application's icon cannot be loaded.
The following changes were made:
- Added `app/src/main/res/drawable/ic_default_app.xml` which defines a four-quadrant colored square with a central waiting ring.
- Modified `HomeFragment.kt` to use `R.drawable.ic_default_app` as a fallback when `PackageManager.NameNotFoundException` or other exceptions occur while trying to load an app icon.
- Modified `AppDrawerAdapter.kt` to use `R.drawable.ic_default_app` as a fallback when `PackageManager.NameNotFoundException` or other exceptions occur while trying to load an app icon.
Signed-off-by: CreativeCodeCat <[email protected]>1 parent ca57911 commit 5c17818
File tree
3 files changed
+39
-4
lines changed- app/src/main
- java/com/github/droidworksstudio/mlauncher/ui
- res/drawable
3 files changed
+39
-4
lines changedLines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
521 | 521 | | |
522 | 522 | | |
523 | 523 | | |
524 | | - | |
| 524 | + | |
525 | 525 | | |
526 | 526 | | |
527 | 527 | | |
528 | | - | |
| 528 | + | |
529 | 529 | | |
530 | 530 | | |
531 | 531 | | |
| |||
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| |||
1019 | 1020 | | |
1020 | 1021 | | |
1021 | 1022 | | |
1022 | | - | |
| 1023 | + | |
1023 | 1024 | | |
1024 | 1025 | | |
1025 | 1026 | | |
1026 | | - | |
| 1027 | + | |
1027 | 1028 | | |
1028 | 1029 | | |
1029 | 1030 | | |
| |||
| 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 | + | |
0 commit comments