title: How to create Multiple Selection Spinner in Android
body: <p>I am using below code to create a simple Spinner (only single selection is allow)</p>
  
  <p>But now i would like to know how can i use spinner to make multiple selection, I know i can achieve this using Dialog but i have to use Spinner..</p>
  
  <pre><code>public class MainActivity extends Activity {
  
      Spinner spnr;
  
      String[] celebrities = {
              "Chris Hemsworth",
              "Jennifer Lawrence",
              "Jessica Alba",
              "Brad Pitt",
              "Tom Cruise",
              "Johnny Depp",
              "Megan Fox",
              "Paul Walker",
              "Vin Diesel"
      };
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
  
          spnr = (Spinner)findViewById(R.id.spinner);
          ArrayAdapter&lt;String&gt; adapter = new ArrayAdapter&lt;String&gt;(
                  this, android.R.layout.simple_spinner_item, celebrities);
  
          spnr.setAdapter(adapter);
          spnr.setOnItemSelectedListener(
                  new AdapterView.OnItemSelectedListener() {
  
                      @Override
                      public void onItemSelected(AdapterView&lt;?&gt; arg0, View arg1,
                              int arg2, long arg3) {
  
                          int position = spnr.getSelectedItemPosition();
                          Toast.makeText(getApplicationContext(),"You have selected "+celebrities[+position],Toast.LENGTH_LONG).show();
                          // TODO Auto-generated method stub
                      }
  
                      @Override
                      public void onNothingSelected(AdapterView&lt;?&gt; arg0) {
                          // TODO Auto-generated method stub
  
                      }
  
                  }
              );
      }
  
  }
  </code></pre>