Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我现在有我的 ListView,我想在其一侧插入一个复选框,我不想使用 MultipleChoice 项目。有人可以告诉我该怎么做吗?谢谢
使用它来制作一个单一的选择列表视图:
ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_single_choice, arrayList); listView.setChoiceMode(ListView.CHOICE_MODE_SINGLE); listView.setAdapter(adapter);