欢迎来到淘文阁 - 分享文档赚钱的网站! | 帮助中心 好文档才是您的得力助手!
淘文阁 - 分享文档赚钱的网站
全部分类
  • 研究报告>
  • 管理文献>
  • 标准材料>
  • 技术资料>
  • 教育专区>
  • 应用文书>
  • 生活休闲>
  • 考试试题>
  • pptx模板>
  • 工商注册>
  • 期刊短文>
  • 图片设计>
  • ImageVerifierCode 换一换

    最新android本科实验报告.doc

    • 资源ID:33805364       资源大小:2.09MB        全文页数:21页
    • 资源格式: DOC        下载积分:15金币
    快捷下载 游客一键下载
    会员登录下载
    微信登录下载
    三方登录下载: 微信开放平台登录   QQ登录  
    二维码
    微信扫一扫登录
    下载资源需要15金币
    邮箱/手机:
    温馨提示:
    快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。
    如填写123,账号就是123,密码也是123。
    支付方式: 支付宝    微信支付   
    验证码:   换一换

     
    账号:
    密码:
    验证码:   换一换
      忘记密码?
        
    友情提示
    2、PDF文件下载后,可能会被浏览器默认打开,此种情况可以点击浏览器菜单,保存网页到桌面,就可以正常下载了。
    3、本站不支持迅雷下载,请使用电脑自带的IE浏览器,或者360浏览器、谷歌浏览器下载即可。
    4、本站资源下载后的文档和图纸-无水印,预览文档经过压缩,下载后原文更清晰。
    5、试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。

    最新android本科实验报告.doc

    精品资料android本科实验报告.本科实验报告课程名称: Android设计与开发 实验项目: Android 课程实验 实验地点: 逸夫楼404 专业班级: 学号: 学生姓名: 指导教师: 年 月 日太原理工大学学生实验报告学院名称软件学院专业班级 学号 学生姓名 实验日期2013/5成绩课程名称Android设计与开发实验题目Android系统环境搭建实验一 Android系统环境搭建一、目的与要求1掌握Android环境的搭建。2学会Java、eclipse、Android SDK以及ADT的安装与环境变量设置。3学会在线更新SDK。4掌握离线安装SDK的方法。二、实验内容1安装JDK ,SE6.0以上版本。 访问以下网址:。配置环境变量:安装J2SDK以后,若需要在cmd下使用Java命令和编译、运行程序,可以配置环境变量:新建环境变量JAVA_HOME,右击“我的电脑”>“属性”>“高级”>“环境变量”,如图1-1所示:图1-1 测试JDK安装成功与否:编写test.java文件,运行。要求:请将安装的目录与环境变量的配置图粘到后面的空白页上。并将test.java在运行结果粘上。2安装eclipse。访问以下网址:http:/www.eclipse.org/downloads/下载。选择Windows平台“EclipseIDE for Java EE Developers”下载,下载完成后,找到下载的压缩包“eclipse-java-indigo-SR2-win32.zip”,Eclipse无须安装程序,解压此压缩文件到目标 文件即可。要求:请将安装的目录与eclipse环境的界面图粘到后面的空白页上。3安装Android SDK1访问以下网址下载: 2在线安装SDK:打开SDKManager,如图1-2、1-3所示。 图1-2 图1-33离线安装:首先下载SDK的安装包,“android-sdk_r16-windows.zip”(安装工具)解压到目录,如我的目录D:TDDOWNLOADandroid-sdk_r16-windowsandroid-sdk-windows,然后新建以下几个文件夹:platforms,docs,samples,usb_driver,market_licensing。接着打开下载工具,下载以下内容: http:/dl-http:/dl-http:/dl-http:/dl-http:/dl-http:/dl-http:/dl-http:/dl-http:/dl-http:/dl-http:/dl-http:/dl-http:/dl-http:/dl-http:/dl-http:/dl-http:/dl-要求:请将安装的目录与SDK在界面图粘到后面的空白页上。4安装ADT1 首先启动Eclipse,选择Help->Install New Software,打开Eclipse的插件安装页面。2 单击Add按钮,弹出“Add Repository”对话框,在Name中输入:ADT,在Location中输入:,单击OK按钮后,Eclipse会自动搜索可安装的插件。3 此时Eclipse会搜索指定URI的资源,如果搜索无误,会出现:Develop Tools的复选框,选中复选框,点击“Next”按钮。再点击finish 按钮4 整个安装过程会持续几分钟,安装结束后会出现Eclipse重启提示界面,。建议选择“Restart Now”按钮重新启动Eclipse,使ADT插件生效。5 在ADT插件安装完毕且重启Eclipse之后,进入配置Android开发环境的最后一步,设置Android SDK的位置。首先选择Windows->Preference命令打开Eclipse的配制界面,然后在SDK Location 中输入Android SDK的保存路径,最后单击OK按钮使配置生效。要求:请将安装ADT后的eclipse界面图粘到后面的空白页上。5. 总结实验心得。 Android 系统搭建之中学到了许多,java路径的设置等等,安装ADT。实验地点逸夫楼404指导教师太原理工大学学生实验报告学院名称软件学院专业班级 学号 学生姓名 实验日期2013/5成绩课程名称Android设计与开发实验题目 Activity运用实验实验二 Activity运用实验一、目的与要求1熟悉Activity与Intent的使用。2掌握Activity启动另一个Activity的方法。3会使用Intent对象进行Activity间意图的传达。二、实验内容1编一Android应用程序TestActivity01,使用MainActivity,启动另一个OtherActivity。MainActivity主界面上只有一个按钮。OtherActivity上只有一个TextView组件。要求:请将工程中的MainActivity.java,OtherActivity.java以及对应的xml文件源码附上。同时将运行的界面图粘上。2编一Android应用程序TestActivity02,使用MainActivity,启动另一个OtherActivity。MainActivity主界面上只有一个按钮。OtherActivity上只有一个TextView组件。要将MainActivity中的数据“中国”通过Intent对象传到OtherActivity上显示。要求:请将工程中的MainActivity.java,OtherActivity.java以及对应的xml文件源码附上。同时将运行的界面图粘上。三、 实验结果 public class MainActivity extends Activity private Button btn;Overrideprotected void onCreate(Bundle savedInstanceState) super.onCreate(savedInstanceState);setContentView(R.layout.activity_main);btn=(Button)findViewById(R.id.btn);btn.setOnClickListener(new OnClickListener() Overridepublic void onClick(View v) / TODO Auto-generated method stubIntent intent=new Intent();intent.putExtra("china", "中国");intent.setClass(MainActivity.this, OtherActivity.class);startActivity(intent););Overridepublic boolean onCreateOptionsMenu(Menu menu)/ Inflate the menu; this adds items to the action bar if it is present.getMenuInflater().inflate(R.menu.main, menu);return true;public class OtherActivity extends Activity TextView textv;Overrideprotected void onCreate(Bundle savedInstanceState) super.onCreate(savedInstanceState);setContentView(R.layout.main);Intent intent=getIntent();String china=intent.getStringExtra("china");textv=(TextView)findViewById(R.id.textv);textv.setText(china);Overridepublic boolean onCreateOptionsMenu(Menu menu) / Inflate the menu; this adds items to the action bar if it is present.getMenuInflater().inflate(R.menu.main, menu);return true;<RelativeLayout xmlns:android=" xmlns:tools=" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingBottom="dimen/activity_vertical_margin" android:paddingLeft="dimen/activity_horizontal_margin" android:paddingRight="dimen/activity_horizontal_margin" android:paddingTop="dimen/activity_vertical_margin" tools:context=".MainActivity" ><Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="+id/btn" android:text="button" /> </RelativeLayout><?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android=" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" > <TextView android:layout_width="match_parent" android:layout_height="match_parent" android:id="+id/textv" /></LinearLayout>四 实验截图: 五. 实验心得。 Activity 跳转传值中学到了许多,用intent传递值一个activity 往另一个activity传递值。实验地点逸夫楼404指导教师太原理工大学学生实验报告学院名称软件学院专业班级 学号 学生姓名 实验日期2013/5成绩课程名称Android设计与开发实验题目 实验三 android应用UI设计(一)实验三 android应用UI设计(一)一、目的与要求1熟悉TextView、Button、ImageView、LinearLayout、TabelLayout、RelativeLayout、FrameLayout、AlertDialog对话框。2掌握以上UI设计元素的基本功能和用法。3掌握UI设计的基本方法。二、实验内容(一)实现一个如图3.1所示的UI界面1布局分析:最外层是纵向的线性布局(LinearLayout,android:orientation="vertical"),包含了三个布局,横向的线性布局(四列)、表格布局(TableLayout,三行三列)、纵向的线性布局(四行)。2在reslayout文件夹下的MyLayout.xml中实现。3布局内的控件为TextView要求:请将工程中的java源文件以及对应的xml文件源码附上。同时将运行的界面图粘上。(二)实现一个如图3.2所示的多输入框的对话框1要求使用LinearLayout布局、TextView、EditText控件各两个。2要求点击按钮后有对应的输出(用Toast控件、TextView控件以及Logcat窗口输出都可以)。 三实验结果 (一)<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android=" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" android:weightSum="3" > <LinearLayout android:layout_width="match_parent" android:orientation="horizontal" android:layout_weight="1" android:weightSum="4" > <TextView android:layout_weight="1" android:layout_width="wrap_content" android:layout_height="fill_parent" android:background="#FF0000" android:text="red" android:gravity="center" /> <TextView android:layout_weight="1" android:layout_width="wrap_content" android:layout_height="fill_parent" android:background="#00BB00" android:text="green" android:gravity="center" /> <TextView android:layout_weight="1" android:layout_width="wrap_content" android:layout_height="fill_parent" android:background="#0000C6" android:text="blue" android:gravity="center" /> <TextView android:layout_weight="1" android:layout_width="wrap_content" android:layout_height="fill_parent" android:background="#F9F900" android:text="yellow" android:gravity="center" /> </LinearLayout> <TableLayout android:layout_width="fill_parent" android:layout_weight="1" android:background="#000000" > <TableRow android:layout_width="fill_parent" android:layout_height="wrap_content" android:weightSum="3" > <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:text="学号" android:gravity="center" android:textColor="#FFFFFF" /> <TextView android:layout_weight="1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="姓名" android:gravity="center" android:textColor="#FFFFFF" /> <TextView android:layout_weight="1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="性别" android:gravity="center" android:textColor="#FFFFFF" /> </TableRow> <TableRow android:layout_width="fill_parent" android:layout_height="wrap_content" android:weightSum="3" > <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:text="0001" android:gravity="center" android:textColor="#FFFFFF" /> <TextView android:layout_weight="1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="0000" android:gravity="center" android:textColor="#FFFFFF" /> <TextView android:layout_weight="1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="男" android:gravity="center" android:textColor="#FFFFFF" /> </TableRow> <TableRow android:layout_width="fill_parent" android:layout_height="wrap_content" android:weightSum="3" > <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:text="0002" android:gravity="center" android:textColor="#FFFFFF" /> <TextView android:layout_weight="1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="0000" android:gravity="center" android:textColor="#FFFFFF" /> <TextView android:layout_weight="1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="男" android:gravity="center" android:textColor="#FFFFFF" /> </TableRow> </TableLayout> <LinearLayout android:layout_width="fill_parent" android:orientation="vertical" android:weightSum="4" android:layout_weight="1" > <TextView android:layout_width="match_parent" android:background="#FF0000" android:layout_weight="1" android:text="red" android:gravity="center" /> <TextView android:layout_width="match_parent" android:layout_weight="1" android:background="#00BB00" android:text="green" android:gravity="center" /> <TextView android:layout_width="match_parent" android:layout_weight="1" android:background="#0000C6" android:text="blue" android:gravity="center" /> <TextView android:layout_width="match_parent" android:layout_weight="1" android:background="#F9F900" android:text="yellow" android:gravity="center" /></LinearLayout></LinearLayout> 三.实验截图:四、 实验结果 (二)R.layout.adialogm 代码 <?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android=" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" > <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="姓名" /> <EditText android:layout_width="fill_parent" android:layout_height="50dip" android:id="+id/editname" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="电话号码" /> <EditText android:layout_width="fill_parent" android:layout_height="50dip" android:id="+id/editiphone" /></LinearLayout>public class MainActivity extends Activity private Button btn;private EditText edit;private EditText editt;Overrideprotected void onCreate(Bundle savedInstanceState) super.onCreate(savedInstanceState);setContentView(R.layout.activity_main);btn=(Button)findViewById(R.id.btn);btn.setOnClickListener(new OnClickListener() Overridepublic void onClick(View

    注意事项

    本文(最新android本科实验报告.doc)为本站会员(1595****071)主动上传,淘文阁 - 分享文档赚钱的网站仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知淘文阁 - 分享文档赚钱的网站(点击联系客服),我们立即给予删除!

    温馨提示:如果因为网速或其他原因下载失败请重新下载,重复下载不扣分。




    关于淘文阁 - 版权申诉 - 用户使用规则 - 积分规则 - 联系我们

    本站为文档C TO C交易模式,本站只提供存储空间、用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。本站仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知淘文阁网,我们立即给予删除!客服QQ:136780468 微信:18945177775 电话:18904686070

    工信部备案号:黑ICP备15003705号 © 2020-2023 www.taowenge.com 淘文阁 

    收起
    展开