Commit 710ef16
committed
refactor(settings): Replace AndroidView with Compose Text
This commit refactors the settings UI by replacing `AndroidView` wrappers around `FontAppCompatTextView` with native Jetpack Compose `Text` and `ClickableHtmlText` composable.
This change eliminates the need for the `AndroidView` interop for displaying simple and HTML-styled text, resulting in a more streamlined and pure-Compose implementation.
The key changes include:
- Introduction of `ClickableHtmlText`, a new composable function that handles HTML parsing and makes embedded links clickable using `buildAnnotatedString`.
- The `TitleWithHtmlLink` composable has been removed and its functionality absorbed into the more versatile `TitleWithHtmlLinks`.
- Various settings composable (`SettingsHeader`, `SettingsItem`, `SettingsSelect`, `SettingsSwitch`, and `TitleWithHtmlLinks`) have been updated to use the native `Text` composable, removing `AndroidView` and `FontAppCompatTextView`.
- In the "About" section, links for the GitHub repository and privacy policy have been added for better user navigation.
- The `created_by` link in `nontranslatable.xml` has been updated to point to the correct GitHub organization.1 parent 2802817 commit 710ef16
File tree
3 files changed
+177
-227
lines changed- app/src/main
- java/com/github/droidworksstudio/mlauncher/ui
- compose
- res/values
3 files changed
+177
-227
lines changedLines changed: 13 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
100 | | - | |
101 | 100 | | |
102 | 101 | | |
103 | 102 | | |
| |||
491 | 490 | | |
492 | 491 | | |
493 | 492 | | |
494 | | - | |
| 493 | + | |
495 | 494 | | |
496 | 495 | | |
497 | 496 | | |
| |||
2688 | 2687 | | |
2689 | 2688 | | |
2690 | 2689 | | |
| 2690 | + | |
| 2691 | + | |
| 2692 | + | |
| 2693 | + | |
| 2694 | + | |
2691 | 2695 | | |
2692 | 2696 | | |
2693 | | - | |
| 2697 | + | |
2694 | 2698 | | |
2695 | | - | |
| 2699 | + | |
| 2700 | + | |
| 2701 | + | |
2696 | 2702 | | |
2697 | | - | |
| 2703 | + | |
| 2704 | + | |
2698 | 2705 | | |
2699 | 2706 | | |
2700 | 2707 | | |
| |||
2717 | 2724 | | |
2718 | 2725 | | |
2719 | 2726 | | |
| 2727 | + | |
2720 | 2728 | | |
2721 | 2729 | | |
2722 | 2730 | | |
| |||
0 commit comments