Android-表格布局 计算器 修改版
<?xml version="1.0" encoding="utf-8"?>
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_row="4"
android:stretchColumns="3">
<EditText
android:layout_width="387dp"
android:layout_height="170dp"
android:editable="true"
android:inputType="number"
android:textSize="30dp"
android:background="#999">
</EditText>
<TableRow>
<Button
android:layout_width="0dp"
android:layout_height="70dp"
android:text="CE"
android:textSize="40dp"
android:background="#990"
android:textColor="#FFF"
android:layout_weight="1"/>
<Button
android:layout_width="0dp"
android:layout_height="70dp"
android:text="C"
android:textSize="40dp"
android:background="#990"
android:textColor="#FFF"
android:layout_weight="1"/>
<Button
android:layout_width="0dp"
android:layout_height="70dp"
android:textSize="40dp"
android:background="#990"
android:textColor="#FFF"
android:text="()"
android:layout_weight="1"/>
<Button
android:layout_width="0dp"
android:layout_height="70dp"
android:text="+"
android:textSize="40dp"
android:background="#990"
android:textColor="#FFF"
android:layout_weight="1"/> </TableRow>
<TableRow>
<Button
android:layout_width="0dp"
android:layout_height="70dp"
android:text="7"
android:textSize="40dp"
android:background="#999"
android:textColor="#FFF"
android:layout_weight="1"/>
<Button
android:layout_width="0dp"
android:layout_height="70dp"
android:text="8"
android:textSize="40dp"
android:background="#999"
android:textColor="#FFF"
android:layout_weight="1"/>
<Button
android:layout_width="0dp"
android:layout_height="70dp"
android:text="9"
android:textSize="40dp"
android:background="#999"
android:textColor="#FFF"
android:layout_weight="1"/>
<Button
android:layout_width="0dp"
android:layout_height="70dp"
android:text="-"
android:textSize="40dp"
android:background="#990"
android:textColor="#FFF"
android:layout_weight="1"/>
</TableRow>
<TableRow>
<Button
android:layout_width="0dp"
android:layout_height="70dp"
android:text="4"
android:textSize="40dp"
android:background="#999"
android:textColor="#FFF"
android:layout_weight="1"/>
<Button
android:layout_width="0dp"
android:layout_height="70dp"
android:text="5"
android:textSize="40dp"
android:background="#999"
android:textColor="#FFF"
android:layout_weight="1"/>
<Button
android:layout_width="0dp"
android:layout_height="70dp"
android:text="6"
android:textSize="40dp"
android:background="#999"
android:textColor="#FFF"
android:layout_weight="1"/>
<Button
android:layout_width="0dp"
android:layout_height="70dp"
android:text="*"
android:textSize="40dp"
android:background="#990"
android:textColor="#FFF"
android:layout_weight="1"/>
</TableRow>
<TableRow>
<Button
android:layout_width="0dp"
android:layout_height="70dp"
android:text="1"
android:textSize="40dp"
android:background="#999"
android:textColor="#FFF"
android:layout_weight="1"/>
<Button
android:layout_width="0dp"
android:layout_height="70dp"
android:text="2"
android:textSize="40dp"
android:background="#999"
android:textColor="#FFF"
android:layout_weight="1"/>
<Button
android:layout_width="0dp"
android:layout_height="70dp"
android:text="3"
android:textSize="40dp"
android:background="#999"
android:textColor="#FFF"
android:layout_weight="1"/> <Button
android:layout_width="0dp"
android:layout_height="70dp"
android:text="÷"
android:textSize="40dp"
android:background="#990"
android:textColor="#FFF"
android:layout_column="3"
android:layout_weight="1"/>
</TableRow>
<TableRow>
<Button
android:layout_width="0dp"
android:layout_height="70dp"
android:text="0"
android:textSize="40dp"
android:background="#999"
android:textColor="#FFF"
android:layout_weight="1"/>
<Button
android:layout_width="0dp"
android:layout_height="70dp"
android:text="00"
android:textSize="40dp"
android:background="#999"
android:textColor="#FFF"
android:layout_weight="1"/>
<Button
android:layout_width="0dp"
android:layout_height="70dp"
android:text="."
android:textSize="40dp"
android:background="#999"
android:textColor="#FFF"
android:layout_weight="1"/>
<Button
android:layout_width="0dp"
android:layout_height="70dp"
android:text="="
android:textSize="40dp"
android:background="#990"
android:textColor="#FFF"
android:layout_weight="1"/>
</TableRow>
</TableLayout>

