SyntaxFix
Write A Post
Hire A Developer
Questions
To "update" the Toast message after unchecking some items, just put this line inside the for loop:
if (sp.valueAt(i))
so it results:
for(int i=0;i<sp.size();i++) { if (sp.valueAt(i)) str+=names[sp.keyAt(i)]+","; }