inside ListView item what I'm trying to do is to place an ImageView over a TextView while the TextView must fill it's parent, here's what i did:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView android:id="@+id/text"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentTop="true"
android:background="#FFFF00" />
<ImageView android:id="@+id/icon"
android:layout_width="50dp"
android:layout_height="100dp"
android:layout_alignParentTop="true"
android:layout_alignParentRight="true"
android:background="#550000FF" />
</RelativeLayout>
notes:
- tried to add {android:layout_alignParentBottom="true"} to TextView - nothing changed
- tried to use "fill_parent" instead of "match_parent" - nothing changed
- tried to add "android:singleLine="false"" - nothing changed
- ImageView height must be fixed, but i can't do then for TextView.
- there is no problem when the TextView contains enough text to make it taller than image
here is a screenshot: notice that the TextView is acting like it's given "wrap_content" while it should be filling all the white space.
so what am I missing here?
thanks!