Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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 42280 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
In special cases on GitHub you might also want the comments:
GitHub Markdown with public comments
Created attachment 16533 [details]
Visual Studio solution demonstrating the problem
I have difficulties when running on Android (I cannot test it on iOS) an application in which there is a “ListView” control with an item template including a “Frame” control that is expected to change its background colour when selecting and unselecting the item. I attach a Visual Studio solution demonstrating the problem. In the solution I put the latest stable version 22.214.171.124 of Xamarin.Forms. The “ListView” control is modified to support multiple selection. The background colour of a selected item should be “Aqua” and the background colour of an unselected item should be “White”. Furthermore, the text colour of the main title of an item should be “Pink” when selected and “Gray” when not selected. When selecting for example the first item (and no other one) and scrolling further on, I see that not only one item has the “Aqua” background colour, and if I select another item after scrolling, its text colour changes as expected, but no longer its background colour. When scrolling back to the beginning and tapping for example the third item, we see that another item than the selected one changes its background colour. This strange behaviour seems to be due to the use of the “CorrectedFrameRenderer” renderer in the “LVTest.Droid” project. When the renderer is removed or the command “base.SetBackgroundColor(color);” in the renderer is not commented out, the background colour behaves as expected, but once the “Frame” control changes its background colour while it is already on the screen, it loses its rounded corners. I need to get rid of both the problem of background colour changing of the selected item in a “ListView” control and the problem of disappearing rounded corners of a “Frame” control, but now the situation is such that solving one of these problems causes the other problem to appear.
It looks like the ListView's idea of which views correspond to the selected items is getting out of sync. For example, run the attached project and select the first item in the list. Now de-select it and scroll to the bottom of the list. Scroll back to the top and select/deselect some items - you'll see the backgrounds changing on other items than the one you're trying to select.
This is still occurring up through 126.96.36.199-pre2.