我想在listview的click事件中設置一個複選框。 如何設置正確的複選框?列表視圖中的複選框
這是我的代碼:
listView.setOnItemLongClickListener(new OnItemLongClickListener()
{
@Override
public boolean onItemLongClick(AdapterView<?> adapter, View view,
int position, long id)
{
Checkbox checkbox = ??
checkbox.setChecked(true);
return true;
}
});
檢查這一項http://stackoverflow.com/questions/7738527/getting-an-issue-while-checking-the-dynamically-generated-checkbox-through-list/7738854#7738854 –