android计算器布局界面——基础编
2011-02-12 09:52
239 查看
计算器布局,是初学者学习的过程,下面让我们看看它的界面是如何的。
main.xml代码
本文出自 “技术成就梦想” 博客,请务必保留此出处http://llb988.blog.51cto.com/1940549/491627
main.xml代码
<?xml version="1.0" encoding="utf-8"?> <TableLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" > <TableRow> <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:text=" 7 "/> <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:text=" 8 "/> <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:text=" 9 "/> <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:text=" / "/> </TableRow> <TableRow> <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:text=" 4 "/> <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:text=" 5 "/> <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:text=" 6 "/> <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:text=" * "/> </TableRow> <TableRow> <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:text=" 1 "/> <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:text=" 2 "/> <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:text=" 3 "/> <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:text=" . "/> </TableRow> <TableRow> <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:text=" 0 "/> <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:text=" = "/> <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:text=" - "/> <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:text=" + "/> </TableRow> <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/hello" /> </TableLayout>
本文出自 “技术成就梦想” 博客,请务必保留此出处http://llb988.blog.51cto.com/1940549/491627
相关文章推荐
- android计算器布局界面——基础编
- ios开发UI基础—使用纯代码自定义UItableviewcell实现一个简单的微博界面布局
- Win10系列:UWP界面布局基础12
- Android基础——界面布局简介、点击事件处理
- 【Android核心基础02】 - 界面布局、测试、数据存储访问、权限控制、XML
- android基础——界面布局(二) 线性布局
- 基础-7 界面布局
- iOS开发之UI基础--纯代码自定义UItableviewcell实现一个简单的微博界面布局
- Win10系列:UWP界面布局基础1
- 漫吧漫画阅读界面的搭建(一)基础布局搭建(下)
- WPF基础知识、界面布局及控件Binding
- Android计算器界面布局
- 漫吧漫画阅读界面的搭建(一)基础布局搭建(上)
- Win10系列:UWP界面布局基础2
- Win10系列:UWP界面布局基础3
- 漫吧漫画阅读界面的搭建(一)基础布局搭建(完全代码)
- Win10系列:UWP界面布局基础4
- JAVA基础再回首(二十七)——JAVA中的图形化界面、GUI概述、简单的窗体创建、事件监听机制、动作事件、GUI布局、鼠标事件
- Android基础:代码中实现界面动态布局
- Win10系列:UWP界面布局基础5