0 down vote favorite

I am using my custom adapter. There is a checkbox and a text view in
each row. But i have a problem. There are more items in the list than
the number which fits on the screen.

So when i check any of the checkboxes on the screen and scroll down.
The automatically get unchecked.

When i scroll up again some random checkboxes get checked.

I know that in getView() list is being refreshed again and again and
theres an issue of the position. But dont know the solution.

I have tried using a boolean array to keep a track. but dnt know how
to do it properly.

cb.setOnCheckedChangeListener(new OnCheckedChangeListener(){
                        @Override
                        public void onCheckedChanged(CompoundButton
buttonView,
                                boolean isChecked) {

                                itemChecked[index]=isChecked;
                        }
                    });
                    cb.setChecked(itemChecked[index]);

Can you please post some code snippet and explain in detail. i am
tired of searching this since last 2weeks... thanks in advance,..

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to