Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Multiple select drop down in android

I am now working on an android app where i required to load all country list on a dropdown. My User Requirement to add multiselect dropdown like as following which we use in web using JQuery....

Multiselect Dropdown

I am searching this type of dropdown but not get any solution yet. How can i solve this requirement? any suggestion is highly appreciated.

Thanks in advance.

N.B: I found following type of drop down which not accepted to my user.

enter image description here

like image 724
Osman Avatar asked Oct 09 '18 04:10

Osman


People also ask

How do I add to a drop down list on Android?

You can add a dropdown menu to your Android application in a few simple steps. For starters, you need to edit the XML files. Integrate the dropdown menu into them using Android Studio's drag-and-drop feature. Next, you have to create a string array to add all the relevant items to your dropdown menu.

How do I allow multiple selections?

For windows: Hold down the control (ctrl) button to select multiple options. For Mac: Hold down the command button to select multiple options.


2 Answers

You are talking about is Chips View, there are multiples third party lib which can help you

https://github.com/hootsuite/nachos

https://github.com/pchmn/MaterialChipsInput

You can get help from this.

like image 92
Mohit Suthar Avatar answered Sep 29 '22 15:09

Mohit Suthar


You have to create a spinner in your own xml and create a custom adapter for that spinner.

These links may help you:

Multi Select Spinner with Search/Filter

How to develop Multi Select spinner

Multi Select Spinner

Multi Select Spinner with Search/Filter

Multi selection spinner in android without AlertDialog

like image 36
Md. Zakir Hossain Avatar answered Sep 29 '22 15:09

Md. Zakir Hossain