参考连接:http://blog.csdn.net/lovexieyuan520/article/details/9036673
http://www.2cto.com/kf/201407/313054.html
http://blog.csdn.net/xyz_fly/article/details/37932989
http://blog.jobbole.com/72156/
inflate方法有4种:这个方法重载了四种调用方式,分别为:
1. public View inflate(int resource, ViewGroup root)
2. public View inflate(int resource, ViewGroup root, boolean attachToRoot)
3.public View inflate(
4.public View inflate(
最终调用第四种方法。
1当root为空,当前布局不起作用,使用根布局的设置。
2当root不为空(root),attachToRoot为false,才能使用该布局的设置。 当attachToRoot为true,该布局被添加到(如果根布局为垂直排列)(挂载?)根布局中,且保留了其自己的layoutparam参数(即该布局的参数设置)。
某1楼总结:
true:并且root存在,将false:返回
原标题:LayoutInflater.inflate() 参数研究
关键词: