Android Studio简易计算器1——使用TableLayout表格布局
一、开发环境
(1)Android Studio
(2)夜神模拟器7.0.2.2
二、activity_main.xml
<?xml version="1.0" encoding="utf-8"?>
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:stretchColumns="*"
>
<TableRow>
<TextView
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="150dp"
android:gravity="right|bottom"
android:text="0"
android:textSize="50dp" />
</TableRow>
<TableRow>
<Button
android:layout_width="120dp"
android:layout_height="60dp"
android:layout_column="0"
android:textColor="#FFA500"
android:text="AC"
/>
<Button
android:layout_width="120dp"
android:layout_height="60dp"
android