hi, this sample tutorial may help you
http://stackoverflow.com/questions/459729/how-to-display-list-of-images-in-listview-in-android/892643#892643

On Thu, May 21, 2009 at 11:36 PM, Morelli Giuseppe
<[email protected]>wrote:

>
> Hi guys,
> I'm trying to create a simple list for my app extending the
> ListActivity Class.
> All names the names I want to display are stored in an ArrayList, and
> I use ArrayAdapter to link each element of the array with a row in the
> list view. This is the code to instatiate the ArrayAdapter:
>
> ArrayList listItems = new ArrayList<String>();
> ArrayAdapter aa = new ArrayAdapter<String>(this, R.layout.singlerow,
> listItems);
>
> where "R.layout.singlerow" is:
>
> <?xml version="1.0" encoding="utf-8"?>
>
> <TextView android:id="@+id/textInfo"
>        xmlns:android="http://schemas.android.com/apk/res/android";
>        android:layout_width="fill_parent"
> android:layout_height="wrap_content">
> </TextView>
>
> and my main.xml is:
>
> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/
> android"
>        android:id="@+id/mainLinearLayout"
> android:layout_width="fill_parent"
>        android:layout_height="wrap_content" android:padding="10px">
>        <ListView android:id="@android:id/list"
> android:orientation="horizontal"
>                android:layout_width="fill_parent"
> android:layout_height="fill_parent">
>        </ListView>
>
> </LinearLayout>
>
> Now my problem is: how can I add an image for each item in the list?
> I've tried a lot of solution, but all are not working. Please help me,
> I'm becoming crazyyyyyyyy!
>
> Thank you guys.
>
> >
>

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