Hi warrior,

Could you show your array.xml?
And one more thing, I see you set layout_below but you're using a
LinearLayout, layout_below is used in RelativeLayout.

Rudy

> -----Original Message-----
> From: [email protected] [mailto:android-
> [email protected]] On Behalf Of Warrior
> Sent: Friday, August 06, 2010 2:36 AM
> To: Android Developers
> Subject: [POSSIBLE SPAM] [android-developers] ListView as part of a
> Activity
> Importance: Low
> 
> Hi am trying to add a List view as below. But the list never appears.
> 
> <?xml version="1.0" encoding="utf-8"?>
> <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="wrap_content"
>     android:text="@string/hello"
>     />
> <EditText
>         android:id="@+id/entry"
>         android:layout_width="fill_parent"
>         android:layout_height="wrap_content"
>         android:background="@android:drawable/editbox_background"
> />
> <ListView
>               android:id="@+id/list"
>         android:layout_width="wrap_content"
>         android:layout_height="wrap_content"
>         android:layout_below="@id/entry"
>         android:entries="@array/strarr"
>         android:dividerHeight="14.5sp"
>               />
> <Button
>         android:id="@+id/ok"
>         android:layout_width="wrap_content"
>         android:layout_height="wrap_content"
>         android:layout_below="@id/list"
>         android:layout_alignParentRight="true"
>         android:layout_marginLeft="10dip"
>         android:text="Add to List" />
> 
> </LinearLayout>
> 
> What am I doing wrong?
> 
> --
> 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

-- 
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

Reply via email to