实现截图
problems
不知道怎么自己导入图片资源��
实现代码
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
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"
tools:context="com.example.tris.relativelayout.MainActivity"
android:gravity="center_horizontal"
>
<TextView
android:id="@+id/view01"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@mipmap/ic_launcher_round"
android:layout_centerInParent="true"
/>
<TextView
android:id="@+id/view02"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@mipmap/ic_launcher_round"
android:layout_above="@+id/view01"
android:layout_alignLeft="@+id/view01"
/>
<TextView
android:id="@+id/view03"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@mipmap/ic_launcher_round"
android:layout_below="@+id/view01"
android:layout_alignLeft="@+id/view01"
/>
<TextView
android:id="@+id/view04"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@mipmap/ic_launcher_round"
android:layout_toLeftOf="@+id/view01"
android:layout_alignTop="@+id/view01"
/>
<TextView
android:id="@+id/view05"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@mipmap/ic_launcher_round"
android:layout_toRightOf="@+id/view01"
android:layout_alignTop="@+id/view01"
/>
</RelativeLayout>