-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Refactor Settings Compose Setup #12385
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: refactor
Are you sure you want to change the base?
Refactor Settings Compose Setup #12385
Conversation
f6f594e to
d4751ee
Compare
d4751ee to
47ddaed
Compare
47ddaed to
39a89d4
Compare
| colors = TopAppBarDefaults.topAppBarColors( | ||
| containerColor = MaterialTheme.colorScheme.primary, | ||
| titleContentColor = MaterialTheme.colorScheme.onPrimary, | ||
| ), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better remove this, since I have raised a PR to migrate to the Material 3 color scheme: #12654
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense. Will update this PR after your Material 3 PR is merged.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Undone the toolbar colors to unblock this PR as the Theming is being handled in #12654. Let us handle the Jetpack compose theming as well in your PR.
|
It would be nice to switch to navigation3 to avoid more migration work whenever that hits stable. I will do that afterwards. |
That would be nice. I can take a look at Navigation 3. Quick question: are we looking for a specific feature in Navigation 3, or are we considering it mainly because it is newer and designed for Jetpack Compose? I’m a bit skeptical as the official documentation mentions that the library is still in alpha. |
This PR refines the Settings screen setup using Jetpack Compose: * **Navigation Routing**: Updated navigation logic to use **Serialized Routes**, as recommended in the [official Compose navigation documentation](https://developer.android.com/develop/ui/compose/navigation). * **Screen Title Management**: Migrated screen title handling to a Compose-native approach instead of using `addOnDestinationChangedListener`. * **Toolbar Enhancements**: * Refined the toolbar layout and styling to improve alignment with Material theming. * Implemented proper ripple effects and consistent color usage. * Fixed back navigation behavior to align with Compose conventions. * **Theming Note**: The current Compose-based theme system does not yet fully replicate the color palette used in the legacy (pre-Compose) implementation, especially across different services. A `TODO` has been added in code, and a separate task will be created to address this comprehensively.
39a89d4 to
d06244f
Compare
What is it?
Description of the changes in your PR
This PR refines the Settings screen setup using Jetpack Compose:
addOnDestinationChangedListener.TODOhas been added in code, and a separate task will be created to address this comprehensively.Before/After Screenshots/Screen Record
Fixes the following issue(s)
Relies on the following changes
APK testing
The APK can be found by going to the "Checks" tab below the title. On the left pane, click on "CI", scroll down to "artifacts" and click "app" to download the zip file which contains the debug APK of this PR. You can find more info and a video demonstration on this wiki page.
Due diligence