1.清单文件为默认
2.布局文件如下:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/image_"
android:orientation="vertical"
tools:context="com.example.bluelesson.myimageview.MainActivity">
<ImageView
android:layout_gravity="center_horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/ic_launcher"
/>
<TextView
android:layout_gravity="center_horizontal"
android:text="后面的牛人是谁"
android:textSize="20sp"
android:textColor="#e40d0d"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
<ImageView
android:layout_gravity="center_horizontal"
android:src="@drawable/ic_launcher_foreground"
android:layout_width="200dp"
android:layout_height="200dp" />
</LinearLayout>