enter code here
<GridLayout xmlns:tools="http://schemas.android.com/tools"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:rowCount="6"
android:columnCount="4" >
<!-- 定义文本框,跨4列 -->
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_columnSpan="4"
android:textSize="50sp"
android:layout_marginLeft="4px"
android:layout_marginRight="4px"
android:padding="5px"
android:layout_gravity="right"
android:background="#eee"
android:textColor="#000"
android:text="测试"
/>
<!-- 定义两个按钮,删除和清零 -->
<Button
android:id="@+id/bn1"
android:layout_columnSpan="2"
android:layout_rowSpan="1"
android:layout_gravity="fill"
android:text="清零"
/>
<Button
android:id="@+id/bn2"
android:layout_columnSpan="2"
android:layout_rowSpan="1"
android:layout_gravity="fill"
android:text="删除"
/>