Balloon icon indicating copy to clipboard operation
Balloon copied to clipboard

Compose elements with `fillMaxWidth()` are cut on the edge

Open admund opened this issue 5 months ago • 0 comments

Please complete the following information:

  • Library Version: 1.6.4
  • Affected Device: Oppo A5

Describe the Bug:

My ballonContent

@Composable
fun BalloonContent() {
  Column {
    Text(text = "description")
    Text(
      modifier = Modifier
        .fillMaxWidth()
        .padding(end = 0.dp),
      text = "fillMaxWidth",
      textAlign = TextAlign.End
    )
    Box(
      modifier = Modifier
        .fillMaxWidth()
        .padding(end = 0.dp),
      contentAlignment = Alignment.CenterEnd
    ) {
      Text(text = "centered end")
    }
    Box(
      modifier = Modifier.fillMaxWidth(),
      contentAlignment = Alignment.CenterEnd
    ) {
      Button(onClick = { }) {
        Text(text = "button")
      }
    }
  }
}

Looks like that: Screenshot 2024-01-30 at 09 38 10 Screenshot 2024-01-30 at 09 38 25

I used a sample app from this lib.

It looks like a Compose issue, but maybe somebody found a workaround for that (different than adding padding on the end).

I have a similar problem with our production app but with height. Not able to reproduce it in the sample app. Monosnap Samsung Galaxy J7 Prime v8 1 2024-01-29 10-31-27

Expected Behavior:

Compose elements are not cut on edge 😏

admund avatar Jan 30 '24 09:01 admund