Skip to content Skip to sidebar Skip to footer

Viewbinder Creates Random Content

I have strange behavoir in a ViewBinder. All works good on TextViews. With CheckBoxes (removed in my code) and custom widgets progressChart the values are not stored in the right p

Solution 1:

It is because of view recycling.

You need to create an object to hold the status of your checkboxes and set your views from that in your adapter.

I don't think it can be done in the viewbinder since the position is not passed in to it (but to be honest I've never tried)..

You will probably have to do it in getView.

Here is a link to a previous answer of mine where I show how to go about it with a SimpleCursorAdapter (it can be modified to appy to an arrayadapter too). SO Answer

Post a Comment for "Viewbinder Creates Random Content"