Thursday, December 2, 2010

[android-developers] Re: Custom List View

On Dec 1, 10:05 pm, Android Humanoid <droid.hu...@gmail.com> wrote:
> Hi All,
>
> I have custom list view in which each list item has
> 1. an ImageView
> 2. a TextView and
> 3. a WebView
>
> I made webview invisible by default, when the list item got selected
> am making the web view visible of the corresponding list item but when
> am moving down the webview is not getting invisible of the previous
> list item that i have visited.

You'll probably want some member variable to hold the position of the
list item that needs to have its webview shown, update that on
whatever event that would require it to change, then notify the
adapter backing the listview every time this member variable changes.
Refreshing the adapter in this way will cause all your other visible
list item views to be rebuilt via the getView method on the adapter.
You will have to specifically set the visibility of the webview in for
each item in the view, especially if you are allowing views to be
recycled.

Doug

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

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate