Skip to content

Commit

Permalink
Add small animation for PostCard
Browse files Browse the repository at this point in the history
  • Loading branch information
paulcoding810 committed Dec 3, 2024
1 parent b8a2b66 commit c764c4e
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package com.paulcoding.hviewer.ui.page.posts

import android.widget.Toast
import androidx.compose.animation.animateContentSize
import androidx.compose.animation.core.tween
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
Expand Down Expand Up @@ -200,7 +202,10 @@ fun PostCard(
Card(
elevation = CardDefaults.cardElevation(8.dp),
modifier = Modifier
.padding(horizontal = 16.dp, vertical = 12.dp),
.padding(horizontal = 16.dp, vertical = 12.dp)
.animateContentSize(
animationSpec = tween(durationMillis = 300)
),
shape = MaterialTheme.shapes.medium,
) {
Box(modifier = Modifier.fillMaxSize()) {
Expand Down

0 comments on commit c764c4e

Please sign in to comment.