In my listview, I'm trying to make the list row show 2 imageviews as
well as the textview which holds the data. The layout of a single row
is like this: [textview | img1| img2]. The problem is the text inside
the textview overlaps the imageviews. I've tried various layout
options but can't seem to get it right. This is my layout file:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:padding="5px"
        xmlns:android="http://schemas.android.com/apk/res/android";
>
        <TextView
                android:id="@+id/label"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
            android:paddingLeft="2dip"
            android:textColor="#eee"

        />

        <LinearLayout
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_alignParentRight="true"

                >
                <ImageView
                                android:id="@+id/alert"
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:src="@drawable/stat_notify_alarm"
                                android:tag="alarm"
                        />

                        <ImageView
                                android:id="@+id/delete"
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:src="@android:drawable/ic_delete"
                                android:layout_toRightOf="@id/alert"
                                android:paddingLeft="10px"
                                android:tag="del"
                        />

        </LinearLayout>

</RelativeLayout>

and this is the code I'm using for generating the list:

setListAdapter(new ArrayAdapter<String>(this, R.layout.favs,
R.id.label, shows);

Thanks.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to