Android UI控件的分类(1).docx

上传人:小飞机 文档编号:3152434 上传时间:2023-03-11 格式:DOCX 页数:3 大小:37.18KB
返回 下载 相关 举报
Android UI控件的分类(1).docx_第1页
第1页 / 共3页
Android UI控件的分类(1).docx_第2页
第2页 / 共3页
Android UI控件的分类(1).docx_第3页
第3页 / 共3页
亲,该文档总共3页,全部预览完了,如果喜欢就下载吧!
资源描述

《Android UI控件的分类(1).docx》由会员分享,可在线阅读,更多相关《Android UI控件的分类(1).docx(3页珍藏版)》请在三一办公上搜索。

1、Android UI控件的分类大多数的界面控件都在android.view和android.widget包中,android.view.View为他们的父类,还有Dialog系列,android.app.Dialog为父类。 Android的原生控件,一般是在res/layout下的xml文件中声明。然后在Activity通过使用super.setContentView(R.layout.某布局layout文件名)来加载layout。在Activity中获取控件的引用需要使用super.findViewById(R.id.控件的ID),接着就可以使用这个引用对控件进行操作,例如添加监听,设置内

2、容等。当然也可以通过代码动态的使用控件。 1. 文本类: TextView、EditText、AutoCompleteTextView、MultAutoCompletTextView 、(TextSwitcher) 、(DigitalClock) ExtractEditText、CheckedTextView、Chronometer 2按钮类: Button、CheckBox、RadioButton(RadioGroup) 、ToggleButton 、(ImageButton ) CompoundButton 2. 缩放按钮: ZoomButton、ZoomControls 3. 图片类:

3、ImageView、ZoomButton、ImageButton、(ImageSwitcher ) QuickContactBadge 4. 时间控件: DigitalClock、AnalogClock、TimePicker、DatePicker 5进度显示: ProgressBar、AbsSeekBar、SeekBar、RatingBar(星星评分) 6导航: TabHost、TabWidget。 7视频媒体: VideView、MediaController 8Dialog对话框 CharacherPickerDialog、AlertDialog、DatePickerDialog、Prog

4、ressDialog、TimePickerDialog 9. 布局类控件: AbsoluteLayout、LinearLayout、RadioGroup 、TableLayout、 TableRow、RelativeLayout、FrameLayout 10需要适配器的布局类: AdapterView、AbsListView、GridView、ListView、AbsSpinner、Gallery Spinner 11滚动条: HorizontalScrollView、ScrollView 12.网页: WebView 13.动画: ViewAimator、ViewFilpper、ViewSw

5、itcher、ImageSwitcher、TextSwitcher 12. 其他: 1. KeyboardView 2. SurfaceView(照相时会使用) GLSurfaceView 3. ViewStub DialerFilter TwolineListItem SlidingDrawer GestureOverlayView 4. ListView一般与ListActivity一一起使用。TabActivity: 5. TabHost、TabWidget一般与TabActivity一起使用。ListActivity: 1. View子类结构图: TextView子类结构: ViewGroup子类结构图: android.app.Dialog子类结构:

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 生活休闲 > 在线阅读


备案号:宁ICP备20000045号-2

经营许可证:宁B2-20210002

宁公网安备 64010402000987号