0

I just wanna ask how can I create a multi selection spinner in android and the data that will be populated to is from the database. I saw this example here in SO Android Spinner with multiple choice and tried to use it but I don't know what to do next. This is my spinner and adapter and I want to make it in multiselect spinner. Help me please...

spn_CustomerSegment = (Spinner)findViewById(R.id.spn_CustomerSegment);
    List<String> ConsumerSeg = databaseHandler.setItemOnConsumerSeg();
    ArrayAdapter<String> adapter = new ArrayAdapter<String>(IreportMain.this, android.R.layout.simple_spinner_item, ConsumerSeg);
    adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
    spn_CustomerSegment.setAdapter(adapter);
Community
  • 1
  • 1
lolliloop
  • 389
  • 8
  • 23

1 Answers1

0

I know its not direct answer but you can try using a acrollView (vertical or horizontal) and populate it with checkboxes. it can give you a nice effect end no extra coding is needed

Gil Allen
  • 1,169
  • 14
  • 24