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),请尊重他人的辛勤劳动成果,谢谢! 我之前写 ...
随机推荐
- server端推送消息机制
推送技术相关请参加WIKI: https://zh.wikipedia.org/wiki/%E6%8E%A8%E9%80%81%E6%8A%80%E6%9C%AF 场景: 监控系统:后台硬件温度.电压 ...
- React的一个简单示例
首发:个人博客,更新&纠错&回复 React的核心是定义组件类,组件有三个要素:状态.行为.界面. 1.渲染状态到界面:状态由组件对象的state属性持有,从状态到界面的渲染工作由组件 ...
- JSP/Servlet 中的汉字编码问题
JSP/Servlet 中的汉字编码问题 1.问题的起源 每个国家(或区域)都规定了计算机信息交换用的字符编码集,如美国的 ASCII,中国的 GB2312 -80,日本的 JIS 等,作为该国家/区 ...
- jQuery DataTable-JavaScript API
虽然大多数时候你的Javascript交互将通过使用datatable初始化对象作为描述在使用这个网站的部分,有时,你会发现它有用一些外部控制表.可以使用以下函数从jQuery.dataTable对象 ...
- java中OutputStream字节流与字符流InputStreamReader 每一种基本IO流BufferedOutputStream,FileInputStream,FileOutputStream,BufferedInputStream,BufferedReader,BufferedWriter,FileInputStream,FileReader,FileWriter,InputStr
BufferedOutputStream,FileInputStream,FileOutputStream,BufferedInputStream,BufferedReader,BufferedWri ...
- 虚拟机 本地 本机 双启动 运行 vhd local Dual Boot
在使用虚拟机的过程中, 可能会遇到虚拟机的运行要求过高, 电脑力不从心的情况. 为了让虚拟机使用更多电脑资源, 可以让虚拟机以本地双系统的方式,访问本地计算机资源. 打开磁盘管理,在磁盘上右键,选择 ...
- 图示-Centos7完整安装
工作过程中,一些未接触过Centos,或未安装过Centos的同事经常会问,如何安装?这个事说简单真简单,只有操作过一次,第二次就能够熟练的自己动手安装:但说难也难,如果没人带,第一次安装的时候确实不 ...
- symfony中twig的模板过滤器
过滤器 变量可以被过滤器修饰.过滤器和变量用(|)分割开.过滤器也是可以有参数的.过滤器也可以被多重使用. 通用过滤器 date过滤器 1.1版本新增时区支持,1.5版本增加了默认的日期格式.格式化时 ...
- python: 字符串按空格分成列表split与加密密码maketrans
#字符串按空格分成列表split() print("fu li mei".split()) #split按空格分成列表 print("1+a+2+b".spli ...
- vnc里鼠标拖动终端就会产生ctrl+c终端
然后把有道词典给关了就好了...