Bug 39550 - Empty content while changing Image.Source on Android (flickering)
Summary: Empty content while changing Image.Source on Android (flickering)
Alias: None
Product: Forms
Classification: Xamarin
Component: Android ()
Version: unspecified
Hardware: PC Mac OS
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2016-03-11 13:09 UTC by Stefan Reinhard
Modified: 2017-01-09 03:16 UTC (History)
2 users (show)

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

Repro Project (3.33 MB, application/zip)
2016-03-11 13:09 UTC, Stefan Reinhard

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 for Bug 39550 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:

Description Stefan Reinhard 2016-03-11 13:09:05 UTC
Created attachment 15370 [details]
Repro Project

When replacing images in an Image view, the behaviour differs in Xamarin.Forms between iOS and Android. On iOS, the image is replaced immediately while on Android the image is first set to null and then loaded asynchronously. The behaviour is only visible when used with large images in more or less complex UIs. However, it can lead to flashing UIs on Android.

Ich have created a simple repro project to visualize the problem. On Android, there should be a flashing visible when switching between the two images.

While digging through the assembly browser and found the following lines in ImageRenderer to be problematic:

    protected override void OnElementPropertyChanged(object sender, PropertyChangedEventArgs e)
        base.OnElementPropertyChanged(sender, e);
        if (e.PropertyName == Image.SourceProperty.PropertyName)
        if (e.PropertyName == Image.AspectProperty.PropertyName)

I think UpdateBitmap() should be called with the current bitmap of the ImageView.