Android View和ViewGroup的关系
16lz
2021-01-23
View和ViewGroup的关系
Android 的View是Android所有控件的基类,TextView,EditView,Button都是基于View的。ViewGroup一般常用于布局,它可以包含View和ViewGroup。ViewGroup也是继承View的;
View的具体继承图
public abstract class ViewGroup extends View implements ViewParent, ViewManager接口 ViewParent:定义了成为一个View的parent的一些“职能”,当parent 和 它的child相互影响的时候查看此类。接口 ViewManager :在一个Activity中 add 或者 remove 一个 child view,通过Context.getSystemService()得到它的实例。
参考博客
https://www.cnblogs.com/jooy/p/9242594.html
https://www.2cto.com/kf/201404/291015.html
更多相关文章
- Android:控件布局(线性布局)LinearLayout
- 【Android 开发】:UI控件之显示图片控件 ImageView 的使用方法
- Android:CourseTableLayout — 好用的Android自动生成课程表的自
- Android之UI学习篇十一:ListView控件学习(一)
- Android UI开发点点滴滴(基本控件)
- Android:控件AutoCompleteTextView 客户端保存搜索历史自动提示
- 【译】Android 6.0接口变化(三)(Android 6.0 Changes)
- android xml 常用控件介绍
- 【翻译】(8-补丁1)Android接口定义语言(AIDL)