-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Button.ContentLayout="Right, xx" does not work inside of an HorizontalStackLayout #11755
Comments
Hi @rmotta01. We have added the "s/needs-repro" label to this issue, which indicates that we require steps and sample code to reproduce the issue before we can take further action. Please try to create a minimal sample project/solution or code samples which reproduce the issue, ideally as a GitHub repo that we can clone. See more details about creating repros here: https://github.com/dotnet/maui/blob/main/.github/repro.md This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time. |
Are you understaffed? |
Thanks for the repro! |
We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process. |
@rmotta01 I'm getting a 404 when trying to look at your repro - is that the correct URL? |
Sorry, It was private, now It's public. |
I observed the same behavior with the vertical stack layout too. Another interesting behavior during debugging and hot reload
This works. However, it will not persist |
Weird. So, from the repro project it doesn't seem like In fact, in any of the layouts, I can make it work by setting the |
There seems to be an Android bug where it sometimes doesn't compute the updated icon position correctly, treating IconGravityTextEnd as if it were IconGravityTextStart. Setting the Icon to null and then back again forces the resetIconDrawable call here https://github.com/material-components/material-components-android/blob/25b3c2b15c9b9499993d6d4a5fb491ffce04517a/lib/java/com/google/android/material/button/MaterialButton.java#L852-L869 to happen which seems to make things work properly. Fixes #11755
* Set Icon to null and back again, working around Android issue There seems to be an Android bug where it sometimes doesn't compute the updated icon position correctly, treating IconGravityTextEnd as if it were IconGravityTextStart. Setting the Icon to null and then back again forces the resetIconDrawable call here https://github.com/material-components/material-components-android/blob/25b3c2b15c9b9499993d6d4a5fb491ffce04517a/lib/java/com/google/android/material/button/MaterialButton.java#L852-L869 to happen which seems to make things work properly. Fixes #11755 * Add device test * Update test so results show in window * Update to use AttachAndRun, for performance * Use new base class method to call AttachAndRun * Remove unneeded InvokeOnMainThreadAsync * Update to use CreateHandlerAndAddToWindow * Use Theory to test all 4 icon positions * Update the logic for Top as well
* Set Icon to null and back again, working around Android issue There seems to be an Android bug where it sometimes doesn't compute the updated icon position correctly, treating IconGravityTextEnd as if it were IconGravityTextStart. Setting the Icon to null and then back again forces the resetIconDrawable call here https://github.com/material-components/material-components-android/blob/25b3c2b15c9b9499993d6d4a5fb491ffce04517a/lib/java/com/google/android/material/button/MaterialButton.java#L852-L869 to happen which seems to make things work properly. Fixes #11755 * Add device test * Update test so results show in window * Update to use AttachAndRun, for performance * Use new base class method to call AttachAndRun * Remove unneeded InvokeOnMainThreadAsync * Update to use CreateHandlerAndAddToWindow * Use Theory to test all 4 icon positions * Update the logic for Top as well
Description
This is on Android. On Windows it works (it has other bug). iOS, don't know.
With FlexPanel it happens too, Also, on a Grid with columndefinton Auto.
Steps to Reproduce
Create a new project.
Add this page.
Run it.
Link to public reproduction project repository
https://github.com/rmotta01/MauiBugBtnImgSource01
Version with bug
7.0 (current)
Last version that worked well
Unknown/Other
Affected platforms
Android
Affected platform versions
Android 33
Did you find any workaround?
No response
Relevant log output
No response
The text was updated successfully, but these errors were encountered: