Well, I think you are mixing up what entries means. That refers to the
data that you want to show, whereas you are trying to set the UI for
displaying that data. If you need different layouts for each list item
in the listview, it might be possible, but probably requires some
coding.

On Apr 8, 12:20 pm, ThursdayMorning <[EMAIL PROTECTED]> wrote:
> I have a static context menu which I want to populate with a list.
> Each item has a graphic and some text associated with it. I could
> insert them programatically, but that would be a huge pain, so I want
> to do it in xml. ListView has the android:entries property which says
> you can load an array resource into the array, but it doesn't seem to
> be working with anything more complex than text. This is what I have:
>
> in: arrays.xml
> <resources>
>     <array name="menu_items">
>         <item>
>            <LinearLayout ... >
>
>                         <ImageView  ... />
>
>                         <TextView ...  />
>
>             </LinearLayout>
>         </item>
>         ...
>     </array>
> </resources>
>
> I *think* I should be able to load it like this:
>
> <ListView xmlns:android="http://schemas.android.com/apk/res/android";
>     ...
>     android:entries="@array/menu_items"
>     />
>
> But it just shows up blank. I'm not sure if this is a problem with my
> code, or if what I'm trying to do just isn't possible in Android.
>
> Thanks in advance,
>  - TM
--~--~---------~--~----~------------~-------~--~----~
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]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to