Hi John, I am using a button on the Custom List instead of Text view and its working fine because i am using second parameter like this android:layout_height="wrap_content" so you are filling the whole screen with your text view by using android:layout_height="fill_parent" if you will change your this parameter android:layout_height="wrap_content" hopes it will work fine.
Regards, Gulfam On Sep 2, 10:25 pm, Jack Ha <[email protected]> wrote: > This is because you set the layout_height to fill_parent for the > textview above the listview. > > -- > Jack Ha > Open Source Development Center > ・T・ ・ ・Mobile・ stick together > The coverage you need at the price you want > > The views, opinions and statements in this email are those of > the author solely in their individual capacity, and do not > necessarily represent those of T-Mobile USA, Inc. > > On Sep 1, 7:02 pm, John <[email protected]> wrote: > > > I have found a lot of tutorials on the web about custom listviews. > > All of them have a main.xml that looks like > > > <LinearLayout xmlns:android="http://schemas.android.com/apk/res/ > > android" > > android:orientation="vertical" android:layout_width="fill_parent" > > android:layout_height="fill_parent"> > > > <ListView android:id="@android:id/list" > > android:layout_width="fill_parent" > > android:layout_height="fill_parent" > > android:layout_weight="1" android:drawSelectorOnTop="false" > > /> > > > <TextView android:id="@+id/empty" android:layout_width="fill_parent" > > android:layout_height="fill_parent" > > android:text="" /> > > </LinearLayout> > > > This all works fine until I have a label (TextView) above the > > ListView like this. Only the label would show up. The list is > > gone. I was wondering I am missing something here. Thanks in > > advance > > > <LinearLayout xmlns:android="http://schemas.android.com/apk/res/ > > android" > > android:orientation="vertical" android:layout_width="fill_parent" > > android:layout_height="fill_parent"> > > > <TextView android:layout_width="fill_parent" > > android:layout_height="fill_parent" > > android:text=" This is a title" /> > > > <ListView android:id="@android:id/list" > > android:layout_width="fill_parent" > > android:layout_height="fill_parent" > > android:layout_weight="1" android:drawSelectorOnTop="false" > > /> > > > <TextView android:id="@+id/empty" android:layout_width="fill_parent" > > android:layout_height="fill_parent" > > android:text="" /> > > </LinearLayout> --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" 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-developers?hl=en -~----------~----~----~----~------~----~------~--~---

