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 54447 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 21186 [details]
Sample demonstrates the problem
In context actions mode you can change the list view item selection.
It should change binding context of menu items, which properties can be bound to item.
1. Start attached sample on Android;
2. Long tap on any list view item - notice the context action menu item text is bound to list view item text;
3. Tap on another list view item - menu item text does not changed though it's bound to list view item;
4. Tap on menu item - action is invoked for last item selected while menu item text mentions the first one.
The similar problem described in https://bugzilla.xamarin.com/show_bug.cgi?id=33642 and it does not fixed.
In general - context actions menu items should be updated on list view selection change.
Its' _context_ actions, so it should be updated on context change.
Reproducible on 2.3.2, 2.3.3 and 2.3.4.
I am able to reproduce the issue using the attached project in Android. I am confirming this report so the team can investigate further.
As mentioned, when the ContextActions for a cell are open, selecting another cell does not close the ContextActions or update the open one for the new cell. However the command executed when tapping the MenuItem is the command from the new cell instead of the original.
Bug 33642 referenced in the description was for a similar issue that resulted in a crash. The crash was fixed, however the ContextActions still remain open and results in this new issue, so perhaps the desired behavior should be for the ContextActions to be closed when the selected item changes.
This issue only affects Android due to the way ContextActions work on the platform.
### Version Tests
I think the most correct way to fix all of the similar issues is to implement ContextActions on Android as context popup menu.
Action mode, currently used, was designed for multi-select list views.
Also it will be more consistent with other platforms implementations.
Same applies for evaluation of CanExecute Commapd properties: Changing the selection does not reflect the result of CanExecute for the binded Command.
E.g. the context MenuItem "delete" for a list of documents containing public and private elements - where only private ones shall be allowed to delete while public are not - does not update when selecting another element.