Fix Android ImageButton background, ripple and padding#22298
Merged
mattleibow merged 47 commits intomainfrom May 22, 2024
Merged
Fix Android ImageButton background, ripple and padding#22298mattleibow merged 47 commits intomainfrom
mattleibow merged 47 commits intomainfrom
Conversation
Member
Author
|
Need to add some UI tests tomorrow. Somehow. Might just be able to make sure the button looks OK. |
jsuarezruiz
reviewed
May 9, 2024
jsuarezruiz
reviewed
May 13, 2024
Contributor
There was a problem hiding this comment.
Should the image take into account the BorderWidth and not overflow it?
Member
Author
# 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
This was referenced May 20, 2024
Contributor
|
Ready for a review, right @mattleibow? |
Member
Author
|
Ready! |
tj-devel709
approved these changes
May 21, 2024
Member
tj-devel709
left a comment
There was a problem hiding this comment.
From what I am seeing, this looks great to me!
jsuarezruiz
approved these changes
May 22, 2024
Contributor
|
Hi @mattleibow , |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

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.