Well, I have a Container, an Image and some Texts (inside another container), this way:
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="5dp"
android:layout_margin="10dp"
android:id="@+id/btn">
<ImageView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/background"
android:src="@drawable/background"
android:scaleType="centerCrop"/>
<LinearLayout
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/icon_left"
android:layout_gravity="center_vertical" />
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical">
<TextView
android:layout_height="wrap_content"
android:layout_width="wrap_content"
custom:fontStyle="bold"
android:textSize="@dimen/textSizeSmall"
android:text="Header" />
<TextView
android:layout_height="wrap_content"
android:layout_width="wrap_content"
custom:fontStyle="regular"
android:textSize="@dimen/textSizeMicro"
android:text="Body" />
</LinearLayout>
</LinearLayout>
</RelativeLayout>
The image associated with ImageView (yes, it is a background image) is bigger than the height of all text together. Thus, I would like to "crop" it inside RelativeLayout. But that ImageView always take full size when I set it to fill_parent. :(
What can I do?
P.S.: I already tried to use that image as background of RelativeLayout
. Not working also.
Pleaaase, help!!