1.使用帧布局
<LinearLayout
android:layout_width="match_parent"
android:layout_height="150dp">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="fitXY"
android:src="@drawable/a3"
/>
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="你好"
android:textSize="60dp"
android:gravity="center"
/>
</FrameLayout>
</LinearLayout>
2.渲染: