merge和include的区别是
e>
引用必须是这样的:
==View v = inflater.inflate(R.layout.el_marge, itemGroup, true); ==
否则报错:<merge /> can be used only with a valid ViewGroup root and attachToRoot=true
也就是说:merge是为了减少include里的根ViewGroup,那么inflate的marge必须放到ViewGroup中。
merge和include的区别是
引用必须是这样的:
==View v = inflater.inflate(R.layout.el_marge, itemGroup, true); ==
否则报错:<merge /> can be used only with a valid ViewGroup root and attachToRoot=true
也就是说:merge是为了减少include里的根ViewGroup,那么inflate的marge必须放到ViewGroup中。