计算器的实现.doc

信息学院 实验报告 学号: 姓名: 班级: 课程名称:Android操作系统概述6年4月20 实验地点:睿智4-212 1.实验目的 用eclipse实现计算器。 验证1/3+1/3+1/3=1和0.001+0.0011=0.0021。 2.实验内容及环境设备 内容:实现计算器,并验证1/3+1/3+1/3=1和0.001+0.0011=0.0021。 设备eclipse软件3.实验步骤 3.1、流程图 3.2、XML布局和MainActivity.java代码 3.2.1、在activity_main.xml文件中写好布局。以其中一行为例,其代码如下: LinearLayout android:layout_width=fill_parent android:layout_height=wrap_content //线性布局 Button android:id=@+id/btnBackspace//控件的名称 android:layout_width=wrap_content//控件的宽度 android:layout_height=wrap_content//控件的高度 android:layout_marginLeft=10dp//该控件距离左边控件10像素。 and

文档评论(0)

1亿VIP精品文档

相关文档