相用到的是对布局<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="match_parent" tools:context="com.example.tset1.MainActivity"> <Button android:id="@+id/zhong" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="中" android:layout_centerInParent="true" /> <Button android:id="@+id/bei" android:layo