As discussed in the previous recipe, Contextual Mode supports two forms of use: single View mode (as demonstrated) and multiple selection (or batch) mode. Batch mode is where Contextual Mode outperforms the old style Context Menu as multiple selections were not supported.
If you've ever used an e-mail app such as Gmail or a file browser, you've probably seen Contextual Mode when selecting multiple items. Here is a screenshot from Solid Explorer, which shows an excellent implementation of Material Theme and Contextual Mode:
In this recipe, we will create a ListView
populated with multiple country names to demonstrate multiple selections or batch mode. This example will use the normal long press event and also the item click event to start Contextual Mode.