maui icon indicating copy to clipboard operation
maui copied to clipboard

[Android] Fix ImageButton Padding the third

Open aheubusch opened this issue 1 year ago • 4 comments
trafficstars

Description of Change

Improve the workaround (#22298) for the iffy Android ShapeImageView contentPadding/padding handling. The underlying problem is that ShapeImageView updates Padding in onMeasure leading to a double padding. The previous workaround reset the Padding after one eventloop hoping that onMeasure was called in the meantime. This worked for most cases but not all. The "improved" workaround overrides onMeasure and resets the Padding as soon as it was set.

I ran all ImageButton tests I could find and they are all green. So thats a good sign.

Issues Fixed

Fixes #25201 Fixes #16713 Fixes #18001 Fixes #13101

aheubusch avatar Oct 11 '24 22:10 aheubusch

/azp run

jsuarezruiz avatar Oct 14 '24 06:10 jsuarezruiz

Azure Pipelines successfully started running 3 pipeline(s).

azure-pipelines[bot] avatar Oct 14 '24 06:10 azure-pipelines[bot]

Not sure if the test failure are because of this PR. They all fail with a System.TimeoutException.

aheubusch avatar Oct 14 '24 09:10 aheubusch

/rebase

jfversluis avatar Dec 06 '24 15:12 jfversluis

Azure Pipelines successfully started running 3 pipeline(s).

azure-pipelines[bot] avatar Dec 06 '24 15:12 azure-pipelines[bot]

Any chance to get this in for the next release? Both Border and Padding on ImageButton are still broken, with no known workaround. This seems like pretty basic functionality to just straight up not work at all.

BlueRaja avatar Feb 19 '25 01:02 BlueRaja

This PR also resolves the issue https://github.com/dotnet/maui/issues/18875

karthikraja-arumugam avatar Mar 14 '25 05:03 karthikraja-arumugam

We can do Java in a new PR: https://github.com/dotnet/maui/issues/28532

mattleibow avatar Mar 20 '25 11:03 mattleibow