摘要:
Inflater英文意思是膨胀,在Android中应该是扩展的意思吧。LayoutInflater的作用类似于 findViewById(),不同点是LayoutInflater是用来找layout文件夹下的xml布局文件,并且实例化!然后调用inflate方法将xml布局文件转成View,返回一个View对象。。。而 findViewById()是找具体某一个xml下的具体 widget控件(如:Button,TextView等)。LayoutInflater经常在BaseAdapter的getView方法中用到,用来获取整个View并返回。(0)她可以有很多地方可以使用,如BaseAdap 阅读全文
浙公网安备 33010602011771号