I want to make a custom List View having Two TextViews and a radio Button in a single row. And on listitem click the radio button state should be toggle. I cannot use Simple
Handled a similar issue with a Hack (Not a perfect solution..but still works..)
listview.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView> parent, View view, int position, long id) {
for (int i = 0; i < parent.getCount() ; i ++)
{
View v = parent.getChildAt(i);
RadioButton radio = (RadioButton) v.findViewById(R.id.radio);
radio.setChecked(false);
}
RadioButton radio = (RadioButton) view.findViewById(R.id.radio);
radio.setChecked(true);
}
});