Add an animation to user node list items to animate on details expansion (#1590)

pull/1591/head
Joshua Soberg 2025-02-16 15:37:49 -05:00 zatwierdzone przez GitHub
rodzic 8ddd553753
commit 5430169830
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B5690EEEBB952194
2 zmienionych plików z 4 dodań i 1 usunięć

Wyświetl plik

@ -79,6 +79,7 @@ fun NodeItem(
gpsFormat: Int,
distanceUnits: Int,
tempInFahrenheit: Boolean,
modifier: Modifier = Modifier,
onAction: (NodeMenuAction) -> Unit = {},
expanded: Boolean = false,
currentTimeMillis: Long,
@ -114,7 +115,7 @@ fun NodeItem(
val (detailsShown, showDetails) = remember { mutableStateOf(expanded) }
Card(
modifier = Modifier
modifier = modifier
.fillMaxWidth()
.padding(horizontal = 8.dp, vertical = 4.dp)
.defaultMinSize(minHeight = 80.dp),

Wyświetl plik

@ -21,6 +21,7 @@ import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.compose.animation.animateContentSize
import androidx.compose.foundation.ExperimentalFoundationApi
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.fillMaxSize
@ -130,6 +131,7 @@ fun NodesScreen(
items(nodes, key = { it.num }) { node ->
NodeItem(
modifier = Modifier.animateContentSize(),
thisNode = ourNode,
thatNode = node,
gpsFormat = state.gpsFormat,