mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-17 23:47:02 +05:30
LobstersItem: tweak paddings
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
parent
f269c0ae08
commit
eae231722f
1 changed files with 9 additions and 8 deletions
|
@ -11,7 +11,6 @@ import androidx.compose.foundation.layout.Row
|
||||||
import androidx.compose.foundation.layout.fillMaxWidth
|
import androidx.compose.foundation.layout.fillMaxWidth
|
||||||
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.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
|
||||||
|
@ -63,7 +62,7 @@ fun LobstersItem(
|
||||||
.clickable { viewPost.invoke() },
|
.clickable { viewPost.invoke() },
|
||||||
) {
|
) {
|
||||||
Row(
|
Row(
|
||||||
modifier = Modifier.padding(start = 12.dp, end = 12.dp),
|
modifier = Modifier.padding(start = 12.dp),
|
||||||
verticalAlignment = Alignment.CenterVertically,
|
verticalAlignment = Alignment.CenterVertically,
|
||||||
horizontalArrangement = Arrangement.SpaceBetween,
|
horizontalArrangement = Arrangement.SpaceBetween,
|
||||||
) {
|
) {
|
||||||
|
@ -105,14 +104,16 @@ fun PostDetails(
|
||||||
color = titleColor,
|
color = titleColor,
|
||||||
fontWeight = FontWeight.Bold,
|
fontWeight = FontWeight.Bold,
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.padding(top = 4.dp),
|
.padding(top = 8.dp),
|
||||||
)
|
)
|
||||||
TagRow(
|
TagRow(
|
||||||
tags = post.tags,
|
tags = post.tags,
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.padding(top = 8.dp, bottom = 8.dp, end = 16.dp),
|
.padding(top = 4.dp),
|
||||||
)
|
)
|
||||||
Row {
|
Row(
|
||||||
|
verticalAlignment = Alignment.CenterVertically,
|
||||||
|
) {
|
||||||
CoilImage(
|
CoilImage(
|
||||||
data = "${LobstersApi.BASE_URL}/${post.submitterAvatarUrl}",
|
data = "${LobstersApi.BASE_URL}/${post.submitterAvatarUrl}",
|
||||||
contentDescription = stringResource(
|
contentDescription = stringResource(
|
||||||
|
@ -124,13 +125,13 @@ fun PostDetails(
|
||||||
transformations(CircleCropTransformation())
|
transformations(CircleCropTransformation())
|
||||||
},
|
},
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.requiredWidth(30.dp)
|
.requiredSize(24.dp)
|
||||||
.padding(4.dp),
|
.padding(top = 4.dp),
|
||||||
)
|
)
|
||||||
Text(
|
Text(
|
||||||
text = stringResource(id = R.string.submitted_by, post.submitterName),
|
text = stringResource(id = R.string.submitted_by, post.submitterName),
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.padding(4.dp),
|
.padding(start = 4.dp),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue