How to use Android Spinner with multiple choice in Fragment of Navigation drawer activity
<p>How do I create spinner which allows to choose multiple items, i.e spinner with check boxes? At the same time i need to use this multiple choice spinner inside the fragment of Navigation drawer activity.</p>

<p>Anyone please can clear my doubt with suitable example code. </p>

<p>Thank you in advance!!!</p>

<p><code>public class Doctor extends Fragment {
    public Doctor() {
        // Required empty public constructor
    }</code></p>

<pre><code>@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,Bundle savedInstanceState) {
    // Inflate the layout for this fragment
    getActivity().setTitle("Doctor");
    View v = inflater.inflate(R.layout.fragment_doctor, container, false);
    String [] values =
            {"All Town","Paris","Kodambakkam","Nungambakkam","T.Nagar","Egmore"};
    Spinner spinner = (Spinner) v.findViewById(R.id.town);
    ArrayAdapter&lt;String&gt; adapter = new ArrayAdapter&lt;String&gt;(this.getActivity(), android.R.layout.simple_spinner_item, values);
    adapter.setDropDownViewResource(android.R.layout.simple_dropdown_item_1line);
    spinner.setAdapter(adapter);

    String [] values1 =
            {"Select Doctor","Doctor1","Doctor2","Doctor3","Doctor4"};
    Spinner spinner1 = (Spinner) v.findViewById(R.id.doctor);
    ArrayAdapter&lt;String&gt; adapter1 = new ArrayAdapter&lt;String&gt;(this.getActivity(), android.R.layout.simple_spinner_item, values1);
    adapter.setDropDownViewResource(android.R.layout.simple_dropdown_item_1line);
    spinner1.setAdapter(adapter1);

    String [] values2 =
            {"Worked With","Nagaraj","Muthuvel"};
    Spinner spinner2 = (Spinner) v.findViewById(R.id.doctor);
    ArrayAdapter&lt;String&gt; adapter2 = new ArrayAdapter&lt;String&gt;(this.getActivity(), android.R.layout.simple_spinner_item, values2);
    adapter.setDropDownViewResource(android.R.layout.simple_dropdown_item_1line);
    spinner2.setAdapter(adapter2);

    return v;
}
public void onViewCreated(View view,@Nullable Bundle savedInstanceState){
    super.onViewCreated(view, savedInstanceState);

}
</code></pre>

<p>}</p>

<p>I need to change spinner2 to us multiple choice spinner. I'm extending class from Fragment. So don't know how to handle this multiple choice spinner</p>