计算器布局
来源:互联网 发布:幼儿园淘宝活动方案 编辑:程序博客网 时间:2024/05/20 03:07
布局做个记录吧
<?xml version="1.0" encoding="utf-8"?><TableLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/activity_main" android:layout_width="match_parent" android:layout_height="match_parent" tools:context="com.jane.simplecalculator.MainActivity"> <TableRow android:layout_width="match_parent" android:layout_gravity="center" android:layout_weight="1"> <EditText android:id="@+id/output" android:layout_width="match_parent" android:layout_height="match_parent" android:gravity="right|center_vertical" android:lines="1" android:textSize="48sp" android:layout_weight="1" android:background="@color/green"/> </TableRow> <TableRow android:layout_weight="1" android:gravity="center"> <LinearLayout android:layout_weight="4" android:layout_height="match_parent"> <Button android:id="@+id/one" android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_weight="1" android:text="1" android:textSize="30sp"/> <Button android:id="@+id/two" android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_weight="1" android:text="2" android:textSize="30sp"/> <Button android:id="@+id/three" android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_weight="1" android:text="3" android:textSize="30sp"/> <Button android:id="@+id/plus" android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_weight="1" android:text="+" android:textSize="30sp"/> </LinearLayout> </TableRow> <TableRow android:layout_weight="1" android:gravity="center"> <LinearLayout android:layout_height="match_parent" android:layout_weight="4"> <Button android:id="@+id/four" android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_weight="1" android:text="4" android:textSize="30sp"/> <Button android:id="@+id/five" android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_weight="1" android:text="5" android:textSize="30sp"/> <Button android:id="@+id/six" android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_weight="1" android:text="6" android:textSize="30sp"/> <Button android:id="@+id/subtract" android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_weight="1" android:text="-" android:textSize="30sp"/> </LinearLayout></TableRow> <TableRow android:layout_weight="1" android:gravity="center"> <LinearLayout android:layout_height="match_parent" android:layout_weight="4"> <Button android:id="@+id/seven" android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_weight="1" android:text="7" android:textSize="30sp"/> <Button android:id="@+id/eight" android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_weight="1" android:text="8" android:textSize="30sp"/> <Button android:id="@+id/nine" android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_weight="1" android:text="9" android:textSize="30sp"/> <Button android:id="@+id/multiply" android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_weight="1" android:text="*" android:textSize="30sp"/> </LinearLayout> </TableRow> <TableRow android:layout_weight="1" android:gravity="center"> <LinearLayout android:layout_height="match_parent" android:layout_weight="4"> <Button android:id="@+id/clear" android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_weight="1" android:text="清空" android:textSize="30sp"/> <Button android:id="@+id/zero" android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_weight="1" android:text="0" android:textSize="30sp"/> <Button android:id="@+id/equal" android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_weight="1" android:text="=" android:textSize="30sp"/> <Button android:id="@+id/divide" android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_weight="1" android:text="/" android:textSize="30sp"/> </LinearLayout> </TableRow></TableLayout>
0 0
- 计算器布局
- 计算器界面-布局
- 仿计算器布局代码
- 安卓仿计算器布局代码
- 网格布局--计算器
- Android计算器界面布局
- Android计算器布局
- 表格布局—计算器
- 计算器布局及其实现
- 网格布局实现计算器
- 运用布局构建计算器界面
- Android仿计算器布局代码
- 表格布局器练习--计算器
- 网格布局(计算器界面设计)
- 安卓布局计算器界面
- Android开发计算器之布局
- Android画面简单布局-计算器
- java swing入门 计算器布局
- java安全架构____https的原理和交互过程(1)
- 关于点击测试(hitTest)的几点结论
- Linux学习之路
- 记录某个数字出现的次数
- 167. Two Sum II
- 计算器布局
- Activity的生命周期
- 马哥2016linux就业班+架构班+运维班全套
- stm32常用数据类型 U8、U16、U32到底代表什么?
- Week Training: 241 Different Ways to Add Parentheses
- 好玩的单片机——数码管原理(一)
- 【codeforces 777E】Hanoi Factory【动态规划+线段树】
- AndroidStudio工程导入错误
- 查找算法