Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 29f8445

Browse files
update version
1 parent 13584f0 commit 29f8445

8 files changed

+23
-22
lines changed

‎Tutorial1-1Basics/src/main/java/com/smarttoolfactory/tutorial1_1basics/chapter9_animation/SharedElementTransition1.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ fun ListToDetailsDemo() {
121121
Modifier.sharedElement(
122122
// 🔥 key should match for
123123
// shared element transitions
124-
state = rememberSharedContentState(key = "item-image$item"),
124+
sharedContentState = rememberSharedContentState(key = "item-image$item"),
125125
animatedVisibilityScope = this@AnimatedContent,
126126
)
127127
} else Modifier

‎Tutorial1-1Basics/src/main/java/com/smarttoolfactory/tutorial1_1basics/chapter9_animation/SharedElementTransition3AnimatedVisibility.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ private fun AnimatedVisibilitySharedElementShortenedExample() {
9292
SnackContents(
9393
snack = snack,
9494
modifier = Modifier.sharedElement(
95-
state = rememberSharedContentState(key = snack.name),
95+
sharedContentState = rememberSharedContentState(key = snack.name),
9696
animatedVisibilityScope = this@AnimatedVisibility
9797
),
9898
onClick = {
@@ -114,6 +114,7 @@ private fun AnimatedVisibilitySharedElementShortenedExample() {
114114
// [END android_compose_shared_elements_animated_visibility]
115115
}
116116

117+
@OptIn(ExperimentalSharedTransitionApi::class)
117118
@Composable
118119
fun SharedTransitionScope.SnackEditDetails(
119120
snack: Snack?,
@@ -156,7 +157,7 @@ fun SharedTransitionScope.SnackEditDetails(
156157
SnackContents(
157158
snack = targetSnack,
158159
modifier = Modifier.sharedElement(
159-
state = rememberSharedContentState(key = targetSnack.name),
160+
sharedContentState = rememberSharedContentState(key = targetSnack.name),
160161
animatedVisibilityScope = this@AnimatedContent,
161162
),
162163
onClick = {

‎Tutorial1-1Basics/src/main/java/com/smarttoolfactory/tutorial1_1basics/chapter9_animation/SharedElementTransition3AnimatedVisibilityBlur.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ fun SharedTransitionScope.SnackItem(
135135
SnackContents(
136136
snack = snack,
137137
modifier = Modifier.sharedElement(
138-
state = rememberSharedContentState(key = snack.name),
138+
sharedContentState = rememberSharedContentState(key = snack.name),
139139
animatedVisibilityScope = this@AnimatedVisibility,
140140
boundsTransform = boundsTransition,
141141
),

‎Tutorial1-1Basics/src/main/java/com/smarttoolfactory/tutorial1_1basics/chapter9_animation/SharedElementTransition6RenderOverlay.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ fun SharedElementRenderInSharedTransitionScopeOverlay() {
150150
painter = painterResource(images[item % 3]),
151151
modifier = Modifier
152152
.sharedElement(
153-
state = rememberSharedContentState(key = "item-image$item"),
153+
sharedContentState = rememberSharedContentState(key = "item-image$item"),
154154
animatedVisibilityScope = this@AnimatedContent,
155155
)
156156
.fillMaxWidth(),

‎Tutorial1-1Basics/src/main/java/com/smarttoolfactory/tutorial1_1basics/chapter9_animation/SharedElementTransition7PlaceHolderSize.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@file:OptIn(ExperimentalSharedTransitionApi::class)
1+
@file:OptIn(ExperimentalSharedTransitionApi::class, ExperimentalSharedTransitionApi::class)
22

33
package com.smarttoolfactory.tutorial1_1basics.chapter9_animation
44

@@ -177,7 +177,7 @@ fun SharedElement_PlaceholderSize() {
177177
painter = painterResource(listSnacks[index].image),
178178
modifier = Modifier
179179
.sharedElement(
180-
state = rememberSharedContentState(key = "item-image$index"),
180+
sharedContentState = rememberSharedContentState(key = "item-image$index"),
181181
animatedVisibilityScope = this@AnimatedContent,
182182
// 🔥 Changing placeHolderSize effects how other
183183
// items will react during animation

‎Tutorial1-1Basics/src/main/java/com/smarttoolfactory/tutorial1_1basics/chapter9_animation/SharedElementTransition9SheetToScreen.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ private fun SharedElementsample() {
8888
painter = painterResource(item),
8989
modifier = Modifier
9090
.sharedElement(
91-
state = rememberSharedContentState(key = item),
91+
sharedContentState = rememberSharedContentState(key = item),
9292
animatedVisibilityScope = this@composable,
9393
boundsTransform = gridBoundsTransform
9494
)
@@ -228,7 +228,7 @@ private fun ImageItem(
228228
with(sharedTransitionScope) {
229229
Image(
230230
modifier = Modifier.sharedElement(
231-
state = rememberSharedContentState(key = uri),
231+
sharedContentState = rememberSharedContentState(key = uri),
232232
animatedVisibilityScope = animatedContentScope,
233233
boundsTransform = gridBoundsTransform
234234
).clickable {

‎Tutorial1-1Basics/src/main/java/com/smarttoolfactory/tutorial1_1basics/chapter9_animation/SharedElementTransition9SheetToScreen2.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ fun BottomSheetImagePicker() {
166166
painter = painterResource(item),
167167
modifier = Modifier
168168
.sharedElement(
169-
state = rememberSharedContentState(key = item),
169+
sharedContentState = rememberSharedContentState(key = item),
170170
animatedVisibilityScope = this@AnimatedContent,
171171
boundsTransform = gridBoundsTransform
172172
)
@@ -200,7 +200,7 @@ fun BottomSheetImagePicker() {
200200
}
201201
.size(width, height)
202202
.sharedElement(
203-
state = rememberSharedContentState(key = item),
203+
sharedContentState = rememberSharedContentState(key = item),
204204
animatedVisibilityScope = this@AnimatedContent,
205205
boundsTransform = gridBoundsTransform
206206
),

‎gradle/libs.versions.toml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,22 @@
66
accompanist = "0.36.0"
77
accompanistCoil = "0.6.2"
88
activityCompose = "1.9.3"
9-
androidGradlePlugin = "8.9.0-rc01"
9+
androidGradlePlugin = "8.9.2"
1010
androidx-activity-compose = "1.10.1"
1111
androidx-appcompat = "1.7.0"
12-
androidx-benchmark = "1.3.3"
13-
androidx-benchmark-junit4 = "1.3.3"
14-
androidx-compose-bom = "2025.02.00"
15-
androidx-compose-latest = "1.7.8"
12+
androidx-benchmark = "1.3.4"
13+
androidx-benchmark-junit4 = "1.3.4"
14+
androidx-compose-bom = "2025.05.00"
15+
androidx-compose-latest = "1.8.1"
1616
androidx-compose-material3 = "1.3.0"
1717
androidx-compose-material3-adaptive = "1.0.0"
1818
androidx-constraintlayout = "1.1.1"
1919
androidx-core-splashscreen = "1.0.1"
20-
androidx-corektx = "1.15.0"
21-
androidx-lifecycle-compose = "2.8.7"
22-
androidx-lifecycle-runtime-compose = "2.8.7"
23-
androidx-navigation = "2.8.8"
24-
kotlinxSerializationJson = "1.6.3"
20+
androidx-corektx = "1.16.0"
21+
androidx-lifecycle-compose = "2.9.0"
22+
androidx-lifecycle-runtime-compose = "2.9.0"
23+
androidx-navigation = "2.9.0"
24+
kotlinxSerializationJson = "1.8.0"
2525
kotlinxSerialization = "2.0.20"
2626
androidx-test = "1.6.1"
2727
androidx-test-espresso = "3.6.1"
@@ -48,7 +48,7 @@ junitVersion = "1.2.1"
4848
junitVintageEngine = "5.10.1"
4949
kotlin = "2.1.0"
5050
kotlinTest = "2.0.20"
51-
kotlinx_immutable = "1.9.0"
51+
kotlinx_immutable = "1.10.2"
5252
kotlinxCoroutinesTest = "1.9.0"
5353
ksp = "2.0.20-1.0.25"
5454
lifecycleRuntimeCompose = "2.8.6"

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /