I have a custom array adapter where each item consists of two textviews over an imageview(SmartImageView is a third party imageview that renders remote images from a url):
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.loopj.android.image.SmartImageView
android:id="@+id/backgroundImage"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<RelativeLayout
android:id="@+id/text"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginTop="10dp"
android:text="Data Model Title"
android:textSize="30sp" />
<TextView
android:id="@+id/details"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/title"
android:layout_marginBottom="10dp"
android:layout_marginLeft="10dp"
android:layout_marginTop="10dp"
android:text="Data Model Details"
android:textSize="15sp" />
</RelativeLayout>
</FrameLayout>
I see the image with a top and bottom margin and no text:
1) the RelativeLayout with the text should go over the image since it is the 2nd child of FrameLayout
2) why is there a margin above and below my image? I said my imageview's dimensions were match parent, and didnt specify any top or bottom margins for it