inflater专题

inflater.inflate的理解

View rl = inflater.inflate(R.layout.mytest, mListCon,true); 如果是第三个参数是false,就是不要将布局文件加载到root中,返回值是布局文件的根布局,如果要将xml加载到root上,要root.addView(rl); 如果是true,就是将xml文件加载到root上,返回的是root,那么rl直接就添加到root上了 关于Lay