Skip to content

Commit

Permalink
Apply Spotless
Browse files Browse the repository at this point in the history
  • Loading branch information
jakeroseman authored and github-actions[bot] committed Dec 9, 2024
1 parent 95e6d36 commit c85963d
Showing 1 changed file with 23 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -243,7 +259,6 @@ fun SwipeCardItem(
}
}


SwipeToDismissBoxValue.EndToStart -> {
Spacer(modifier = Modifier)
Icon(
Expand All @@ -255,11 +270,11 @@ fun SwipeCardItem(
)
}


SwipeToDismissBoxValue.Settled -> {}
}
}
}) {
}
) {
content(value)
}
}
Expand Down Expand Up @@ -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]
// [END android_compose_components_swipecarditemexample]

0 comments on commit c85963d

Please sign in to comment.