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),请尊重他人的辛勤劳动成果,谢谢! 我之前写 ...
随机推荐
- oracle添加日志表
--创建表 CREATE TABLE KNET_DOMAIN_DNS_FORWARDED ( ID BYTE) DEFAULT sys_guid() NOT NULL , KEYWORD BYTE) ...
- oracle的索引维护
索引重建 Alter index idx_name rebuild partition index_partition_name [online nologging] 需要对每个分区索引做rebuil ...
- SQL —— 视图
1. 为什么使用视图 1) 提高数据的安全型,不同权限的用户可以查看数据的不同. 2) 符合用户日常业务逻辑 2. 什么是视图 视图是一种查看数据库中一个或多个表中的数据的方法. 视图是一种虚拟表. ...
- c语言对文件操作完成后尽量手动关闭
是这样的,我写了一个函数,传给函数文件名,在函数中对文件写入一些内容.在这个函数的后面没有手动使用 fclose. 当在程序中对这个函数调用两次之后,最终把要写入的文件写错了. 在第二次使用 fope ...
- access链接最原始代码,两种
using System.Configuration; using System.Data; using System.Linq; using System.Web; using System.Web ...
- 设置Sql Agent运行Job时的执行账户
相信使用过Sql Server的人都应该知道,使用Sql Agent可以建立一些自动化Job来帮我们周期性地执行一些任务,其中执行SSIS包就是其中一个任务.而在SSIS包中有时候会去做读取文件等一些 ...
- 【MFC三天一个游戏】之 局域网黑白棋
欢迎加入我们的QQ群,无论你是否工作,学生,只要有c / vc / c++ 编程经验,就来吧!158427611 花了三天上班时间,妈的上班写就是不能静下心来,擦,要防BOSS巡山.... 以前也写过 ...
- vc获取特殊路径(SpecialFolder)
%SystemDrive% 操作系统所在的分区号.如 C: %SystemRoot% 操作系统根目录.如 C:\WINDOWS %windir% 操作系统根目录.如 C:\WINDOWS %ALLUS ...
- armv8(aarch64)linux内核中flush_dcache_all函数详细分析【转】
转自:http://blog.csdn.net/qianlong4526888/article/details/12062809 版权声明:本文为博主原创文章,未经博主允许不得转载. /* * __ ...
- IE11打不开网页, 所有菜单都被禁用了。
估计是安装完PPS之后,PPS安装程序附加了一些加载项到浏览器,而我在安装时强制禁用了它的加载项引起的. 解决方法是重置IE设置,命令为:inetcpl.cpl,点击高级选项卡的重置即可.