计算机界面
2016-04-19 23:01
363 查看
1、RelativeLayout
View Code
<?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" > <FrameLayout android:layout_width="match_parent" android:layout_height="wrap_content" > <TextView android:layout_width="match_parent" android:layout_height="wrap_content" android:width="400dp" android:height="150dp" android:background="#ccc" android:layout_gravity="center"/> </FrameLayout> <TableRow android:layout_weight="1"> <Button android:layout_width="0dp" android:layout_height="match_parent" android:layout_weight="1" android:text="C" android:textSize="25dp" android:id="@+id/button" /> <Button android:layout_width="0dp" android:textSize="25dp" android:layout_height="match_parent" android:layout_weight="1" android:text="DEL" android:id="@+id/button2" /> <Button android:layout_width="0dp" android:layout_height="match_parent" android:layout_weight="1" android:textSize="25dp" android:text="÷" android:id="@+id/button3" /> <Button android:layout_width="0dp" android:textSize="25dp" android:layout_height="match_parent" android:layout_weight="1" android:text="X" android:id="@+id/button4" /> </TableRow> <TableRow android:layout_weight="1"> <Button android:layout_width="0dp" android:layout_height="match_parent" android:layout_weight="1" android:textSize="25dp" android:text="7"/> <Button android:layout_width="0dp" android:layout_height="match_parent" android:layout_weight="1" android:textSize="25dp" android:text="8"/> <Button android:layout_width="0dp" android:layout_height="match_parent" android:layout_weight="1" android:textSize="25dp" android:text="9"/> <Button android:layout_width="0dp" android:layout_height="match_parent" android:layout_weight="1" android:textSize="25dp" android:text="-"/> </TableRow> <TableRow android:layout_weight="1"> <Button android:layout_width="0dp" android:layout_height="match_parent" android:layout_weight="1" android:textSize="25dp" android:text="4"/> <Button android:layout_width="0dp" android:layout_height="match_parent" android:layout_weight="1" android:textSize="25dp" android:text="5"/> <Button android:layout_width="0dp" android:layout_height="match_parent" android:layout_weight="1" android:textSize="25dp" android:text="6"/> <Button android:layout_width="0dp" android:layout_height="match_parent" android:layout_weight="1" android:textSize="25dp" android:text="+"/> </TableRow> <TableRow android:layout_weight="1"> <Button android:layout_width="0dp" android:layout_height="match_parent" android:layout_weight="1" android:textSize="25dp" android:text="1"/> <Button android:layout_width="0dp" android:layout_height="match_parent" android:layout_weight="1" android:textSize="25dp" android:text="2"/> <Button android:layout_width="0dp" android:layout_height="match_parent" android:layout_weight="1" android:textSize="25dp" android:text="3"/> <Button android:layout_width="0dp" android:layout_height="match_parent" android:layout_weight="1" android:textSize="25dp" android:text="( )"/> </TableRow> <TableRow android:layout_weight="1"> <Button android:layout_width="0dp" android:layout_height="match_parent" android:layout_weight="2" android:textSize="25dp" android:text="0" /> <Button android:layout_width="0dp" android:layout_height="match_parent" android:layout_weight="1" android:textSize="25dp" android:text="."/> <Button android:layout_width="0dp" android:layout_height="match_parent" android:layout_weight="1" android:textSize="25dp" android:text="="/> </TableRow> </TableLayout>
View Code
相关文章推荐
- CDN(内容分发网络)技术原理
- 五步学会XMLHttpRequest
- 阮一峰的网络日志 算法
- Android 网络请求
- Referenced file contains errors (http://www.springframework.org/schema/beans/spring-beans-2.5.xsd).
- TCP连接的状态详解以及故障排查
- iOS网络数据解析
- 机器中float的二进制舍入问题
- 网络字节序,大端机,小端机
- 数据结构之循环链表
- <转>HttpClient和HttpURLConnection的区别
- 对HttpClient的理解
- TCP协议的滑动窗口协议
- bzoj4538: [Hnoi2016]网络
- ANN神经网络代码在Matlab中的简单实现
- 深入理解计算机系统3.1节
- libevent高性能网络库源码分析——事件处理框架(四)
- 计算机网络安全实验-缓存区溢出攻击
- TCP的拥塞控制
- 啊哈!算法【转】