Obviously I'm missing something, it seems to me that the list view doesn't
work off the actual array but takes copies of the data when the getView is
called, when these are edited the differences are lost when the item goes
off view.  I've tried modifying the getView to reference the array directly,
but with little success.


On Sun, Jul 10, 2011 at 7:24 PM, Mark Murphy <[email protected]>wrote:

> On Sun, Jul 10, 2011 at 2:04 PM, Simon Platten
> <[email protected]> wrote:
> > I've been working on a listview for while now.  Each of my items in the
> list
> > has a checkbox, an image and two buttons.  It works like a gallery and
> > enables the user to preview images in my application, the buttons allow
> the
> > user to rotate the image in the listview by 90 degrees, clockwise or
> counter
> > clockwise.  These work fine whilst the image is on view, but as soon as I
> > scroll off view the image is recycled and the state lost.  I know that in
> > the getView method I can access my array to determine the angle and state
> > etc.
> >
> > My question is...Is there a callback or method that I can check before
> the
> > item goes off view and is recycled so that I can copy the state of the
> item
> > back to my array, so that I can restore it when it comes back into view?
>
> The "state of the item" should have been in your array in the first
> place. Whenever the state of the item changes, change the array.
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://github.com/commonsguy
> http://commonsware.com/blog | http://twitter.com/commonsguy
>
> _Android Programming Tutorials_ Version 3.5 Available!
>
> --
> 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




-- 
Regards,
Sy

-- 
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