I have this LinearLayout:
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
<ImageView
android:layout_width="100dp"
android:layout_height="70dp"
android:src="@drawable/ic_launcher"
android:scaleType="centerCrop"/>
<TextView
android:layout_width="100dp"
android:layout_height="30dp"
android:background="#FFD800"
android:textColor="@android:color/black"
android:gravity="center"
android:text="Text View"/>
</LinearLayout>
And I want to mask it with rounded corner, like this:
I tried to put it in a FrameLayout with another layout with shape.xml on top of it,
But the most I got was:
or
I'm looking for a way to use shape.xml background,
But with transparent inside the border, and white color outside.
My shape.xml:
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid
android:color="#FFFFFF">
</solid>
<stroke
android:width="2dp"
android:color="#000000" >
</stroke>
<padding
android:left="5dp"
android:top="5dp"
android:right="5dp"
android:bottom="5dp">
</padding>
<corners
android:radius="50dp">
</corners>
</shape>