I have created a custom ListView with radioButton on each its rows using Custom adapter. I want to programmatically check a radio button when its parent view (list item) is checked, and then uncheck other RadioButtons inside other ListView items. Anyone can provide me the solutions?
UPDATE
Here is my getView()
@Override
public View getView(int position, View convertView, ViewGroup parent) {
LinearLayout v = null;
final Item i = items.get(position);
EntryItem ei = (EntryItem) i;
v = (LinearLayout) vi.inflate(R.layout.list_item_entry, null);
final TextView title = (TextView) v
.findViewById(R.id.list_item_entry_title);
final TextView subtitle = (TextView) v
.findViewById(R.id.list_item_entry_summary);
RadioButton radioButton = new RadioButton(context);
radioButton.setFocusable(false);
radioButton.setFocusableInTouchMode(false);
v.addView(radioButton);
if (title != null)
title.setText(ei.title);
if (subtitle != null)
subtitle.setText(ei.subtitle);
convertView = v;
return convertView;
}