https://github.com/apptik/multiselectspinner
Multi functional and selectable spinner for Android
https://github.com/apptik/multiselectspinner
Last synced: 5 months ago
JSON representation
Multi functional and selectable spinner for Android
- Host: GitHub
- URL: https://github.com/apptik/multiselectspinner
- Owner: apptik
- License: apache-2.0
- Created: 2014-12-26T04:19:16.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2018-05-21T16:50:30.000Z (about 8 years ago)
- Last Synced: 2026-01-14T00:54:57.043Z (5 months ago)
- Language: Java
- Size: 196 KB
- Stars: 18
- Watchers: 2
- Forks: 5
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
multiselectspinner
==================
[](https://travis-ci.org/apptik/multiselectspinner)
Multi functional and selectable spinner for Android
##Download
Find [the latest JARs][mvn] or grab via Maven:
```xml
io.apptik.widget
multiselectspinner
1.0.12
```
or Gradle:
```groovy
compile 'io.apptik.widget:multiselectspinner:1.0.12'
```
Downloads of the released versions are available in [Sonatype's `releases` repository][release].
Snapshots of the development versions are available in [Sonatype's `snapshots` repository][snap].
[](https://maven-badges.herokuapp.com/maven-central/io.apptik.widget/multiselectspinner)
multiselectspinner requires at minimum Java 7 or Android SDK 15.
Example
---
* specify in your layout
```xml
```
* add in your code
```java
ArrayList options = new ArrayList<>();
options.add("1");
options.add("2");
options.add("3");
options.add("A");
options.add("B");
options.add("C");
MultiSelectSpinner multiSelectSpinner = (MultiSelectSpinner) v.findViewById(R.id.multiselectSpinner);
ArrayAdapter adapter = new ArrayAdapter (getActivity(), android.R.layout.simple_list_item_multiple_choice, options);
multiSelectSpinner
.setListAdapter(adapter, "All " +
" Types", "none", new MultiSelectSpinner.MultiSpinnerListener() {
@Override
public void onItemsSelected(boolean[] checkedItems) {
}
})
.setSelectAll(true)
.setMinSelectedItems(1);
```
[mvn]: http://search.maven.org/#search|ga|1|io.apptik.widget.multiselectspinner
[release]: https://oss.sonatype.org/content/repositories/releases/io/apptik/widget/multiselectspinner/
[snap]: https://oss.sonatype.org/content/repositories/snapshots/io/apptik/widget/multiselectspinner/