-
-
Notifications
You must be signed in to change notification settings - Fork 290
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
Comments
same problem with the height |
Hello, @thproflord . I came across the same issue earlier. After looking through the codebase, I saw that elevation value is also added to the overall padding of private fun initializeBalloonContent() {
val paddingSize = builder.arrowSize - SIZE_ARROW_BOUNDARY
val elevation = builder.elevation.toInt()
with(binding.balloonContent) {
when (builder.arrowOrientation) {
ArrowOrientation.START -> setPadding(paddingSize, elevation, paddingSize, elevation)
ArrowOrientation.END -> setPadding(paddingSize, elevation, paddingSize, elevation)
ArrowOrientation.TOP ->
setPadding(elevation, paddingSize, elevation, paddingSize.coerceAtLeast(elevation))
ArrowOrientation.BOTTOM ->
setPadding(elevation, paddingSize, elevation, paddingSize.coerceAtLeast(elevation))
}
}
} so setting elevation to 0 should make the balloonContent cover the whole width of the screen. |
hello @yigitozgumus just trying your suggestion, worked like a charm. Fixed Width and Height issues, so thank you su much. |
Hi everyone, the new release 1.6.7 has fixed this issue. Thank you so much for figuring out the solution, @yigitozgumus! |
@skydoves after this fix I noticed that the elevation is now cropped if you add margin. I can't give a good sample right now, but I would think it might be worth investigating if the elevation padding should be moved somewhere else, like to the balloonWrapper, instead of just setting it to 0, because setting it to 0 will leave no room for elevation shadows :) |
Please complete the following information:
Describe the Bug:
My ballonContent
Looks like that:
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.
Expected Behavior:
Compose elements are not cut on edge 😏
The text was updated successfully, but these errors were encountered: