[android-developers] Re: Empty Lists

2009-08-19 Thread Eurig Jones
Ok, this is a bit weird. When I use this with setContentView() of my ListActivity I get a StackOverflowError!... http://schemas.android.com/apk/res/ android" android:layout_width="fill_parent" android:layout_height="fill_parent"> But when I use this, it shows me the list... ht

[android-developers] Re: Empty Lists

2009-08-19 Thread Marco Nelissen
You can just call setContentView() with some other view, then replace it with a listview again once you have items to show. On Wed, Aug 19, 2009 at 6:42 AM, Eurig Jones wrote: > > Thanks Mark. > > Yeah, I saw that in the docs but I'm using a non-custom List, I have > no custom layout and I don't

[android-developers] Re: Empty Lists

2009-08-19 Thread Jack Ha
Do something like the following. The View with the empty id is used automatically when the ListAdapter has no data for the ListView. http://schemas.android.com/apk/res/ android" android:layout_width="wrap_content" android:layout_height="wrap_content"> -- Jack Ha Open Source Devel

[android-developers] Re: Empty Lists

2009-08-19 Thread Eurig Jones
Thanks Mark. Yeah, I saw that in the docs but I'm using a non-custom List, I have no custom layout and I don't intend to create one. How could I specify an empty view if my list returns no records? On Aug 19, 11:24 pm, Mark Murphy wrote: > Eurig Jones wrote: > > Does anyone know if it's possibl

[android-developers] Re: Empty Lists

2009-08-19 Thread Mark Murphy
Eurig Jones wrote: > Does anyone know if it's possible to show a "Currently have no items" > type view in a ListActivity when, obviously, you have no items? http://developer.android.com/reference/android/app/ListActivity.html "Optionally, your custom view can contain another view object of any t