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
Fix Android ImageButton background, ripple and padding #22298
Conversation
Need to add some UI tests tomorrow. Somehow. Might just be able to make sure the button looks OK. |
src/Controls/samples/Controls.Sample.UITests/Issues/Issue18857.xaml
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the image take into account the BorderWidth and not overflow it?
# Conflicts: # src/Controls/tests/CustomAttributes/Test.cs
# Conflicts: # src/Controls/tests/TestCases.Shared.Tests/Tests/_ViewUITests.cs
# Conflicts: # src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue20696.cs
Ready for a review, right @mattleibow? |
Ready! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From what I am seeing, this looks great to me!
Hi @mattleibow , |
Description of Change
An alternative to #21638
The main difference is that I just moved the code into a separate file and reused it for the most part. Very different to #21638 in that instead of using the new APIs that actually give a slightly different behavior with regards to border/corner calculations, I just use the code wholesale.
The padding was also pretty broken, so this PR also sort of makes it better. Seems to work around the several bugs in the Android code.
Issues Fixed
(I tried to work in smaller parts by splitting, but this control is so dodgy that it is all linked)
Outstanding Issues
This PR is trying to make Android better, and when I added the UI tests I saw all the other platforms are different. This PR is just to make the Android ripple and "background drawable" work, and not to fix all things.