我从数据库中填充了ListView
。如何同时拥有复选框和onItemClick
?
ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_multiple_choice, dataarray);
lv.setAdapter(adapter);
lv.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);
答案 0 :(得分:0)
查看以下链接,您可以对此有所了解..
http://fundoocode.net/android-listview-checkbox-example-onitemclicklistener-and-onclicklistener/
http://www.mysamplecode.com/2012/07/android-listview-checkbox-example.html
http://sunil-android.blogspot.in/2013/04/android-listview-checkbox-example.html
答案 1 :(得分:0)
希望通过复选框http://lalit3686.blogspot.in/2012/06/today-i-am-going-to-show-how-to-deal.html
加载listview非常有用