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 59133 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 24494 [details]
Testing application that shows issue.
I am running into an issue with a Xamarin Forms application I have. The issue only happens on Android. The iOS version works as expected.
I have a ListView with a custom data template. The data in the data template is bound to a model collection that's on the view model that's set as the BindingContext of the view. The data template has an image(a checkmark) that should show when the user taps on the row. I am using a bound "IsSelected" property on my model for the IsVisible value of the image.
On iOS, the image shows and hides correctly(clicking on the row a second time will hide the image). But on Android, the image never shows.
I've tried a number of different ways to get the collection of data to update, but just can't get it to work.
I have attached a sample project that shows the issue. I'm testing on Android 7.1.
There was a minor hiccup with the file not being found due to location, but using any placeholder image should work. I've also tested the project on 2.4.0-pre2 and the nightly build where the issue still exists.
So is the issue with the IsVisible binding not working? Or is the image not being found correctly?
Is there any work around available? This is a pretty large issue for my application. I've tried other options, like setting the background color of the row when it's clicked(using a Binding for background color that's bound to my model), and that doesn't work either. It seems that changing the data on Android through a binding just doesn't work.
I'm just looking for some help on how to get around this. I just need to show some type of visual clue that the user has selected a row. Multiple rows can be selected at a time, and clicking on a previously selected row should unselect the row.