[android-developers] Re: Custom GridView with ArrayAdapter out of sync with backing data

2010-10-29 Thread Streets Of Boston
You're welcome. :-) Have a great weekend. On Oct 29, 3:50 pm, stanchat wrote: > Awesome!  This worked like a charm. > > On Oct 28, 2:54 pm, Streets Of Boston wrote: > > > > > When you create a brand-new convertView (v) in your getView(...) > > method (within the if (v==nul) {} block), call t

[android-developers] Re: Custom GridView with ArrayAdapter out of sync with backing data

2010-10-29 Thread stanchat
Awesome! This worked like a charm. On Oct 28, 2:54 pm, Streets Of Boston wrote: > When you create a brand-new convertView (v) in your getView(...) > method (within the if (v==nul) {} block), call the > setOnCheckChangeListener on the SelectActor checkbox in 'v'. > > Every time when getView(.

[android-developers] Re: Custom GridView with ArrayAdapter out of sync with backing data

2010-10-28 Thread Streets Of Boston
When you create a brand-new convertView (v) in your getView(...) method (within the if (v==nul) {} block), call the setOnCheckChangeListener on the SelectActor checkbox in 'v'. Every time when getView(...) is called, attach your Actor to the Selector checkbox, by calling setTag: public View

[android-developers] Re: Custom GridView with ArrayAdapter out of sync with backing data

2010-10-28 Thread stanchat
This will work for the AddAll and ClearAll buttons. How do I make it work for an indiviudal actor (clicking Checkbox for actor) such that the isSelected field gets changed properly. I see I have the setOnCheckedChangeListener for a checkbox but how do I get the position of the ActorList to actual

[android-developers] Re: Custom GridView with ArrayAdapter out of sync with backing data

2010-10-28 Thread Streets Of Boston
I see that in the onClick, you try to access the list's (GridView's) items by accessing its child-views. This is not correct. Child-views are re-used for when displaying items in the listview(GridView). When a child-view (list-item view) scrolls off the screen, it is re-used for ones that start sc