Sun Sep 30 07:02:41 PDT 2018
Video Output:
Source code link is added below.
Here we have a class called
MultiSelectionSpinner.
In this class we have following methods.
public void setItems(String[] items)
Used to set adapter items using array of strings to this spinner.
public void setItems(List
items)
items)
Used to set adapter items using list of strings to this spinner.
public void setSelection(String[] selection)
Used to set selected items on this adapter using array of strings to this spinner.
public void setSelection(List
selection)
selection)
Used to set selected items on this adapter using list of strings to this spinner.
public void setSelection(int index)
Used to set single selected item using position to this spinner.
public void setSelection(int[] selectedIndices)
Used to set selected items using array of integers to this spinner.
public List
getSelectedStrings()
getSelectedStrings()
Used to get the selected items as a string
public List
getSelectedIndices()
getSelectedIndices()
Used to get the selected indexes as a list of integers
I hope this post is useful to you. kindly share your feedback as comment here.
Source code on GitHub
Thank You
Comments
Post a Comment