Calendar results: adjust paddings
This commit is contained in:
parent
3a18b2e722
commit
641f517c31
@ -45,6 +45,7 @@ import androidx.compose.ui.graphics.Color
|
|||||||
import androidx.compose.ui.graphics.toArgb
|
import androidx.compose.ui.graphics.toArgb
|
||||||
import androidx.compose.ui.platform.LocalContext
|
import androidx.compose.ui.platform.LocalContext
|
||||||
import androidx.compose.ui.res.stringResource
|
import androidx.compose.ui.res.stringResource
|
||||||
|
import androidx.compose.ui.text.style.TextOverflow
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import androidx.compose.ui.unit.roundToIntRect
|
import androidx.compose.ui.unit.roundToIntRect
|
||||||
import androidx.lifecycle.compose.LocalLifecycleOwner
|
import androidx.lifecycle.compose.LocalLifecycleOwner
|
||||||
@ -97,7 +98,9 @@ fun CalendarItem(
|
|||||||
SharedTransitionLayout {
|
SharedTransitionLayout {
|
||||||
AnimatedContent(showDetails) { showDetails ->
|
AnimatedContent(showDetails) { showDetails ->
|
||||||
if (showDetails) {
|
if (showDetails) {
|
||||||
Column {
|
Column(
|
||||||
|
modifier = Modifier.padding(end = 16.dp)
|
||||||
|
) {
|
||||||
Row(
|
Row(
|
||||||
verticalAlignment = Alignment.CenterVertically,
|
verticalAlignment = Alignment.CenterVertically,
|
||||||
modifier = Modifier.padding(vertical = 16.dp)
|
modifier = Modifier.padding(vertical = 16.dp)
|
||||||
@ -126,7 +129,7 @@ fun CalendarItem(
|
|||||||
}
|
}
|
||||||
Row(
|
Row(
|
||||||
Modifier
|
Modifier
|
||||||
.fillMaxWidth(),
|
.fillMaxWidth().padding(bottom = 8.dp),
|
||||||
verticalAlignment = Alignment.CenterVertically
|
verticalAlignment = Alignment.CenterVertically
|
||||||
) {
|
) {
|
||||||
Icon(
|
Icon(
|
||||||
@ -147,7 +150,7 @@ fun CalendarItem(
|
|||||||
if (!calendar.description.isNullOrBlank()) {
|
if (!calendar.description.isNullOrBlank()) {
|
||||||
Row(
|
Row(
|
||||||
Modifier
|
Modifier
|
||||||
.fillMaxWidth(),
|
.fillMaxWidth().padding(bottom = 8.dp),
|
||||||
verticalAlignment = Alignment.CenterVertically
|
verticalAlignment = Alignment.CenterVertically
|
||||||
) {
|
) {
|
||||||
Icon(
|
Icon(
|
||||||
@ -157,14 +160,16 @@ fun CalendarItem(
|
|||||||
)
|
)
|
||||||
Text(
|
Text(
|
||||||
text = calendar.description!!,
|
text = calendar.description!!,
|
||||||
style = MaterialTheme.typography.bodySmall
|
style = MaterialTheme.typography.bodySmall,
|
||||||
|
maxLines = 8,
|
||||||
|
overflow = TextOverflow.Ellipsis,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (calendar.attendees.isNotEmpty()) {
|
if (calendar.attendees.isNotEmpty()) {
|
||||||
Row(
|
Row(
|
||||||
Modifier
|
Modifier
|
||||||
.fillMaxWidth(),
|
.fillMaxWidth().padding(bottom = 8.dp),
|
||||||
verticalAlignment = Alignment.CenterVertically
|
verticalAlignment = Alignment.CenterVertically
|
||||||
) {
|
) {
|
||||||
Icon(
|
Icon(
|
||||||
@ -174,7 +179,9 @@ fun CalendarItem(
|
|||||||
)
|
)
|
||||||
Text(
|
Text(
|
||||||
text = calendar.attendees.joinToString(),
|
text = calendar.attendees.joinToString(),
|
||||||
style = MaterialTheme.typography.bodySmall
|
style = MaterialTheme.typography.bodySmall,
|
||||||
|
maxLines = 6,
|
||||||
|
overflow = TextOverflow.Ellipsis,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -183,6 +190,7 @@ fun CalendarItem(
|
|||||||
verticalAlignment = Alignment.CenterVertically,
|
verticalAlignment = Alignment.CenterVertically,
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
|
.padding(bottom = 8.dp)
|
||||||
.clickable {
|
.clickable {
|
||||||
calendar.openLocation(context)
|
calendar.openLocation(context)
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user