大多数的界面控件都在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),接着就可以使用这个引用对控件进行操作,例如添加监听,设置内容等。当然也可以通过代码动态的使用控件。

1.    文本类:

TextView、EditText、AutoCompleteTextView、MultAutoCompletTextView 、(TextSwitcher) 、(DigitalClock)

ExtractEditText、CheckedTextView、Chronometer

2.按钮类:

Button、CheckBox、RadioButton(RadioGroup) 、ToggleButton 、(ImageButton )

CompoundButton

3.    缩放按钮:

ZoomButton、ZoomControls 

 4.   图片类:

ImageView、ZoomButton、ImageButton、(ImageSwitcher )

QuickContactBadge

 5.   时间控件:

DigitalClock、AnalogClock、TimePicker、DatePicker

 6.进度显示:

ProgressBar、AbsSeekBar、SeekBar、RatingBar(星星评分)

 7.导航:

TabHost、TabWidget。

 8.视频媒体:

VideView、MediaController

 9Dialog对话框

CharacherPickerDialog、AlertDialog、DatePickerDialog、ProgressDialog、TimePickerDialog

 10. 布局类控件:

AbsoluteLayout、LinearLayout、RadioGroup 、TableLayout、 TableRow、RelativeLayout、FrameLayout

 11.需要适配器的布局类:

AdapterView、AbsListView、GridView、ListView、AbsSpinner、Gallery Spinner

 12.滚动条:

HorizontalScrollView、ScrollView

 13.网页:

WebView

 14.动画:

ViewAimator、ViewFilpper、ViewSwitcher、ImageSwitcher、TextSwitcher

 

  1. 其他:
  2. KeyboardView 
  3. SurfaceView(照相时会使用) GLSurfaceView 
  4. ViewStub DialerFilter TwolineListItem SlidingDrawer GestureOverlayView

 

 

  1. ListView一般与ListActivity一一起使用。TabActivity: 
  2. TabHost、TabWidget一般与TabActivity一起使用。ListActivity:

 

  1. View子类结构图:

 

TextView子类结构:

 

ViewGroup子类结构图:

 

android.app.Dialog子类结构:

 

转载于:https://www.cnblogs.com/xbx2015/p/5101738.html

更多相关文章

  1. Android项目开发中常用个性化控件汇总(view)
  2. 常用布局及基本 UI 控件(2)
  3. android LayoutInflater实例化的方法
  4. GitHub上受欢迎的Android(安卓)UI 库2
  5. Android主题定制
  6. Android(安卓)RatingBar:评价条控件
  7. Android(安卓)studio 原生自带下拉加载控件SwipeRefreshLayout使
  8. Android中测量控件的内部文字内容的宽、高度
  9. 【读书笔记-《Android游戏编程之从零开始》】4.Android(安卓)游

随机推荐

  1. Android 的一个错误的解决
  2. Android(安卓)BaseAdapter与ListView的使
  3. 【从头学android】第二个程序同一个Activ
  4. Android -- Wifi的save()操作
  5. android Vibrator震动效果
  6. Android UI列表的上拉下拉刷新之Android-
  7. Android利用Timer实现倒计时效果小demo
  8. Android开启adb root 和 Console Root
  9. Android InputStream转Bitmap
  10. Android跑Monkey必备代码