0

Possible Duplicate:
Getting an issue while checking the dynamically generated checkbox through list view

I am developing an android app.. I have 2 radio buttons and 5 check boxes in my listview. If I have selected the radio button in the first list item, radio button on the third and fifth is also get selected.. Same as in the case of Check boxes..Any solution..I have tried to set tag. But no use.

Community
  • 1
  • 1
user1767260
  • 1,543
  • 8
  • 26
  • 51

1 Answers1

4

Add this two methods into your custom adapter, may be it will solve your problem.

@Override
public int getViewTypeCount() {
    // TODO Auto-generated method stub
    return mName.size();
}

@Override
public int getItemViewType(int position) {
    // TODO Auto-generated method stub
    return position;
}
Dipak Keshariya
  • 22,193
  • 18
  • 76
  • 128
  • 1
    This is the wrong way as I said you last time also. Please don't give hacks to user's if there is already a good conceptual solution available. http://stackoverflow.com/a/7739006/726863 – Lalit Poptani Oct 29 '12 at 06:05