1

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

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);

当我选择一个列表时,列表正在关闭...之前谢谢!

4

1 回答 1

1

试试这个(Android:多选 ListView):

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

于 2013-09-04T06:45:56.290 回答