2013年11月21日

android之LayoutInflater讲解

摘要: 在实际工作中,事先写好的布局文件往往不能满足我们的需求,有时会根据情况在代码中自定义控件,这就需要用到LayoutInflater-->用来获得布局文件对象的。LayouInflater经常在BaseAdapter的getView()方法中用到,用来获取整个View并返回。LayoutInflater有三种用法 :(1)LayouInflater inflater =LayouInflater.from(this); View layout = inflater.inflate(R.layout.main,null);(2) LayoutInflater inflater = getLa 阅读全文

posted @ 2013-11-21 09:50 jianrong.zheng 阅读(193) 评论(0) 推荐(1) 编辑

导航