如何获得多选框选中的值?使用了listview,每个列表项表框一个显示的textview和一个checkbox,请问如何取得值呢?我使用了网上这位仁兄的办法,没有起作用,代码如下:
// 去掉相同的商品
List<Instrument> instList = APIDoc.getSystemDocCaptain()
.getInstrumentList();
listems = new ArrayList<Map<String, Object>>();
for (Instrument instrument : instList) {
Map<String, Object> listem = new HashMap<String, Object>();
listem.put("instrument", instrument.getInstrument());
listems.add(listem);
}
SimpleAdapter simplead = new SimpleAdapter(getApplicationContext(),
listems, R.layout.activity_systeminstrument_item,
new String[] { "instrument" },
new int[] { R.id.addsysteminstrument });
instrumentList = (ListView) findViewById(R.id.systeminstrumentlistview);
instrumentList.setAdapter(simplead);