Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions app/src/main/java/com/example/woof/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,19 @@ fun DogItem(
modifier: Modifier = Modifier
) {
var expanded by remember { mutableStateOf(false) }
// 7. (Optional) Experiment with other animations
// val color by animateColorAsState(
// targetValue = if (expanded) MaterialTheme.colorScheme.tertiaryContainer
// else MaterialTheme.colorScheme.primaryContainer,
// label = "Color State"
// )
Card(
modifier = modifier
) {
Column(
modifier = Modifier
// 7. (Optional) Experiment with other animations
// .background(color = color)
.animateContentSize(
animationSpec = spring(
dampingRatio = Spring.DampingRatioNoBouncy,
Expand Down