Assigned
Status Update
Comments
se...@google.com <se...@google.com> #2
Thanks for the excellent bug report!
po...@gmail.com <po...@gmail.com> #3
🥰
se...@google.com <se...@google.com> #4
Ime is not necessary part of repro, relayout does it.
@Composable
private fun TextCrash() {
val infiniteTransition = rememberInfiniteTransition(label = "infinite transition")
val padding by infiniteTransition.animateFloat(
initialValue = 0f,
targetValue = 50f,
animationSpec = infiniteRepeatable(tween(1000), RepeatMode.Reverse),
label = "I like to move it move it"
)
Box(
modifier = Modifier
.padding(padding.toInt().dp)
.fillMaxSize(),
contentAlignment = Alignment.Center
) {
Column(verticalArrangement = Arrangement.spacedBy(12.dp)) {
Text(
text = "Hello Android!".repeat(5),
textAlign = TextAlign.Center,
letterSpacing = 1.sp,
overflow = TextOverflow.Ellipsis,
maxLines = 1
)
}
}
}
se...@google.com <se...@google.com> #5
This is the minimal TextStyle to repro
se...@google.com <se...@google.com> #6
TextStyle(
textAlign = TextAlign.Center,
letterSpacing = 1.sp,
lineHeight = 24.sp,
lineHeightStyle = LineHeightStyle(
alignment = LineHeightStyle.Alignment.Center,
trim = LineHeightStyle.Trim.None,
mode = LineHeightStyle.Mode.Fixed
),
)
se...@google.com <se...@google.com> #7
Fix coming. Will see if I can get it into 1.8-beta01.
po...@gmail.com <po...@gmail.com> #8
Amazing! That was super quick)
se...@google.com <se...@google.com> #9
Excellent bug report and I had some idle cycles this week :)
Description
Jetpack Compose version: 1.7.6
Jetpack Compose component used:
Android Studio Build: Ladybug Feature Drop 2024.2.2
Kotlin version: 2.1.0
Devices/Android versions reproduced on: Phone Emulator (API 34)
Keyboard (i.e. Gboard, Samsung, etc): AOSP Keyboard
If you have Material text
inside the layout with
Modifier.imePadding()
applied to it, and trigger the appearance of the soft keyboard, then text starts to move to the right of the screen.This bug is very similar to this one and is probably related to this code (it was introduced here ).
Screenshots and video attached.