【发布时间】:2013-05-30 07:45:14
【问题描述】:
¿layout inflater 是什么意思?¿你能用你自己的话解释一下吗?谢谢
mLayoutInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
view = mLayoutInflater.inflate(R.layout.list_item, null);
【问题讨论】:
¿layout inflater 是什么意思?¿你能用你自己的话解释一下吗?谢谢
mLayoutInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
view = mLayoutInflater.inflate(R.layout.list_item, null);
【问题讨论】:
如果采用您的静态布局(您使用图形布局编辑器创建的)并创建一个可以在运行时使用的视图对象
【讨论】:
Layout inflator 会在 listview 中为您的自定义行充气。它始终是动态创建的,并与不同的数据绑定。
【讨论】: