Android 计算器UI-TableLayout
表格布局(TableLayout)
<?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:stretchColumns="*" >
<EditText
android:layout_width="match_parent"
android:layout_height="60dp"
android:gravity="center_vertical|right"
android:layout_weight="1"/>
<TableRow
android:layout_weight="1"> <Button
android:id="@+id/btn7"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text="7" /> <Button
android:id="@+id/btn8"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text="8" /> <Button
android:id="@+id/btn9"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text="9" /> <Button
android:id="@+id/btnchu"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text="/" />
</TableRow> <TableRow
android:layout_weight="1"> <Button
android:id="@+id/btn4"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text="4" /> <Button
android:id="@+id/btn5"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text="5" /> <Button
android:id="@+id/btn6"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text="6" /> <Button
android:id="@+id/btncheng"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text="*" />
</TableRow> <TableRow
android:layout_weight="1"> <Button
android:id="@+id/btn1"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text="1" /> <Button
android:id="@+id/btn2"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text="2" /> <Button
android:id="@+id/btn3"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text="3" /> <Button
android:id="@+id/btnjian"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text="-" />
</TableRow> <TableRow
android:layout_weight="1"> <Button
android:id="@+id/btn0"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text="0" /> <Button
android:id="@+id/btndian"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text="." /> <Button
android:id="@+id/btnjia"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text="+" /> <Button
android:id="@+id/btndeng"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text="=" />
</TableRow> <TableRow
android:layout_weight="1"> <Button
android:id="@+id/clear"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_span="4"
android:text="clear" />
</TableRow> </TableLayout>
离魂莫惆怅,看取宝刀雄
Android 计算器UI-TableLayout的更多相关文章
- Android计算器布局
Android(安桌)计算器布局实现 ——解决整个屏幕方案 引言: 学完了android布局的几种方式,做了一个android计算器. 我在网上搜索了这方面的资料,发现了布局都 ...
- Android开发 UI布局
Android开发 UI布局一.线性布局LinearLayout 什么是线性布局? 其实呢,线性布局就是把所有的孩子摆在同一条线上 <?xml version="1.0" e ...
- 【Android源代码下载】收集整理android界面UI效果源码
在Android开发中,Android界面UI效果设计一直都是很多童鞋关注的问题,今天给大家分享下大神收集整理的多个android界面UI效果,都是源码,都是干货,贡献给各位网友! 话不多说,直接上效 ...
- Android 布局之TableLayout
Android 布局之TableLayout 1 TableLayout简介 TableLayout是表格布局.TableLayout 可设置的属性包括全局属性及单元格属性. 1.1 全局属性 有以下 ...
- Android优化——UI检视利器:Hierarchy Viewer
在Android的SDK工具包中,有很多十分有用的工具,可以帮助程序员开发和测试Android应用程序,大大提高其工作效率.其中的一款叫 Hierachy Viewer的可视化调试工具,可以很方便地在 ...
- android自定义UI模板图文详解
不知道大家在实际开发中有没有自定义过UI模板?今天花时间研究了一下android中自定义UI模板,与大家分享一下. 每个设计良好的App都是自定义标题栏,在自定义标题栏的过程中大部分人可能都是自定义一 ...
- Android 高级UI设计笔记07:RecyclerView 的详解
1. 使用RecyclerView 在 Android 应用程序中列表是一个非常重要的控件,适用场合非常多,如新闻列表.应用列表.消息列表等等,但是从Android 一出生到现在并没有非常 ...
- Android开发UI之开源项目第一篇——个性化控件(View)篇
原文:http://blog.csdn.net/java886o/article/details/24355907 本文为那些不错的Android开源项目第一篇——个性化控件(View)篇,主要介绍A ...
- Android开发--UI之Bundle的使用
Android开发–UI之Bundle的使用 最近,把之前学过的东西大体的整理了以下,并且想把学过的心得分享给大家.我自己做了一个小小的demo,以便说明具体的应用. 这里的两个界面是通过第一个界面输 ...
- Android 更新UI的两个方法
Android 更新UI的两个方法 在Android的开发过程中,常常需要适时的更新UI.Androd中的UI是在主线程中更新的.如果在主线程之外的线程中直接更新,就会出现报错并抛出异常: andro ...
随机推荐
- 浅析firmware完整生存和使用流程 【转】
转自:http://blog.csdn.net/zhenwenxian/article/details/4677604 浅析firmware完整生存和使用流程 1. http://blog.china ...
- cargo failed to finish deploying within the timeout period [120000]
cargo插件,报错:failed to finish deploying within the timeout period [120000] 解决方法:配置timeout为0 <plugin ...
- Sprint第二个冲刺(第八天)
一.Sprint介绍 任务进度: 二.Sprint周期 看板: 燃尽图:
- CentOS 7 安装、配置、使用 PostgreSQL 9.5及PostGIS2.2
学习CentOS下安装使用PostgreSQL [安装过程] 1.添加RPM yum install https://download.postgresql.org/pub/repos/yum/ ...
- [问题2014S15] 复旦高等代数II(13级)每周一题(第十五教学周)
[问题2014S15] 设 \(O\) 为 \(n\) 阶正交阵,\(A=\mathrm{diag}\{a_1,a_2,\cdots,a_n\}\) 为实对角阵, 证明: 方阵 \(OA\) 的特征 ...
- How to install .deb file in Ubuntu
if you have a .deb file: You can install it using sudo dpkg -i /path/to/deb/file followed by sudo ap ...
- 如何设置WIN10任务栏
1.鼠标右键点击任务栏 然后点击锁定任务栏,去掉前面的钩 2.然后鼠标右击任务栏 选择工具栏 点击新建工具栏 3.打开后点击新建文件夹,可以重命名,然后选择刚才新建的文件夹 4.此时任务栏就有了 5. ...
- 使用jquery中height()方法获取各种高度大全
alert($(window).height()); //浏览器当前窗口可视区域高度 alert($(document).height()); //浏览器当前窗口文档的高度 alert($(docum ...
- 从欧几里得距离、向量、皮尔逊系数到http://guessthecorrelation.com/
一.欧几里得距离就是向量的距离公式 二.皮尔逊相关系数反应的就是线性相关 游戏http://guessthecorrelation.com/ 的秘诀也就是判断一组点的拟合线的斜率y/x ------- ...
- Deep Learning 13_深度学习UFLDL教程:Independent Component Analysis_Exercise(斯坦福大学深度学习教程)
前言 理论知识:UFLDL教程.Deep learning:三十三(ICA模型).Deep learning:三十九(ICA模型练习) 实验环境:win7, matlab2015b,16G内存,2T机 ...