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!

Regards
--~--~---------~--~----~------------~-------~--~----~



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
hack...@android.com

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. How to read dumpsys alarm?

Hi there,

  I have the problem that alarms get lost somehow and I would like to know
how to read the dumpsys alarm output?

  The actual alarms I am trying to trackdown are from com.newsrob. I am also
running a com.scheduletest. The latter I run as repeating alerts once an
hour as RTC_WAKEUP and for the former I started out this way, but switched
(testwise) to single shot alarms and re-schedule it afterwards myself.

  Now the scheduletest still fires, but com.newsrob stopped firing after a
couple of alarms.

  I (believe I) can see the alarms when looking at the output:

(1)
  com.scheduletest
    3641ms running, 8 wakeups
    8 alarms: Intent { flags=0x4 (has extras) }

  com.newsrob
    2186ms running, 9 wakeups
    4 alarms: Intent { action=upload_only flags=0x4 (has extras) } <!-- not
important -->
    5 alarms: Intent { action=Full flags=0x4 (has extras) }

  I am not sure though what the output actually means ...

  Also I can see only the still firing alarm in another part of the ouput:

(2)
RTC_WAKEUP 0:
    Alarm{43230448 type 0 com.scheduletest}
    type=0 when=1235581332995 repeatInterval=3600000 count=1
    operation=android.app.pendingint...@432303c8

  More output below.

  Any ideas? It looks like my alarms are still there but not scheduled
anymore

Cheers,
Mariano

localhost:tmp mkamp$ adb -d shell dumpsys alarm
Currently running services:
  alarm
-------------------------------------------------------------------------------
DUMP OF SERVICE alarm:
Current Alarm Manager state:

  Realtime wakeup alarms that are scheduled:
  RTC_WAKEUP 2:
    Alarm{43253d10 type 0 com.android.providers.calendar}
    type=0 when=1235646011369 repeatInterval=0 count=0
    operation=android.app.pendingint...@43253ca0
  RTC_WAKEUP 1:
    Alarm{4322ea58 type 0 android}
    type=0 when=1235592977436 repeatInterval=43111000 count=0
    operation=android.app.pendingint...@431ae4a8
  RTC_WAKEUP 0:
    Alarm{43230448 type 0 com.scheduletest}
    type=0 when=1235581332995 repeatInterval=3600000 count=1
    operation=android.app.pendingint...@432303c8

  Realtime alarms that are scheduled:
  RTC 1:
    Alarm{432f8338 type 1 com.android.providers.subscribedfeeds}
    type=1 when=1235647474218 repeatInterval=0 count=0
    operation=android.app.pendingint...@4314f5b0
  RTC 0:
    Alarm{4337f320 type 1 android}
    type=1 when=1235581080000 repeatInterval=0 count=0
    operation=android.app.pendingint...@42fbc6c0

  Elapsed realtime wakeup alarms that are scheduled:
[..]
  ELAPSED_REALTIME_WAKEUP 0:
    Alarm{431bdec0 type 2 android}
    type=2 when=289352534 repeatInterval=0 count=0
    operation=android.app.pendingint...@4303a8b0

  Broadcast ref count: 0

  Alarm Stats:
  [..]
  com.newsrob
    2186ms running, 9 wakeups
    4 alarms: Intent { action=upload_only flags=0x4 (has extras) }
    5 alarms: Intent { action=Full flags=0x4 (has extras) }
  com.scheduletest
    3641ms running, 8 wakeups
    8 alarms: Intent { flags=0x4 (has extras) }
  net.everythingandroid.smspopup
    27438ms running, 2 wakeups
    2 alarms: Intent { flags=0x4 (has extras) }
  [..]
  com.google.android.apps.gtalkservice
    32384ms running, 434 wakeups
    17 alarms: Intent {
action=com.google.android.intent.action.GTALK_HEARTBEAT flags=0x4 (has
extras) }
    417 alarms: Intent {
action=com.google.android.intent.action.GTALK_RECONNECT flags=0x4 (has
extras) }
  android
    797055ms running, 809 wakeups
    8 alarms: Intent { action=android.server.checkin.CHECKIN flags=0x4 (has
extras) }
    3 alarms: Intent { action=android.content.syncmanager.SYNC_POLL_ALARM
flags=0x4 (has extras) }
    285 alarms: Intent { action=com.android.location.ALARM_INTENT flags=0x4
(has extras) }
    1 alarms: Intent { action=android.intent.action.DATE_CHANGED flags=0x4
(has extras) }
    90 alarms: Intent {
action=com.android.server.WifiManager.action.DEVICE_IDLE flags=0x4 (has
extras) }
    4577 alarms: Intent { action=android.intent.action.TIME_TICK
flags=0x40000004 (has extras) }
    60 alarms: Intent {
action=com.android.internal.policy.impl.PhoneWindowManager.DELAYED_KEYGUARD
flags=0x4 (has extras) }
    363 alarms: Intent { action=android.content.syncmanager.SYNC_ALARM
flags=0x4 (has extras) }

--~--~---------~--~----~------------~-------~--~----~

2. How to use Media Player in a library class?

Yes, you're correct.  I created my library class a month ago and was
updating it to use callbacks.  I didn't realize it was calling prepare
inside the create method.

Thanks!







--~--~---------~--~----~------------~-------~--~----~

3. dalvik profiling

4. How can I frequently get the onLocationChanged()?

5. How to use Media Player in a library class?

6. Android native and Dalvik performance compare

7. How many projects are being canned because of Market T&Cs