作者MonruTsai (Frank)
看板AndroidDev
标题[问题] ListView的勾选问题
时间Thu Sep 11 13:38:34 2014
各位大大好,
小弟想请问ListView若想把勾选的项目放入新阵列,
要用什麽语法?
我找了很久和想了很久,
我的ListView只有单纯放文字阵列,
因为我要在最後一页来呈现前面ListView勾选的项目,用Intent的Bundle把新阵列传过去
但一直不知道怎麽把使用者所勾选的项目存入新阵列。
原本的写法是
String Location [] = new location [count];
lstLocation.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);
lstLocation.setAdapter(adapterBalls);
count = adapterBalls.getCount();
for(int i = 0 ; i<count ; i++)
{
Location[i] = lstLocation.xxxxxx;
}
xxxxxx为我不知道该填入什麽 有试过select系列的,
希望有人可以帮我解答><紧急,
小弟新手,请包涵
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 218.161.50.41
※ 文章网址: http://webptt.com/cn.aspx?n=bbs/AndroidDev/M.1410413918.A.B21.html
1F:推 henry4343: listview.getCheckedItemPosition() 09/11 14:00
2F:→ henry4343: listview.getCheckedItemIds() 09/11 14:00