maui icon indicating copy to clipboard operation
maui copied to clipboard

Android Image.Scale produces wrong layout

Open philipag opened this issue 3 years ago • 2 comments

Description

As shown in the repro sample, Android and iOS produce different results when scaling an image.

Android:

image

iOS:

image

Android layout is wrong because "image" should be centered on "grid" just like it is on iOS. Also the green image background should be the same size as the yellow grid background.

Steps to Reproduce

  1. Build and run on Android and iOS
  2. Layout is wrong on Android (image should be centered. The image background is not scaled like the grid is (it should be).

layoutbug19.zip

Version with bug

Release Candidate 3 (current)

Last version that worked well

Unknown/Other

Affected platforms

Android

Affected platform versions

Android 11

Did you find any workaround?

no

Relevant log output

No response

philipag avatar May 24 '22 07:05 philipag

can be reproduced on android 12 with above project.

kristinx0211 avatar May 24 '22 07:05 kristinx0211

Any update on this one? It seems Android does not properly utilize AnchorX/Y when scaling an image.

philipag avatar Sep 21 '22 05:09 philipag

Verified this issue with Visual Studio Enterprise 17.6.0 Preview 5.0. Can repro on android platform, not repro on iOS platform. repro project: layoutbug19.zip Android: image iOS: image

homeyf avatar May 06 '23 07:05 homeyf

We've added this issue to our backlog, and we will work to address it as time and resources allow. If you have any additional information or questions about this issue, please leave a comment. For additional info about issue management, please read our Triage Process.

ghost avatar Nov 06 '23 18:11 ghost

Confirmed this is still happeing in net7 and net8 :(

mattleibow avatar Nov 06 '23 18:11 mattleibow