Android实验二-UI界面开发.docVIP

  1. 1、本文档共5页,可阅读全部内容。
  2. 2、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
  5. 5、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
  6. 6、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们
  7. 7、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
  8. 8、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
Android实验二-UI界面开发

Android 实验设计 实验二:界面设计:控件与布局 08计应胡巍巍 【目的】 Android编程基础,UI设计。 【要求】 了解Android编程原理 掌握界面控件设计 掌握控件的事件处理编程 【原理】 1.熟悉各种控件的基本功能 常用控件包括:TextView,EditText,Button,ImageView: ImageButton,ProgressBar,Radio button: 2.了解各种布局Layout的应用 多种Layout: AbsoluteLayout FrameLayout GridView LinearLayout ListLayout RadioGroup TableLayout ……… 【实验过程】 新建一个Project,并对其布局文件进行简单修改。 New 一个 Android project: Project Name: Practice ,Application name:Project ,Build Target勾选Android 2.2,Package name:com.eoeAndroid.Practice ,Create Activity:Practice ,Min SDK Version:8. 然后点击Next→Finish。 Finish后,Eclipse Platform左边Package Explorer栏中出现了我们刚才新建的project。根据实验要求在layout?main.xml中修改布局文件(我选的是相对布局relative layout),增加所需控件。分析实验要求后,对要求添加的控件按照从上到下,从左到右的顺序添加。布局xml实现如下: ?xml version=1.0 encoding=utf-8? RelativeLayout xmlns:android=/apk/res/android android:orientation=horizontal //默认控件水平排列 android:layout_width=fill_parent //相对布局的有效范围 android:layout_height=fill_parent android:background=#ffffff //背景颜色 TextView android:id=@+id/text1 //第一个文本控件 android:layout_width=wrap_content //控件宽度和高度有文本决定 android:layout_height=wrap_content android:text=@string/hello///文本内容:hello所定义的字符串 TextView android:id=@+id/text2 //第二个文本控件 android:layout_width=wrap_content //同上 android:layout_height=wrap_content android:layout_below=@id/text1//这里实现text2布局在text1的下方 android:text=Hello,Its Huweiweis Android Project !//内容 android:textStyle=bold///文本字体样式,这里是粗体 EditText android:id=@+id/ET1 android:layout_width=fill_parent android:layout_height=wrap_content android:layout_below=@id/text2 android:hint=Input what you want to say to TA android:shadowColor=#ff0000///边框阴影眼测 TextView android:id=@+id/text3 android:layout_width=wrap_content android:layout_height=wrap_content android:layout_below=@id/ET1 android:text=Do you miss Miss TA^0^? android:textStyle=bold/ RadioGroup android:layout_width=wrap_content//这里定义了一对单项 android:layout_

文档评论(0)

zhuwenmeijiale + 关注
实名认证
文档贡献者

该用户很懒,什么也没介绍

版权声明书
用户编号:7065136142000003

1亿VIP精品文档

相关文档