多选不是多选,因为当我选择一个时它正在关闭

时间:2013-09-03 13:10:23

标签: android multi-select

我有多选微调器,但是当我选择一个旋转器关闭时。我想选择几件事。这是我的代码:

protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.search);

    ArrayList<CategorySearch> categoriesList = new ArrayList<CategorySearch>();

    categorySpinner =(Spinner)findViewById(R.id.categorySpinner);
    subCategorySpinner = (Spinner)findViewById(R.id.subCategorySpinner);

    categoriesList = populateList();

    ArrayAdapter<CategorySearch> categoriesAdapter = new ArrayAdapter<CategorySearch>(this, android.R.layout.select_dialog_multichoice, categoriesList);
    categorySpinner.setAdapter(categoriesAdapter);
当我选择一个时,列表正在关闭...先谢谢!

1 个答案:

答案 0 :(得分:1)

试试这个(Android:Multiple Selection ListView):

http://theopentutorials.com/tutorials/android/listview/android-multiple-selection-listview/