Bug 40809 - Android ListView ForceUpdateSize doesn't change cell size after setting one of the control's Visibility to Gone
Summary: Android ListView ForceUpdateSize doesn't change cell size after setting one o...
Alias: None
Product: Forms
Classification: Xamarin
Component: Android ()
Version: 2.2.0
Hardware: PC Windows
: Normal blocker
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2016-05-02 20:54 UTC by Ahmed Hassan
Modified: 2017-06-19 16:32 UTC (History)
3 users (show)

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

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:

Description Ahmed Hassan 2016-05-02 20:54:01 UTC
# Steps to reproduce
- Get a sample ListView app with a custom ViewCellRenderer for the cells on Android
- In the ViewCellRenderer, set the visibility of one of the controls in the cell to Gone and call ForceUpdateSize on the cell.

# Expected behaviour
The cell should shrink since a control has been hidden. This was perfectly fine in Xamarin.Forms 2.1

# Actual behaviour
The cell does not shrink and stays the same size

# Supplemental info (logs, images, videos)

# Test environment (full version information)
Android 6.0 - Google Nexus 5X
Comment 1 Ahmed Hassan 2016-05-02 21:02:54 UTC
It's basically behaving as if I set it to "Invisible" rather than "Gone". It might be because Xamarin.Forms 2.2 updates Android libraries to 23.3.0
Comment 2 Samantha Houts [MSFT] 2016-05-05 02:08:33 UTC

I can reproduce the actual behavior you described in 2.2+, but I don't see the expected behavior you described in 2.1. Do you have a small reproduction project you can provide that shows the distinction?

Thank you!
Comment 3 Chris Hardy [MSFT] 2017-06-19 16:32:32 UTC
Because we have not received a reply to our request for more information we are closing this issue. If you are still encountering this issue, please reopen the ticket with the requested information. Thanks!