I want to create a ListView with a RadioButton in every row. I'm using a CursorAdapter and I'm binding it in the right way, but I cannot manage correctly the RadioButton. I want that at any moment only one RadioButton to be checked (so when I check one, I would like the one that was checked before to uncheck). Furthermore, when I put the RadioButton on the row, I cannot manage anymore the setOnItemClickListener. Do you know any tutorial that will work for me? Or can you give me any info?
A:
Sorry for the previous ans I was sleepy I guess. Try the following
setListAdapter(new ResourceCursorAdapter(this, android.R.layout.simple_list_item_single_choice, cursor));
listView.setChoiceMode(ListView.CHOICE_MODE_SINGLE);
josnidhin
2010-09-16 16:17:05
This works for AlertDialog, but what about ListView?
2010-09-16 19:58:42
you could handle the logic yourself by putting an extra column in your table, not sure if that would be too expensive though.
schwiz
2010-09-17 02:12:45
In some ways this will work for me, thank you very much
2010-09-17 15:52:05