Android GridLayout計算機UI(2)
Android GridLayout計算機UI(2)
資料來源: http://tech.it168.com/a2011/1213/1287/000001287977.shtml
<?xml version=”1.0″ encoding=”utf-8″ ?> – <GridLayout <Button android:layout_column=”3“ android:text=”/” /> <Button android:text=”1” /> <Button android:text=”2” /> <Button android:text=”3” /> <Button android:text=”*” /> <Button android:text=”4” /> <Button android:text=”5” /> <Button android:text=”6” /> <Button android:text=”–” /> <Button android:text=”7” /> <Button android:text=”8” /> <Button android:text=”9” /> <Button android:layout_gravity=”fill“ android:layout_rowSpan=”3“ android:text=”+” /> <Button android:layout_columnSpan=”2“ android:layout_gravity=”fill“ android:text=”0” /> <Button android:text=”00” /> <Button android:layout_columnSpan=”3“ android:layout_gravity=”fill“ android:text=”=” /> </GridLayout>
|