Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compose elements with fillMaxWidth() are cut on the edge #587

Open
admund opened this issue Jan 30, 2024 · 0 comments
Open

Compose elements with fillMaxWidth() are cut on the edge #587

admund opened this issue Jan 30, 2024 · 0 comments
Labels
compose Jetpack Compose Issue

Comments

@admund
Copy link

admund commented Jan 30, 2024

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 😏

@skydoves skydoves added the compose Jetpack Compose Issue label May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compose Jetpack Compose Issue
Projects
None yet
Development

No branches or pull requests

2 participants