GridLayout
本章以一个小的实现示例讲述: 实现效果如图:
代码实现:
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/GridLayout1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:columnCount="4"
android:orientation="horizontal"
android:rowCount="6" >
android:layout_columnSpan="4"
android:layout_gravity="fill"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:background="#FFCCCC"
android:text="0"
android:textSize="50sp" />
android:layout_columnSpan="2"
android:layout_gravity="fill"
android:text="回退" />
android:layout_columnSpan="2"
android:layout_gravity="fill"
android:text="清空" />
android:layout_width="wrap_content"
android:text="." />