pratikbutani / Multiselectspinner
Licence: gpl-3.0
Android - Select Multiple Items from Spinner with Filtration.
Stars: ✭ 158
Programming Languages
java
68154 projects - #9 most used programming language
Projects that are alternatives of or similar to Multiselectspinner
Photofilter
A simple easy to use library that lets you edit pictures on the fly with easy. Photo filter lets you apply a large number of filters all while maintaining maximum image quality. Supports Android 2.3 and higher.
Stars: ✭ 434 (+174.68%)
Mutual labels: gradle, filter
Gl React Instagramfilters
Instagram filters for gl-react and gl-react-native
Stars: ✭ 157 (-0.63%)
Mutual labels: filter
Coolweather
Weather App that uses Android best practices. Android Jetpack, clean architecture. Written in Kotlin
Stars: ✭ 154 (-2.53%)
Mutual labels: gradle
Gradle Android Plugin
[Deprecated] Gradle Android Plugin 中文版使用手册,如有纰漏,望斧正
Stars: ✭ 155 (-1.9%)
Mutual labels: gradle
Wechart
Create all the [ch]arts by cax or three.js - Cax 和 three.js 创造一切图[表]
Stars: ✭ 152 (-3.8%)
Mutual labels: filter
React Spinners Kit
A collection of loading spinners with React.js
Stars: ✭ 158 (+0%)
Mutual labels: spinner
Idea Gradle Dependencies Formatter
Gradle dependencies formatter for IntelliJ IDEA
Stars: ✭ 156 (-1.27%)
Mutual labels: gradle
Ezfilter
A lightweight (<180KB), easy-to-extend Android filter and dynamic sticker framework for adding filters and stickers for camera, video, bitmap and view.(一个轻量级(<180KB)、易扩展的Android滤镜和动态贴纸框架,支持摄像头、视频、图片和视图添加滤镜和贴纸。)
Stars: ✭ 155 (-1.9%)
Mutual labels: filter
Ios Multiselectiontable
Beautiful way of having a multi-selection table on iOS written in Swift
Stars: ✭ 156 (-1.27%)
Mutual labels: multiselect
Gpuimage X
A Cross-platform (for both Android & iOS) Framework for GPU-based Filters, Video and Image Processing.
Stars: ✭ 154 (-2.53%)
Mutual labels: filter
Filtrex
A library for performing and validating complex filters from a client (e.g. smart filters)
Stars: ✭ 157 (-0.63%)
Mutual labels: filter
React Native Input Spinner
An extensible input number spinner component for react-native highly customizable. This component enhance a text input for entering numeric values, with increase and decrease buttons.
Stars: ✭ 155 (-1.9%)
Mutual labels: spinner
MultiSelectSpinner
Android Library to Select multiple items from Spinner
Click to see video of example:
How to import
Add it in your root build.gradle at the end of repositories
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
Add dependency in build.gradle
implementation 'com.github.pratikbutani:MultiSelectSpinner:f47c0dadea'
Recent Changes
- Added Material library.
- Extracted the sample into a separate module.
- Code cleanup.
-
positionparameter is removed from both types of Spinner. Check comments above the code ofsetItems -
selectAllbutton added to Select All Items in MultiSelectSpinner. - Code Optimised and Upgraded to latest versions of libraries/dependencies.
- MOST IMP CHANGE You will get all the selected items in the listener instead of all items.
How to use SINGLE ITEM SELECTION
SINGLE ITEM SELECTION SPINNER (XML Code)
<com.androidbuts.multispinnerfilter.SingleSpinnerSearch
android:id="@+id/singleItemSelectionSpinner"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
app:hintText="Single Selection Spinner" />
SINGLE ITEM SELECTION SPINNER (Java Code)
/******** MUST READ ALL COMMENTS AS DOCUMENTATION *********/
/**
* Single Item Selection Spinner Demo
*/
SingleSpinnerSearch singleSpinnerSearch = findViewById(R.id.singleItemSelectionSpinner);
// Pass true, If you want color separation. Otherwise false. default = false.
singleSpinnerSearch.setColorseparation(true);
// Pass true If you want searchView above the list. Otherwise false. default = true.
singleSpinnerSearch.setSearchEnabled(true);
// A text that will display in search hint.
singleSpinnerSearch.setSearchHint("Select your mood");
// Removed second parameter, position. Its not required now..
// If you want to pass preselected items, you can do it while making listArray,
// pass true in setSelected of any item that you want to preselect
// LOGICALLY, PASS Only One Item As SELECTED...
singleSpinnerSearch.setItems(listArray0, new SingleSpinnerListener() {
@Override
public void onItemsSelected(KeyPairBoolData selectedItem) {
Log.i(TAG, "Selected Item : " + selectedItem.getName());
}
@Override
public void onClear() {
Toast.makeText(MainActivity.this, "Cleared Selected Item", Toast.LENGTH_SHORT).show();
}
});
How to use MULTIPLE ITEM SELECTION SPINNER
MULTIPLE ITEM SELECTION SPINNER (XML Code)
<com.androidbuts.multispinnerfilter.MultiSpinnerSearch
android:id="@+id/multipleItemSelectionSpinner"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
app:hintText="Multi Item Selection" />
MULTIPLE ITEM SELECTION SPINNER (Java Code)
/**
* Search MultiSelection Spinner (With Search/Filter Functionality)
*
* Using MultiSpinnerSearch class
*/
MultiSpinnerSearch multiSelectSpinnerWithSearch = findViewById(R.id.multipleItemSelectionSpinner);
// Pass true If you want searchView above the list. Otherwise false. default = true.
multiSelectSpinnerWithSearch.setSearchEnabled(true);
// A text that will display in search hint.
multiSelectSpinnerWithSearch.setSearchHint("Select your mood");
// Set text that will display when search result not found...
multiSelectSpinnerWithSearch.setEmptyTitle("Not Data Found!");
// If you will set the limit, this button will not display automatically.
multiSelectSpinnerWithSearch.setShowSelectAllButton(true);
//A text that will display in clear text button
multiSelectSpinnerWithSearch.setClearText("Close & Clear");
// Removed second parameter, position. Its not required now..
// If you want to pass preselected items, you can do it while making listArray,
// pass true in setSelected of any item that you want to preselect
multiSelectSpinnerWithSearch.setItems(listArray1, new MultiSpinnerListener() {
@Override
public void onItemsSelected(List<KeyPairBoolData> items) {
for (int i = 0; i < items.size(); i++) {
if (items.get(i).isSelected()) {
Log.i(TAG, i + " : " + items.get(i).getName() + " : " + items.get(i).isSelected());
}
}
}
});
/**
* If you want to set limit as maximum item should be selected is 2.
* For No limit -1 or do not call this method.
*
*/
multiSelectSpinnerWithSearch.setLimit(2, new MultiSpinnerSearch.LimitExceedListener() {
@Override
public void onLimitListener(KeyPairBoolData data) {
Toast.makeText(getApplicationContext(),
"Limit exceed ", Toast.LENGTH_LONG).show();
}
});
Awesome contributors :star_struck:
Made with contributors-img.
Buy a cup of coffee
If you found this project helpful or you learned something from the source code and want to thank me, consider buying me a cup of ☕️ PayPal
Do not forget to give star If its useful to you. :)
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].
