From c85963d9d4dd94536c82fe3f09af183a9dd28ec4 Mon Sep 17 00:00:00 2001 From: jakeroseman Date: Mon, 9 Dec 2024 12:27:30 +0000 Subject: [PATCH] Apply Spotless --- .../snippets/components/SwipeToDismissBox.kt | 30 ++++++++++++++----- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/compose/snippets/src/main/java/com/example/compose/snippets/components/SwipeToDismissBox.kt b/compose/snippets/src/main/java/com/example/compose/snippets/components/SwipeToDismissBox.kt index 021379ac..09072c46 100644 --- a/compose/snippets/src/main/java/com/example/compose/snippets/components/SwipeToDismissBox.kt +++ b/compose/snippets/src/main/java/com/example/compose/snippets/components/SwipeToDismissBox.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2024 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.example.compose.snippets.components import androidx.compose.animation.animateColorAsState @@ -210,10 +226,10 @@ fun SwipeCardItem( SwipeToDismissBoxValue.StartToEnd -> lerp(Color.LightGray, Color.Blue, swipeToDismissState.progress) - SwipeToDismissBoxValue.EndToStart -> lerp(Color.LightGray, Color.Red, swipeToDismissState.progress) - }, label = "swipeable card item background color" + }, + label = "swipeable card item background color" ) Row( modifier = Modifier @@ -243,7 +259,6 @@ fun SwipeCardItem( } } - SwipeToDismissBoxValue.EndToStart -> { Spacer(modifier = Modifier) Icon( @@ -255,11 +270,11 @@ fun SwipeCardItem( ) } - SwipeToDismissBoxValue.Settled -> {} } } - }) { + } + ) { content(value) } } @@ -295,10 +310,11 @@ private fun SwipeCardItemExample() { OutlinedCard(shape = RectangleShape) { ListItem( headlineContent = { Text(todoItem.itemDescription) }, - supportingContent = { Text("swipe me to update or remove.") }) + supportingContent = { Text("swipe me to update or remove.") } + ) } } } } } -// [END android_compose_components_swipecarditemexample] \ No newline at end of file +// [END android_compose_components_swipecarditemexample]