I have the following XML layout for an item that I put in my list view:
<RelativeLayout·
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="4dp"
>
<TextView·
android:id="@+id/librarySongName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textStyle="bold"
android:ellipsize="marquee"
android:scrollHorizontally="true"
android:lines="1"
android:layout_alignParentLeft="true"
/>
<TextView·
android:id="@+id/libraryArtistName"
android:layout_gravity="center_vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceSmall"
android:layout_below="@id/librarySongName"
android:paddingLeft="4dp"
/>
<ImageButton
android:id="@+id/lib_add_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:minHeight="40dp"
android:minWidth="40dp"
android:src="@android:drawable/ic_input_add"
android:layout_alignParentRight="true"
android:gravity="center_vertical"
/>
</RelativeLayout>
However, when I get I get song titles that are too long, my views end up looking like this:
As you can see there are song titles that just get cutoff rather than being ellipsized correctly. Does anyone know how I can fix this?