inflate (int resource, ViewGroup root)关于root 这个参数的最佳解释
2012-09-19 20:08
861 查看
文档:
public View inflate (int resource, ViewGroup root)
....
returns
The root View of the inflated hierarchy. If root was supplied, this is the root View; otherwise it is the root of the inflated XML file.
如果提供root(不传null)时,返回值其实就是这个root,这个方法就是把xml解析成view之后挂载这个root下。
如果传null(不提供root),返回值也是View,它就是xml布局里面的根节点
public View inflate (int resource, ViewGroup root)
....
returns
The root View of the inflated hierarchy. If root was supplied, this is the root View; otherwise it is the root of the inflated XML file.
如果提供root(不传null)时,返回值其实就是这个root,这个方法就是把xml解析成view之后挂载这个root下。
如果传null(不提供root),返回值也是View,它就是xml布局里面的根节点
相关文章推荐
- inflate (int resource, ViewGroup root)关于root 这个参数的最佳解释
- 关于LayoutInflater类inflate(intresource, ViewGroup root, boolean attachToRoot)方法三个参数的含义
- Android LayoutInflater.inflate(int resource, ViewGroup root, boolean attachToRoot)的参数理解
- Android LayoutInflater.inflate(int resource, ViewGroup root, boolean attachToRoot)的参数理解
- Android LayoutInflater.inflate(int resource, ViewGroup root, boolean attachToRoot)的参数理解
- 关于LayoutInflater类inflate(intresource, ViewGroup root, boolean attachToRoot)方法三个参数的含义
- Android LayoutInflater.inflate(int resource, ViewGroup root, boolean attachToRoot)的参数理解
- view 的 inflate(Context context, int resource, ViewGroup root) 方法 root 参数作用?
- 关于ayoutInflater类中inflate用法viewgroup参数的理解
- View的inflate(int resource, ViewGroup root)理解
- 关于ayoutInflater类中inflate用法viewgroup参数的理解
- View inflate(resId, ViewGroup , boolean attachToRoot)和View inflate(int resource, ViewGrou)区别
- inflate(int resource, ViewGroup root, boolean attachToRoot)见解
- LayoutInflater 的inflate(int resource, ViewGroup root, boolean attachToRoot)方法研究
- Android学习笔记之LayoutInflater的inflate方法中的ViewGroup root 参数理解
- LayoutInflater.inflate(int resource, ViewGroup root, boolean attachToRoot)方法解析
- 关于LayoutInflater.inflater(int resId,ViewGroup root,boolean attchtoroot)第三个参数的问题
- LayoutInflater.inflate(int resource, ViewGroup root, boolean attachToRoot)的使用
- View.inflate(Context context, int resource, ViewGroup root)
- android.view.InflateException: <merge /> can be used only with a valid ViewGroup root and attachToRo