Skip to content

Commit 8e22485

Browse files
riggaroogithub-actions[bot]
authored andcommitted
Apply Spotless
1 parent d6e029f commit 8e22485

File tree

5 files changed

+110
-38
lines changed

5 files changed

+110
-38
lines changed

compose/snippets/src/main/java/com/example/compose/snippets/animations/sharedelement/BasicSharedElementSnippets.kt

Lines changed: 29 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/*
2+
* Copyright 2024 The Android Open Source Project
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
117
@file:OptIn(ExperimentalSharedTransitionApi::class)
218

319
package com.example.compose.snippets.animations.sharedelement
@@ -115,10 +131,10 @@ private class SharedElementBasicUsage1 {
115131
// [START_EXCLUDE]
116132
Text(
117133
"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur sit amet lobortis velit. " +
118-
"Lorem ipsum dolor sit amet, consectetur adipiscing elit." +
119-
" Curabitur sagittis, lectus posuere imperdiet facilisis, nibh massa " +
120-
"molestie est, quis dapibus orci ligula non magna. Pellentesque rhoncus " +
121-
"hendrerit massa quis ultricies. Curabitur congue ullamcorper leo, at maximus"
134+
"Lorem ipsum dolor sit amet, consectetur adipiscing elit." +
135+
" Curabitur sagittis, lectus posuere imperdiet facilisis, nibh massa " +
136+
"molestie est, quis dapibus orci ligula non magna. Pellentesque rhoncus " +
137+
"hendrerit massa quis ultricies. Curabitur congue ullamcorper leo, at maximus"
122138
)
123139
// [END_EXCLUDE]
124140
}
@@ -222,18 +238,16 @@ private class SharedElementBasicUsage2 {
222238
// [START_EXCLUDE]
223239
Text(
224240
"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur sit amet lobortis velit. " +
225-
"Lorem ipsum dolor sit amet, consectetur adipiscing elit." +
226-
" Curabitur sagittis, lectus posuere imperdiet facilisis, nibh massa " +
227-
"molestie est, quis dapibus orci ligula non magna. Pellentesque rhoncus " +
228-
"hendrerit massa quis ultricies. Curabitur congue ullamcorper leo, at maximus"
241+
"Lorem ipsum dolor sit amet, consectetur adipiscing elit." +
242+
" Curabitur sagittis, lectus posuere imperdiet facilisis, nibh massa " +
243+
"molestie est, quis dapibus orci ligula non magna. Pellentesque rhoncus " +
244+
"hendrerit massa quis ultricies. Curabitur congue ullamcorper leo, at maximus"
229245
)
230246
// [END_EXCLUDE]
231247
}
232248
}
233249
}
234250

235-
236-
237251
private class SharedElementBasicUsage3 {
238252

239253
@Preview
@@ -354,10 +368,10 @@ private class SharedElementBasicUsage3 {
354368
// [START_EXCLUDE]
355369
Text(
356370
"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur sit amet lobortis velit. " +
357-
"Lorem ipsum dolor sit amet, consectetur adipiscing elit." +
358-
" Curabitur sagittis, lectus posuere imperdiet facilisis, nibh massa " +
359-
"molestie est, quis dapibus orci ligula non magna. Pellentesque rhoncus " +
360-
"hendrerit massa quis ultricies. Curabitur congue ullamcorper leo, at maximus"
371+
"Lorem ipsum dolor sit amet, consectetur adipiscing elit." +
372+
" Curabitur sagittis, lectus posuere imperdiet facilisis, nibh massa " +
373+
"molestie est, quis dapibus orci ligula non magna. Pellentesque rhoncus " +
374+
"hendrerit massa quis ultricies. Curabitur congue ullamcorper leo, at maximus"
361375
)
362376
// [END_EXCLUDE]
363377
}
@@ -366,7 +380,6 @@ private class SharedElementBasicUsage3 {
366380
// [END android_compose_animations_shared_element_step2]
367381
}
368382

369-
370383
@Preview
371384
@Composable
372385
private fun SharedElement_ManualVisibleControl() {
@@ -464,4 +477,4 @@ private fun UnmatchedBoundsExample() {
464477
}
465478
}
466479
// [END android_compose_animation_shared_element_bounds_unmatched]
467-
}
480+
}

compose/snippets/src/main/java/com/example/compose/snippets/animations/sharedelement/CustomizeSharedElementsSnippets.kt

Lines changed: 26 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/*
2+
* Copyright 2024 The Android Open Source Project
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
117
@file:OptIn(ExperimentalSharedTransitionApi::class)
218

319
package com.example.compose.snippets.animations.sharedelement
@@ -67,7 +83,6 @@ import com.example.compose.snippets.R
6783
import com.example.compose.snippets.ui.theme.LavenderLight
6884
import com.example.compose.snippets.ui.theme.RoseLight
6985

70-
7186
private class SharedElementBoundsTransform {
7287
@Preview
7388
@Composable
@@ -221,18 +236,16 @@ private class SharedElementBoundsTransform {
221236
)
222237
Text(
223238
"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur sit amet lobortis velit. " +
224-
"Lorem ipsum dolor sit amet, consectetur adipiscing elit." +
225-
" Curabitur sagittis, lectus posuere imperdiet facilisis, nibh massa " +
226-
"molestie est, quis dapibus orci ligula non magna. Pellentesque rhoncus " +
227-
"hendrerit massa quis ultricies. Curabitur congue ullamcorper leo, at maximus"
239+
"Lorem ipsum dolor sit amet, consectetur adipiscing elit." +
240+
" Curabitur sagittis, lectus posuere imperdiet facilisis, nibh massa " +
241+
"molestie est, quis dapibus orci ligula non magna. Pellentesque rhoncus " +
242+
"hendrerit massa quis ultricies. Curabitur congue ullamcorper leo, at maximus"
228243
)
229244
}
230245
}
231246
}
232247
}
233248

234-
235-
236249
@Preview
237250
@Composable
238251
private fun SharedElement_Clipping() {
@@ -277,7 +290,7 @@ private fun SharedElement_Clipping() {
277290
rememberSharedContentState(key = "title"),
278291
animatedVisibilityScope = this@AnimatedContent,
279292

280-
)
293+
)
281294
)
282295
}
283296
} else {
@@ -315,10 +328,10 @@ private fun SharedElement_Clipping() {
315328
)
316329
Text(
317330
"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur sit amet lobortis velit. " +
318-
"Lorem ipsum dolor sit amet, consectetur adipiscing elit." +
319-
" Curabitur sagittis, lectus posuere imperdiet facilisis, nibh massa " +
320-
"molestie est, quis dapibus orci ligula non magna. Pellentesque rhoncus " +
321-
"hendrerit massa quis ultricies. Curabitur congue ullamcorper leo, at maximus"
331+
"Lorem ipsum dolor sit amet, consectetur adipiscing elit." +
332+
" Curabitur sagittis, lectus posuere imperdiet facilisis, nibh massa " +
333+
"molestie est, quis dapibus orci ligula non magna. Pellentesque rhoncus " +
334+
"hendrerit massa quis ultricies. Curabitur congue ullamcorper leo, at maximus"
322335
)
323336
}
324337
}
@@ -546,4 +559,4 @@ fun PlaceholderSizeAnimated_Demo() {
546559
}
547560
}
548561
// [END android_compose_shared_element_placeholder_size]
549-
}
562+
}

compose/snippets/src/main/java/com/example/compose/snippets/animations/sharedelement/SharedBoundsSnippets.kt

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/*
2+
* Copyright 2024 The Android Open Source Project
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
117
@file:OptIn(ExperimentalSharedTransitionApi::class)
218

319
package com.example.compose.snippets.animations.sharedelement
@@ -172,14 +188,14 @@ private class SharedElementBasicUsage4 {
172188
)
173189
Text(
174190
"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur sit amet lobortis velit. " +
175-
"Lorem ipsum dolor sit amet, consectetur adipiscing elit." +
176-
" Curabitur sagittis, lectus posuere imperdiet facilisis, nibh massa " +
177-
"molestie est, quis dapibus orci ligula non magna. Pellentesque rhoncus " +
178-
"hendrerit massa quis ultricies. Curabitur congue ullamcorper leo, at maximus"
191+
"Lorem ipsum dolor sit amet, consectetur adipiscing elit." +
192+
" Curabitur sagittis, lectus posuere imperdiet facilisis, nibh massa " +
193+
"molestie est, quis dapibus orci ligula non magna. Pellentesque rhoncus " +
194+
"hendrerit massa quis ultricies. Curabitur congue ullamcorper leo, at maximus"
179195
)
180196
// [END_EXCLUDE]
181197
}
182198
}
183199
}
184200
// [END android_compose_animations_shared_element_shared_bounds]
185-
}
201+
}

compose/snippets/src/main/java/com/example/compose/snippets/animations/sharedelement/SharedElementCommonUseCaseSnippets.kt

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/*
2+
* Copyright 2024 The Android Open Source Project
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
117
@file:OptIn(ExperimentalSharedTransitionApi::class)
218

319
package com.example.compose.snippets.animations.sharedelement
@@ -22,7 +38,6 @@ import androidx.compose.ui.unit.dp
2238
import coil.compose.AsyncImage
2339
import coil.request.ImageRequest
2440

25-
2641
@Preview
2742
@Composable
2843
private fun SharedAsyncImage() {
@@ -81,4 +96,4 @@ private fun SharedElementTypicalUseText() {
8196
// [END android_compose_shared_element_text_tip]
8297
}
8398
}
84-
}
99+
}

compose/snippets/src/main/java/com/example/compose/snippets/animations/sharedelement/SharedElementsWithNavigationSnippets.kt

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/*
2+
* Copyright 2024 The Android Open Source Project
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
117
@file:OptIn(ExperimentalSharedTransitionApi::class)
218

319
package com.example.compose.snippets.animations.sharedelement
@@ -37,7 +53,6 @@ import androidx.navigation.compose.rememberNavController
3753
import androidx.navigation.navArgument
3854
import com.example.compose.snippets.R
3955

40-
4156
val listSnacks = listOf(
4257
Snack("Cupcake", "", R.drawable.cupcake),
4358
Snack("Donut", "", R.drawable.donut),
@@ -149,4 +164,4 @@ data class Snack(
149164
val name: String,
150165
val description: String,
151166
@DrawableRes val image: Int
152-
)
167+
)

0 commit comments

Comments
 (0)