3 messages in com.googlegroups.android-beginnersRe: how to create a hierarchical list...
FromSent OnAttachments
Anil04 Jan 2008 08:46 
etha...@gmail.com04 Jan 2008 23:57 
Anil05 Jan 2008 03:23 
Subject:Re: how to create a hierarchical list of lists? (aka Tree)
From:Anil (anil@gmail.com)
Date:01/05/2008 03:23:45 AM
List:com.googlegroups.android-beginners

Thank you! putting a specific pixel size (below) got me past the error. Now I shall try to figure out how to do the rest...

<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/ android" android:layout_width="wrap_content" android:layout_height="wrap_content">

<ListView id="@+id/android:list" android:layout_height="500px" android:layout_width="wrap_content">

<ListView id="@+id/android:list" android:layout_height="50px" android:layout_width="50px"> </ListView> <TextView id="@+id/android:empty" android:layout_height="50px" android:layout_width="50px" android:text="No Notes!"/>

</ListView> <TextView id="@+id/android:empty" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="No Notes!"/> </LinearLayout>

On Jan 5, 1:57 am, "etha@gmail.com" <etha@gmail.com> wrote:

Take a look at the ListView class in the SDK. The second line says:

"Note:You cannot use the value wrap_content  for the android:layout_height attribute of a ListView in XML if the parent's size is also not strictly specified (for example, if the parent were ScrollView you could not specify wrap_content since it also can be any length. However, you can use wrap_content if the ListView parent has a specific size, such as 100 pixels."

On Jan 4, 11:46 am, Anil <anil@gmail.com> wrote:

Looking at the Notepadv3 tutorial, I am trying to create a list of lists - e.g. a tree. However, I get an error "List views cant have UNSPECIFIED size"

Here is my (modified) notes_list.xml:

<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/ android"       android:layout_width="wrap_content"         android:layout_height="wrap_content">

    <ListView id="@+id/android:list"           android:layout_width="wrap_content"                 android:layout_height="wrap_content">

       <ListView id="@+id/android:list"                 android:layout_width="wrap_content"                 android:layout_height="wrap_content">         </ListView>

    </ListView>         <TextView id="@+id/android:empty"           android:layout_width="wrap_content"                 android:layout_height="wrap_content"                 android:text="No Notes!"/> </LinearLayout>

Any help appreciated. thanks, Anil- Hide quoted text -