android入门讲义.ppt

  1. 1、本文档共60页,可阅读全部内容。
  2. 2、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
android入门讲义

Android程序界面布局 RelativeLayout 按照各子元素之间的位置关系完成布局。在此布局中的子元素里与位置相关的属性将生效。 RelativeLayout里常用的位置属性如下:     android:layout_toLeftOf —— 该组件位于引用组件的左方     android:layout_toRightOf —— 该组件位于引用组件的右方     android:layout_above —— 该组件位于引用组件的上方     android:layout_below —— 该组件位于引用组件的下方    android:layout_alignParentLeft —— 该组件是否对齐父组件的左端    android:layout_alignParentRight —— 该组件是否齐其父组件的右端    android:layout_alignParentTop —— 该组件是否对齐父组件的顶部    android:layout_alignParentBottom —— 该组件是否对齐父组件的底部     android:layout_centerInParent —— 该组件是否相对于父组件居中     android:layout_centerHorizontal —— 该组件是否横向居中     android:layout_centerVertical —— 该组件是否垂直居中 TableLayout 此布局为表格布局,适用于N行N列的布局格式。一个TableLayout由许多TableRow组成,一个TableRow就代表TableLayout中的一行。 结束 练习题: 使用线性布局和相对布局,分布制作如图界面的程序。 要求: 分别使用2种布局,完成相同样式的程序 生成正式数字签名 发布为APK Android基本控件 1.文本类: TextView、EditText、AutoCompleteTextView、MultAutoCompletTextView 、(TextSwitcher) 、(DigitalClock) ExtractEditText、CheckedTextView、Chronometer 2.按钮类: Button、CheckBox、RadioButton(RadioGroup) 、ToggleButton 、(ImageButton ) CompoundButton 缩放按钮:ZoomButton、ZoomControls 3.图片类: ImageView、ZoomButton、ImageButton、(ImageSwitcher ) QuickContactBadge 4.时间控件: DigitalClock、AnalogClock、TimePicker、DatePicker 5.进度显示: ProgressBar、AbsSeekBar、SeekBar、RatingBar 6.导航: TabHost、TabWidget。 7.视频媒体: VideView、MediaController 8.Dialog对话框 CharacherPickerDialog、AlertDialog、DatePickerDialog、ProgressDialog、TimePickerDialog 常用控件 TextView xml: TextView android:id=@+id/test android:layout_width=wrap_content android:layout_height=wrap_content android:text=@string/hello_world / android:text 表示需要显示的文字 TextView属性对照表 常用控件 Button XML: Button android:id=@+id/button_first android:layout_height=wrap_content android:layout_width=wrap_content android:text=@string/buttonText / Button 获取该控件 Button button = (Button)findViewById(R.id.button_first); 监听动作 button.setOnClickListener(new View.OnClickListener() {   public void onClick(View v)

文档评论(0)

ranfand + 关注
实名认证
内容提供者

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

1亿VIP精品文档

相关文档