<?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-表格布局 计算器 修改版的更多相关文章

  1. Android表格布局(Table Layout)

    Android表格布局(Table Layout) 先来看布局管理器之间继承关系图: 图1 可知TableLayout继承了LinearLayout,所以表格布局本质上依然是线性管理器. 表格布局采用 ...

  2. Android表格布局之设置边框

    Android表格布局本身没有边框,不过可以通过背景色的设置可以实现表格边框的显示. 首先可以设置TableRow的背景色,然后设置内容的背景色.根据它们的颜色差就出现了边框.只要微调Content与 ...

  3. Android 表格布局<TableLayout>

    表格布局即,tableLayout,表格布局通过行.列的形式来管理UI组件,TablelLayout并不需要明确地声明包含多少行.多少列,而是通过TableRow,以及其他组件来控制表格的行数和列数, ...

  4. [android] 表格布局和绝对布局

    /*****************2016年4月28日 更新*************************************/ 知乎:为什么Android没有像iOS一样提供autolay ...

  5. Android 表格布局 TableLayout

    属性介绍 stretchColumns:列被拉伸 shrinkColumns:列被收缩 collapseColumns:列被隐藏 举例测试 <TableLayout android:id=&qu ...

  6. Android 网格布局 计算器

    <GridLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools=&quo ...

  7. Android 线性布局 计算器

    <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android=&quo ...

  8. 案例:TableLayout表格布局——迷你计算器

    计算器可以常用线性布局(LinearLayout)和表格布局(tableLayout).Gridlayout 今天我用的是表格布局 效果如下: 代码如下: <TableLayout xmlns: ...

  9. Android 仿美团网,大众点评购买框悬浮效果之修改版

    转帖请注明本文出自xiaanming的博客(http://blog.csdn.net/xiaanming/article/details/17761431),请尊重他人的辛勤劳动成果,谢谢! 我之前写 ...

随机推荐

  1. jvm笔记

    -vmargs -Xms128M -Xmx512M -XX:PermSize=64M -XX:MaxPermSize=128M 1. 各个参数的含义什么? 参数中-vmargs的意思是设置JVM参数, ...

  2. 夺命雷公狗—angularjs—9—ng-class的自定义函数的用法

    angularjs里面其实给我们留下了一个很不错的地方,他就是可以直接调用函数从而对该位置进行处理, 被点击后展示效果如下所示: 开始走代码吧.... <!doctype html> &l ...

  3. 夺命雷公狗ThinkPHP项目之----企业网站8之栏目的添加完善(无限极分类的完成)

    我们刚才只是完成了添加的一部分,但是我们的上级分类也不能永远都是只有一个死的嘛,所以我们需要对她进行修改: 我们先将add方法里面的数据查出来再说: 然后在模板页进行遍历: 展示效果如下所示: 虽然是 ...

  4. cf-282e

    “字典树”的变形,任意两数异或最大值,处理字典树的时候可以用递归,也可以用循环,下面有两个版本. C - Sausage Maximization Time Limit:2000MS Memory L ...

  5. UIActivityViewController(转)

    在iOS 6之后提供了一个分享列表视图,它通过UIActivityViewController管理.苹果设计它主要的目的是替换分享动作选单(ActionSheet),分享动作选单是出于分享目的的动作选 ...

  6. 160826、浏览器渲染页面过程描述,DOM编程技巧以及重排和重绘

    一.浏览器渲染页过程描述   1.浏览器解析html源码,然后创建一个DOM树. 在DOM树中,每一个HTML标签都有一个对应的节点(元素节点),并且每一个文本也都有一个对应的节点(文本节点). DO ...

  7. js捕捉IE窗口失去焦点事件,判断离开页面刷新或关闭的方法

    js捕捉IE窗口失去焦点事件,判断离开页面刷新或关闭的方法 javascript如何捕捉IE窗口失去焦点事件window.onblur = function(e) { //you code}; 弹框的 ...

  8. java中枚举类的使用详解

    /* * 通过JDK5提供的枚举来做枚举类 */ public enum Direction2 { FRONT("前"), BEHIND("后"), LEFT( ...

  9. MD5加密,Base64加密/解密,AES加密/解密

    1.从github上下载GTMBase64-master和AESCrypt-ObjC-master导入工程,如下图所示. 2.使用前的配置及注意事项: (1) 在build phases中的GTMBa ...

  10. ecshop后台通过ajax搜索原理

    ecshop的搜索其实是功能十分强大的,但是ecshop搜索功能前台和后台还不大一样,前台主要是通过get方式,提交的url进行分页,而在ecshop的后台,则是接受表单的搜索条件,然后通过js发布到 ...