I have a custom Listview like the following image. But to select the first radiobutton, also selects the one after the scroll ends, according eh read that is by recycling views using android. I tried several solutions but I have not been successful .. If anyone has been the same would like to see if I can help .. Here is the code for my Apadapter you take a look .. Cheers ... !!
Link Image > http://sia1.subirimagenes.net/img/2014/11/10/141110041729113463.jpg
@Override
public View getView(final int position, View convertView, ViewGroup parent) {
View rowView = convertView;
if (rowView == null) {
LayoutInflater inflater = context.getLayoutInflater();
rowView = inflater.inflate(R.layout.list_single, null, true);
ViewHolder viewHolder = new ViewHolder();
viewHolder.pregunta = (TextView) rowView.findViewById(R.id.texto_pregunta);
viewHolder.rdo1 = (RadioButton) rowView.findViewById(R.id.radio0);
rowView.setTag(viewHolder);
}
ViewHolder holder = (ViewHolder) rowView.getTag();
holder.pregunta.setText((position + 1) + ".- " + desc.get(position));
holder.rdo1.setText(minimo.get(position));
return rowView;
}
public static class ViewHolder {
public TextView pregunta;
public RadioButton rdo1;
public RadioButton rdo2;
public RadioButton rdo3;
}