Try setting the height of your header TextView to "wrap_content" ---------------------------------------------------------------------- There are only 10 types of people in the world... Those who know binary and those who don't. ----------------------------------------------------------------------
On Thu, Nov 5, 2009 at 6:37 PM, tatman <[email protected]> wrote: > Is is possible to setup a listview that has a header? > > I tried this (below) and the list doesn't display. If I take out the > TextView above the listview, then the list shows > > <?xml version="1.0" encoding="utf-8"?> > <LinearLayout > xmlns:android="http://schemas.android.com/apk/res/android" > android:layout_width="fill_parent" > android:layout_height="fill_parent"> > <TextView > android:id="@+id/listHeaderId" > android:layout_width="fill_parent" > android:layout_height="fill_parent" > android:text="this contains the header data" > /> > <ListView > android:id="@+id/android:list" > android:layout_width="fill_parent" > android:layout_height="fill_parent" > /> > <TextView > android:id="@+id/android:empty" > android:layout_width="fill_parent" > android:layout_height="fill_parent" > android:text="No stocks...this is an error!" > /> > </LinearLayout> > > -- > You received this message because you are subscribed to the Google > Groups "Android Beginners" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected]<android-beginners%[email protected]> > For more options, visit this group at > http://groups.google.com/group/android-beginners?hl=en -- You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en

