ListAdapter: View.GONE on some element

by arnouf » Tue, 14 Apr 2009 21:10:38 GMT

Sponsored Links
 Hi all,

I've a big issue...

In a ListView using a BaseAdpater extension, I would like hide some
entries (using View.GONE in my getView method).

The line is erase, but i've still grey line between each record.

How can I change that?

Thanks a lot!


ListAdapter: View.GONE on some element

by Dianne Hackborn » Wed, 15 Apr 2009 01:49:41 GMT

 That is not how ListView is supposed to work.  You need to make the actual
entry in the adapter disappear.

Dianne Hackborn
Android framework engineer

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.


Sponsored Links

Other Threads

1. ListView....

Why does this type of thing always end up being so difficult?

I want to have a scrolling list on the screen. Very simple... Except
that the Android SDK seems to require that list to be a listview which
is implemented in a completely different way from other programming
languages... (Slight rant following, skip to the bottom to see my
question, sorry...) Why is it so hard? Why can't I just say "Here's a
listview on the page and there is a method for adding options onto it
and I'll iterate through my result set to add them"?

My question is simple - is there a simple way to use lists in Android?
Or does one have to define entire screens every time just to display a

2. Microphone disabled by audio adapter?

Just started using my ADP1 in the car; with an HTC audio adapter, I
can connect a line from the phoen to the car stereo. Works great for
music, but when I tried to use the phone in speakerphone mode, the
internal microphone was disabled. Is there any work around for this?
The HTC pinout has a microphone input, so I guess plugging an audio
adapter in automatically disables it.

When I use the HTC headphones that came with the phone, I am still
able to use the phone as a phone, without unplugging them.

3. How to access storage by using API?

4. keypad stuff

5. How to compile Android kernel with Ipv6?

6. memory leak in activity

7. How to launch my app if some one browses any xml file