Setting empty text on listView that does not have @+android:list as its ID?

by Lee » Thu, 10 Sep 2009 09:25:12 GMT

Sponsored Links
 I've got a tabhost that has a number of tabs that all contain a
ListView (among other widgets).

I need to address each ListView separately and so they all have a
unique ID that is not @+android:list.

How does one define the empty text for a list if the only way that it
can be done is through the assumption that the list will have an id of
@+id/android:list and the empty text @+id/android:empty


Setting empty text on listView that does not have @+android:list as its ID?

by Mark Murphy » Thu, 10 Sep 2009 09:33:15 GMT


For an empty list, just make the ListView be invisible
(setVisibility(View.INVISIBLE)) and make an associated TextView be
visible. Use FrameLayout (or RelativeLayout) so they can take up the
same space in the GUI, just one or the other being visible.

Mark Murphy (a Commons Guy)  | 

_Android Programming Tutorials_ Version 1.0 Available!


Sponsored Links

Other Threads

1. HH android Meizu M

sekedar inpo

makin perfect aja produk negeri ginseng neh :D


"Indonesian Android Community [id-android]" 

2. How can I catch screen orientation change in onPause()?

Specifically, I need a way of _not_ performing the onPause
functionality I've implemented when it occurs because of a change in
screen orientation.

Thanks -- Thom


3. GPS signal strength

4. Issue in launching google Map

5. Obtain RSSI in GSM cells

6. Mod: Google Day 2010 (datang ya ...)

7. AppWidget retrieving data from another Application