Colton Idle
03/25/2021, 2:10 PMColton Idle
03/25/2021, 2:12 PMRow(
verticalAlignment = Alignment.CenterVertically,
modifier = Modifier
.fillMaxWidth()
.padding(horizontal = 16.dp)
) {
Text(
myReallyLongTextVal,
maxLines = 1,
modifier = Modifier.padding(end = 16.dp),
overflow = TextOverflow.Ellipsis
)
Image(
//myimageresource,
modifier = Modifier
.requiredHeight(24.dp)
.requiredWidth(24.dp),
)
}
Albert Chang
03/25/2021, 2:14 PMModifier.weight(1f)
on the Text
?Colton Idle
03/25/2021, 2:19 PMAlbert Chang
03/25/2021, 2:23 PMTimo Drick
03/25/2021, 2:25 PM.height(IntrinsicSize.Max)
on the Row.Colton Idle
03/25/2021, 2:26 PMColton Idle
03/25/2021, 2:31 PMColton Idle
03/25/2021, 2:46 PMColton Idle
03/25/2021, 3:15 PMColton Idle
03/25/2021, 3:55 PM@Preview
@Composable
fun TextWithSquare() {
Row(
verticalAlignment = Alignment.CenterVertically,
modifier = Modifier
.height(IntrinsicSize.Max)
.fillMaxWidth()
.padding(horizontal = 16.dp)
.clickable { }
) {
Text(
"Very long text. Very long text. Very long text. Very long text. Very long text. Very long text. Very long text. Very long text. Very long text. ",
maxLines = 1,
modifier = Modifier
.padding(end = 16.dp),
overflow = TextOverflow.Ellipsis
)
Box(
Modifier
.background(Color.Blue)
.requiredHeight(24.dp)
.requiredWidth(24.dp),
)
}
}
Timo Drick
03/25/2021, 4:00 PMColton Idle
03/25/2021, 4:01 PMTimo Drick
03/25/2021, 4:02 PMTimo Drick
03/25/2021, 4:03 PMTimo Drick
03/25/2021, 4:03 PMTimo Drick
03/25/2021, 4:04 PMColton Idle
03/25/2021, 4:13 PMColton Idle
03/25/2021, 4:41 PMColton Idle
03/25/2021, 4:41 PM