-
Notifications
You must be signed in to change notification settings - Fork 0
Enhance/transition #295
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
Merged
Merged
Enhance/transition #295
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
5d9dc87
sharedElementによるアニメーション追加
ptkNktq 58248c1
SharedTransitionScope, AnimatedVisibilityScopeをCompositionLocalで渡すように変更
ptkNktq a846f05
rememberSharedContentStateのkeyを統一
ptkNktq 5c73995
詳細の画面遷移グラフ変更
ptkNktq 221d080
重複してるScaffold削除
ptkNktq 79d2ccb
hasBackContentをやめてonBackがnullかどうかで判定
ptkNktq 8204dd1
特定の画面で←ボタン表示できるように変更
ptkNktq 4dc8a69
onBackがnullのときのTopBarの見た目修正
ptkNktq a54919c
onBackの生成処理修正
ptkNktq 747e729
←が表示されてないときはタップできないように変更
ptkNktq 4f1d408
ScreenshotTest.kt一時的にコメントアウト
ptkNktq File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
Oops, something went wrong.
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.
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.
🧩 Analysis chain
🏁 Script executed:
cat -n AndroidApp/ui/src/main/kotlin/me/nya_n/notificationnotifier/ui/screen/app/AppScreen.kt | head -130Repository: ptkNktq/AndroidNotificationNotifier
Length of output: 6222
🏁 Script executed:
Repository: ptkNktq/AndroidNotificationNotifier
Length of output: 375
🏁 Script executed:
Repository: ptkNktq/AndroidNotificationNotifier
Length of output: 223
🏁 Script executed:
Repository: ptkNktq/AndroidNotificationNotifier
Length of output: 4381
🏁 Script executed:
Repository: ptkNktq/AndroidNotificationNotifier
Length of output: 1065
🏁 Script executed:
Repository: ptkNktq/AndroidNotificationNotifier
Length of output: 436
🏁 Script executed:
Repository: ptkNktq/AndroidNotificationNotifier
Length of output: 521
🌐 Web query:
androidx.navigation:navigation-compose 2.9.6 composable lambda scope AnimatedVisibilityScope AnimatedContentScope💡 Result:
Short answer: In navigation-compose 2.9.6 the destination content lambda is invoked with an AnimatedContentScope receiver (which is a sealed interface that extends AnimatedVisibilityScope). The NavHost/composable transition lambdas use AnimatedContentTransitionScope. See the API docs:
Sources:
[1] Android NavHost / composable API reference.
[2] AnimatedVisibilityScope API reference.
[3] Compose AnimatedContent source (AnimatedContentScope implements AnimatedVisibilityScope).
🌐 Web query:
SharedTransitionLayout androidx.compose.animation 2025 SharedElement sharedElement scope requirements💡 Result:
Short answer — requirements and rules for SharedTransitionLayout / SharedTransitionScope and Modifier.sharedElement:
References: Android Compose Animation docs (SharedTransitionLayout / SharedTransitionScope / shared elements). [1][2][3]
Sources
[1] API docs — SharedTransitionLayout / overview.
[2] API docs — SharedTransitionScope / sharedElement details.
[3] Guide — Shared elements with Navigation / AnimatedContent examples.
Gson からの null 返却を処理してください
行 109-112 の
Gson().fromJson()は JSON 解析に失敗したり、引数が null/空の場合に null を返しますが、null チェックがないため DetailScreen に null を渡す可能性があります。以下のように修正してください:SharedTransitionLayout と AnimatedVisibilityScope の型は互換性があります(AnimatedContentScope は AnimatedVisibilityScope を継承)。