This recipe will show a list of items on an Android device, allowing you to select more than one item from the list, hence enabling multiple selections from the list.
Performing multiple selections from a list
How to do it...
In this recipe, we will be making use of the following methods:
- dialogCreateAlert(): To display a message via the dialog box
- dialogSetMultiChoiceItems(): To define the array of items to be displayed in list format in the dialog for multiple selections
- dialogSetPositiveButtonText(): To display a button in the dialog box to indicate that all selections are complete
- dialogGetSelectedItems(): To get the array of selected items
Take a look at the following steps:
- Type the following code in the Python script...