Android-表格布局 计算器 修改版的更多相关文章
- Android表格布局(Table Layout)
Android表格布局(Table Layout) 先来看布局管理器之间继承关系图: 图1 可知TableLayout继承了LinearLayout,所以表格布局本质上依然是线性管理器. 表格布局采用 ...
- Android表格布局之设置边框
Android表格布局本身没有边框,不过可以通过背景色的设置可以实现表格边框的显示. 首先可以设置TableRow的背景色,然后设置内容的背景色.根据它们的颜色差就出现了边框.只要微调Content与 ...
- Android 表格布局<TableLayout>
表格布局即,tableLayout,表格布局通过行.列的形式来管理UI组件,TablelLayout并不需要明确地声明包含多少行.多少列,而是通过TableRow,以及其他组件来控制表格的行数和列数, ...
- [android] 表格布局和绝对布局
/*****************2016年4月28日 更新*************************************/ 知乎:为什么Android没有像iOS一样提供autolay ...
- Android 表格布局 TableLayout
属性介绍 stretchColumns:列被拉伸 shrinkColumns:列被收缩 collapseColumns:列被隐藏 举例测试 <TableLayout android:id=&qu ...
- Android 网格布局 计算器
<GridLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools=&quo ...
- Android 线性布局 计算器
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android=&quo ...
- 案例:TableLayout表格布局——迷你计算器
计算器可以常用线性布局(LinearLayout)和表格布局(tableLayout).Gridlayout 今天我用的是表格布局 效果如下: 代码如下: <TableLayout xmlns: ...
- Android 仿美团网,大众点评购买框悬浮效果之修改版
转帖请注明本文出自xiaanming的博客(http://blog.csdn.net/xiaanming/article/details/17761431),请尊重他人的辛勤劳动成果,谢谢! 我之前写 ...
随机推荐
- Power Gating的设计(架构)
switching network的层次: 一般选择flatted的形式,hierarchy的结构对voltage drop和performance delay有影响. Power network的结 ...
- 记在centos中连接无线网络的一次过程
1. 首先, 你的系统要能驱动无限网卡, 要是人品好的话, 系统已经自带了你的网卡的驱动程序. 不然就要先搞定无线网卡的驱动再说. 不然后面的步骤也就没必要了. 2. 看一下你的无线网卡叫什么: iw ...
- 关于archlinux下的ralink5370网卡
驱动此网卡要使用 rt2800usb,rt2800lib 这两个模块 顺便说一下对模块进行操作的命令: rmmod 模块名 //为移除模块 insmod 模块所在路径 //为添加模块 查看网卡是否能被 ...
- SQL删除重复数据方法
例如: id name value 1 a pp 2 a ...
- Android利用数据库传送数据
---恢复内容开始--- 一.建表 //通过SQLiteDatabase 创建数据库stu.db3 final SQLiteDatabase db = SQLiteDatabase.openOrCre ...
- 验证(Javascript和正则表达式)
昨天写了验证(C#和正则表达式),今天又写了个js版的验证.现在贴出来,为了方便自己查阅,同时也希望能给需要的人帮助和一些启发.由于今天才开始接触js,所以可能会有一些错漏,希望大家能批评指正. va ...
- MySQL OnlineDDL
参考资料: http://dev.mysql.com/doc/refman/5.6/en/innodb-create-index-overview.html http://www.mysqlperfo ...
- 使用BusyBox制作根文件系统【转】
本文转载自:http://www.cnblogs.com/lidabo/p/5300180.html 1.BusyBox简介 BusyBox 是很多标准 Linux 工具的一个单个可执行实现.Busy ...
- git log用法【转】
转自:http://www.cnblogs.com/gbyukg/archive/2011/12/12/2285419.html PHP技术交流群 170855791 git log 查看提交记录,参 ...
- linux下rm命令修改,增加回收站功能【笔记】
一个脚本,linux的用户根目录下.bashrc最后加入如下代码,可以修改rm命令,让人们rm时候不再会全部删除,而是会加入到回收站里,以下是根据别人的资料参考修改的,不是原创 加入后,需要sourc ...