
Чтобы удалить вертикальные отступы текста, я попытался изменить свой код, но не получилось.
Код: Выделить всё
Text(
text = "2",
fontSize = 100.sp,
==================
Case 1.
modifier = Modifier.padding(0.dp), ## First thing I tried, but not working.
==================
Case 2.
style = LocalTextStyle.current.merge( ## Second, but also not working.
TextStyle(
fontSize = 100.sp,
// lineHeight = 2.5.em,
lineHeightStyle = LineHeightStyle(
alignment = LineHeightStyle.Alignment.Bottom,
trim = LineHeightStyle.Trim.LastLineBottom,
),
),
)
) // The end of the Text()
Я хочу удалить отступы из этого составного текста, в результате чего отступы будут равны 0.======Edited======
Кроме того, я тестирую функцию @Preview
Код: Выделить всё
@Preview
@Composable
fun PreviewText100sp() {
Text(
"100",
fontSize = 100.sp
)
}

Подробнее здесь: https://stackoverflow.com/questions/755 ... jetpack-co
Мобильная версия