Sunday, July 3, 2011

[android-developers] Re: Modify listview item child views with adapter and getview()

So there is no way to update the child views programically ? List view
have textview and 2 buttons, when the list is populated only textview
is visible, the 2 buttons are invisible. I tried one way, it worked
but only for the first items, but when you scroll it, it threw NPE.

On Jul 3, 7:50 pm, Kostya Vasilyev <kmans...@gmail.com> wrote:
> Notify rebuilds the list.
>
> If there is any state that may have changed since the getView was called,
> it's up to your code to restore it.
>
> Change your data items from strings to a richer data structure, and use them
> to save and restore visibility.
>
> Also, try scrolling your list view up and down, before making those fixes.
> You may see the visibility change back to invisible, caused by the same bug.
>
> --

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

No comments:

Post a Comment