在实际开发中LayoutInflater这个类还是非常有用的,它的作用类似于findViewById()。
不同点是LayoutInflater是用来找res/layout/下的xml布局文件,并且实例化;而findViewById()是找xml布局文件下的具体widget控件(如Button、TextView等)。
Android(java)学习笔记114:LayoutInflater和findViewById
原文:http://www.cnblogs.com/hebao0514/p/4590490.html