mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-17 20:17:02 +05:30
LobstersItem: improve TagRow reflow behavior
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
parent
23c4ca5d3f
commit
00d15f5475
1 changed files with 3 additions and 7 deletions
|
@ -7,13 +7,10 @@ import androidx.compose.foundation.combinedClickable
|
||||||
import androidx.compose.foundation.layout.Arrangement
|
import androidx.compose.foundation.layout.Arrangement
|
||||||
import androidx.compose.foundation.layout.Column
|
import androidx.compose.foundation.layout.Column
|
||||||
import androidx.compose.foundation.layout.Row
|
import androidx.compose.foundation.layout.Row
|
||||||
import androidx.compose.foundation.layout.absoluteOffset
|
|
||||||
import androidx.compose.foundation.layout.fillMaxWidth
|
import androidx.compose.foundation.layout.fillMaxWidth
|
||||||
import androidx.compose.foundation.layout.height
|
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
import androidx.compose.foundation.layout.requiredSize
|
import androidx.compose.foundation.layout.requiredSize
|
||||||
import androidx.compose.foundation.layout.requiredWidth
|
import androidx.compose.foundation.layout.requiredWidth
|
||||||
import androidx.compose.foundation.layout.sizeIn
|
|
||||||
import androidx.compose.foundation.lazy.LazyColumn
|
import androidx.compose.foundation.lazy.LazyColumn
|
||||||
import androidx.compose.foundation.lazy.items
|
import androidx.compose.foundation.lazy.items
|
||||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||||
|
@ -67,7 +64,7 @@ fun LobstersItem(
|
||||||
),
|
),
|
||||||
) {
|
) {
|
||||||
Row(
|
Row(
|
||||||
modifier = Modifier.padding(start = 12.dp, end = 12.dp),
|
modifier = Modifier.padding(start = 12.dp, end = 24.dp),
|
||||||
verticalAlignment = Alignment.CenterVertically,
|
verticalAlignment = Alignment.CenterVertically,
|
||||||
horizontalArrangement = Arrangement.SpaceBetween,
|
horizontalArrangement = Arrangement.SpaceBetween,
|
||||||
) {
|
) {
|
||||||
|
@ -84,7 +81,7 @@ fun LobstersItem(
|
||||||
TagRow(
|
TagRow(
|
||||||
tags = post.tags,
|
tags = post.tags,
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.padding(vertical = 8.dp),
|
.padding(top = 8.dp, bottom = 8.dp, end = 16.dp),
|
||||||
)
|
)
|
||||||
Row {
|
Row {
|
||||||
CoilImage(
|
CoilImage(
|
||||||
|
@ -112,8 +109,7 @@ fun LobstersItem(
|
||||||
checked = isSaved,
|
checked = isSaved,
|
||||||
onCheckedChange = { onSaveButtonClick.invoke() },
|
onCheckedChange = { onSaveButtonClick.invoke() },
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.requiredSize(24.dp)
|
.requiredSize(24.dp),
|
||||||
.absoluteOffset(x = (-24).dp),
|
|
||||||
) {
|
) {
|
||||||
Crossfade(targetState = isSaved) { saved ->
|
Crossfade(targetState = isSaved) { saved ->
|
||||||
IconResource(
|
IconResource(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue