manager: add animation to page back navigation#3197
Merged
Conversation
Signed-off-by: u9521 <63995396+u9521@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a shared pager-navigation state to centralize animated tab/page transitions, enabling homepage cards and back navigation to use the same animation behavior.
Changes:
- Introduce
MainPagerState(+rememberMainPagerState) to encapsulate animated pager navigation and selection tracking. - Wire
LocalMainPagerStatethroughMainScreenand migrate BottomBar/Home card navigation to callanimateToPage(...). - Update back handling to animate returning to page 0 via the new shared pager state.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| manager/app/src/main/java/me/weishu/kernelsu/ui/screen/Home.kt | Switch homepage Superuser/Module card clicks to animated pager navigation via LocalMainPagerState. |
| manager/app/src/main/java/me/weishu/kernelsu/ui/component/BottomBar.kt | Refactor bottom bar paging animation/selection logic into MainPagerState; BottomBar now delegates to it. |
| manager/app/src/main/java/me/weishu/kernelsu/ui/MainActivity.kt | Provide LocalMainPagerState, keep selection synced, and use it for animated “back to home page” behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Remove unused `LocalPagerState` CompositionLocal. - Use `mainPagerState.pagerState` directly in `LaunchedEffect` and `HorizontalPager`. - Clean up `CompositionLocalProvider` by removing the `LocalPagerState` provider. Signed-off-by: u9521 <63995396+u9521@users.noreply.github.com>
KOWX712
pushed a commit
to KOWX712/KernelSU
that referenced
this pull request
Feb 4, 2026
add missing superuser and module card navigation on the homepage and returning with new animations. --------- Signed-off-by: u9521 <63995396+u9521@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
add missing superuser and module card navigation on the homepage and returning with new animations.