Bug 40161 - Layout not invalidated when changing source of image
Summary: Layout not invalidated when changing source of image
Status: RESOLVED FIXED
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 2.2.0
Hardware: Macintosh Mac OS
: Normal blocker
Target Milestone: ---
Assignee: Chris King
URL:
Depends on:
Blocks:
 
Reported: 2016-04-06 13:58 UTC by René
Modified: 2017-06-19 16:07 UTC (History)
8 users (show)

Tags: ac
Is this bug a regression?: ---
Last known good build:


Attachments
Sample app (140.42 KB, application/zip)
2016-04-06 13:58 UTC, René
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description René 2016-04-06 13:58:23 UTC
Created attachment 15626 [details]
Sample app

Issue: Image not updated with Forms 2.2.0.4 pre 1

Test app is attached. Run the app on Android (I used XAP with Lollipop). 
You should see the Xamagon icon and then the screen goes white. This is when the Xamagon is replaced with another larger image (a timer does this after 2 seconds).

Run the same app in Forms 2.1 and you will spot two differences:

1. The Xamagon is rendered much larger
2. The Xamagon is successfully replaced with an image of a chicken after 2 seconds.

This only happens if the Image is inside an AbsoluteLayout.


=== Xamarin Studio ===

Version 6.0 (build 4801)
Installation UUID: 7a127b8e-364a-4453-8b18-e87f614b7d80
Runtime:
	Mono 4.4.0 (mono-4.4.0-branch/f8474c4) (64-bit)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 404000040

=== Xamarin.Profiler ===

Version: 0.0.0.0
Location: /Applications/XamarinProfiler.Mac.app/Contents/MacOS/XamarinProfiler.Mac

=== Apple Developer Tools ===

Xcode 7.3 (10183.3)
Build 7D175

=== Xamarin.iOS ===

Version: 9.8.0.156 (Business Edition)
Hash: f51047c
Branch: cycle7
Build date: 2016-03-25 02:13:42-0400

=== Xamarin.Android ===

Version: 6.1.0.16 (Business Edition)
Android SDK: /Users/rene/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		4.4 (API level 19)
		5.0 (API level 21)
		5.1 (API level 22)
		6.0 (API level 23)

SDK Tools Version: 24.4.1
SDK Platform Tools Version: 23.1
SDK Build Tools Version: 23.0.3

Java SDK: /usr
java version "1.7.0_71"
Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode)

Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

=== Xamarin Android Player ===

Version: 0.6.5
Location: /Applications/Xamarin Android Player.app

=== Xamarin.Mac ===

Version: 2.8.0.58 (Business Edition)

=== Xamarin Inspector ===

Version: 0.7.0.0
Hash: 2a5f6e9
Branch: master
Build date: Thu Mar 31 18:37:26 UTC 2016

=== Build Information ===

Release ID: 600004801
Git revision: f73f730c738baf8701a5892b7af64fd468d1dc0c
Build date: 2016-03-14 14:28:06-04
Xamarin addins: 3af7be6c701eb0137645a03e38b82f23b65738c3
Build lane: monodevelop-lion-cycle7

=== Operating System ===

Mac OS X 10.11.4
Darwin iMacRR.fritz.box 15.4.0 Darwin Kernel Version 15.4.0
    Fri Feb 26 22:08:05 PST 2016
    root:xnu-3248.40.184~3/RELEASE_X86_64 x86_64

=== Enabled user installed addins ===

Xamarin Inspector 0.7.0.0
Comment 1 Chris King 2017-05-31 17:26:05 UTC
Removing HorizontalOptions and VerticalOptions (or setting their value to "Fill") produces a reasonable behavior whereby the image will be allocated bounds inside the absolute layout in accordance with its LayoutBounds and LayoutFlags and will fill that allocation in accordance with its Aspect flags ("CenterAndExpand" should only be used in a StackLayout). Removing those options while keeping the other settings in the reproduction will expand the image to fill the entire screen and then swap to the other image. I'm guessing this is your expected behavior. If so that's a fine work around. If not, then we also expect the flags specified in the reproduction to have a behavior that is not exhibited: The reproduction should produce a centered image with the size and aspect unchanged from the embedded image. We continue to investigate why that is not happening.