开发者

How can I select list of items in listview within my code ( not by user)

Ho开发者_Go百科w can I 'check' list of items in listview within my code ( not by user)

ProcessList.setAdapter(new ArrayAdapter<String>(this,android.R.layout.simple_list_item_multiple_choice,nameList ));
ProcessList.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);

for example like ProcessList.(check these items...) Just like we get items 'checked' by user from: ProcessList.getItemAtPosition(position);

Pls also suggest me anyother way..


Call setItemChecked() on the ListView for each position to be checked.

Also, please grow up. Badgering people on Twitter minutes after you post a question on StackOverflow is infantile. This is a volunteer resource -- if you require answers to questions in under an hour, hire a consultant.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