kopia lustrzana https://github.com/meshtastic/Meshtastic-Android
Add an animation to user node list items to animate on details expansion (#1590)
rodzic
8ddd553753
commit
5430169830
|
@ -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),
|
||||
|
|
|
@ -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,
|
||||
|
|
Ładowanie…
Reference in New Issue