Open matzeteo opened 1 year ago
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.
Verified this on Visual Studio Enterprise 17.7.0 Preview 2.0. Repro on Android 13.0-API33 with below Project: TestApp.zip
This issue should have been fixed by https://github.com/dotnet/maui/pull/14905
We found a workaround for our use case by using Aspect="Center" for the ImageButton which scales correctly for only a simple image inside an ImageButton. Not sure if this is a fix for any use case but I guess it's worth trying.
I can still observe the issue with newest version of Maui (8.0.10)
Wow @samtun - Aspect="Center" works. This is a good workaround. Thanks for sharing.
@jsuarezruiz This issue still exists in Maui 8.0.10.
I'm trying to use it with Maui 8 but Padding works only on Windows, not on Android
It's still not working on Maui 8.0.21 either. (Aspect="Center" is not working as a workaround) If I modify it at runtime within the debugger at the emulator it works.
Hopefully this is fixed soon, a very essential one to get your imagebutton look well. Probably fixable by making a customhandler but it should work out of the box.
Aspect="Center" does not workaround the bug. Rather, any change to the button at runtime will cause the XAML hot-reload to refresh the button, which then causes it to render correctly (!?!). However, after restarting the app, it's broken again.
This bug was supposed to be fixed in https://github.com/dotnet/maui/pull/14905 but it either didn't work or was regressed. The PR https://github.com/dotnet/maui/pull/22298 supposedly fixes it again. This latter PR is tagged as both "fixed in 8.0.60" and "fixed in 9.0.0". The bug still exists in 8.0.80, so clearly it was not fixed in 8.0.60. Hopefully it's actually fixed in 9.0.0.........
Very sad to see this state of basic controls not working properly in Maui. We are creating an app since last September and failed to ship an MVP because of cosmetic issues like this. Maui is a huge let down at this point. We will wait for .NET 9 at best and then we will never return to Maui. Thanks for this pathetic experience team :-)
Description
If you add padding to an ImageButton on Android, not only a padding will be set, but also a margin with the size of the padding. The button will therefore become smaller due to the padding. To get the button back to the right size, you then need to set a margin with a negative size.
Steps to Reproduce
Link to public reproduction project repository
https://github.com/matzeteo/TestApps.git
Version with bug
8.0 (current)
Last version that worked well
Affected platforms
Android
Affected platform versions
Android 10.0 and up
Did you find any workaround?
Set a margin with the negative value of the padding. But that doesn't work for every Layout structure.
Relevant log output
No response