xamarin/Xamarin.Forms

[Bug] Image on Button or ImageButton distorts when swapped

Aperta

#6937 aperta il 19 lug 2019

 (2 commenti) (3 reazioni) (0 assegnatari)C# (1926 fork)batch import
a/imagebuttona/layoute/3 :clock3:help wantedp/Androidt/bug :bug:up-for-grabs

Metriche repository

Star
 (5644 stelle)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

Description

When swapping out the Source Image on the attached project the image will occasionally distort. If you click it enough times it'll return back to normal.

Steps to Reproduce

  1. Run attached project
  2. click on the heart a few times and you will see sometimes it distorts

In the sample if you delete the Frame above the ImageButton then the distortion no longer occurs

Expected Behavior

The image should always stay the same height/width

Actual Behavior

The image when changing stretches and occasionally doesn't return to normal

Basic Information

  • Version with issue: 4.3
  • Last known good version: I tested as far back as 3.4 and the issue still presented itself there
    • Android: API 23

Screenshots

image

Reproduction Link

ImageSizesWeirdWhenChanged.zip

Guida contributor