Hello,

I'm having the following problem.
I'm trying to populate a ListView with the following:
                twText = (ListView) findViewById(R.id.list_items);
                ArrayAdapter<String> twText_list = new
ArrayAdapter<String>(this, R.layout.list_item, R.id.row_text2,
tw_text);
                twText.setAdapter(twText_list);

and the list_item.xml is this one:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android";
    android:layout_width="fill_parent"
    android:layout_height="wrap_content">
    <TextView android:id="@+id/row_text2"
        android:textAppearance="?android:attr/textAppearanceSmall"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        />
</LinearLayout>


That works perfectly, but once I add an ImageView it crashes:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android";
    android:layout_width="fill_parent"
    android:layout_height="wrap_content">
    <imageView android:id="@+id/profile_image_url"
        android:maxWidth="50px"
        android:maxHeight="20px"
         />
    <TextView android:id="@+id/row_text2"
        android:textAppearance="?android:attr/textAppearanceSmall"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        />
</LinearLayout>


What I don't understand is that if I replace the ImageView with just another
TextView it works.

Any ideas? With an example preferably.. I'm really new on this.
Thanks in advance

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" 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-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to