String[] mListContent={"Sunday", "Monday", "Tuesday", "Wedneday", "Thursday", "Friday", "Saturday"};
setListAdapter( new AlarmDaysAdapter(this, android.R.layout.simple_list_item_checked, mListContent));
ListView listView = getListView();
listView.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);
for(ii=0; ii<values.size(); ii++)
{
listView.setItemChecked(values.get(ii),true);
Log.i(" values: " + values.get(ii)," ");
}
我想在显示Listview
时检查一些列表项。
Log.i打印values.get(ii)
中存在的完美值,这是我想要默认检查的位置。我怎样才能实现它?