博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2013年9月18日

摘要: Android中LayoutInflater的使用博客分类:AndroidInflater英文意思是膨胀,在Android中应该是扩展的意思吧。 LayoutInflater的作用类似于 findViewById(),不同点是LayoutInflater是用来找layout文件夹下的xml布局文件,并且实例化!而 findViewById()是找具体某一个xml下的具体 widget控件(如:Button,TextView等)。获取它的用法有3种:方法1:由LayoutInflater的静态函数:from(Context context) 获取:static LayoutInflater fr 阅读全文

posted @ 2013-09-18 09:03 小往 阅读(293) 评论(0) 推荐(0) 编辑