Skip to content

apptik/multiselectspinner

Repository files navigation

multiselectspinner

Build Status

Multi functional and selectable spinner for Android

##Download

Find the latest JARs or grab via Maven:

<dependency>
  <groupId>io.apptik.widget</groupId>
  <artifactId>multiselectspinner</artifactId>
  <version>1.0.12</version>
</dependency>

or Gradle:

compile 'io.apptik.widget:multiselectspinner:1.0.12'

Downloads of the released versions are available in Sonatype's releases repository.

Snapshots of the development versions are available in Sonatype's snapshots repository.

Maven Central

multiselectspinner requires at minimum Java 7 or Android SDK 15.

Example

  • specify in your layout
    <io.apptik.widget.multiselectspinner.MultiSelectSpinner
        android:id="@+id/multiselectSpinner"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        /> 
  • add in your code
 ArrayList<String> 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<String> adapter = new ArrayAdapter <String>(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);

About

Multi functional and selectable spinner for Android

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages