<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:background="@android:drawable/picture_frame">

    <tw.wancw.widget.SquareImageView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:src="@android:drawable/ic_menu_gallery"
        android:scaleType="centerInside"
        />

    <tw.wancw.widget.SquareImageView
        android:id="@+id/card_image"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:scaleType="centerCrop"
        />

    <TextView
        android:id="@+id/card_caption"
        android:layout_alignBottom="@id/card_image"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:ellipsize="end"
        android:lines="1"
        android:singleLine="true"
        android:textSize="24sp"
        android:textColor="@android:color/white"
        android:background="#7F000000"
        tools:text="你好你好你好你好你好 你好你好你好你好你好你好你好你好"
        />

</RelativeLayout>
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:background="@android:drawable/picture_frame">

    <tw.wancw.widget.SquareImageView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:src="@android:drawable/ic_menu_gallery"
        android:scaleType="centerInside"
        />

    <tw.wancw.widget.SquareImageView
        android:id="@+id/card_image"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:scaleType="centerCrop"
        />

    <TextView
        android:id="@+id/card_caption"
        android:layout_alignBottom="@id/card_image"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:ellipsize="end"
        android:lines="1"
        android:singleLine="true"
        android:textSize="14sp"
        android:textColor="@android:color/white"
        android:background="#7F000000"
        tools:text="你好你好你好你好你好 你好你好你好你好你好你好你好你好"
        />

</RelativeLayout>
Adjust text size of card caption.
Adjust text size of card caption.
