标签:开发 android layoutinflater layout 布局
LayoutInflater inflater = (LayoutInflater) getSystemService(LAYOUT_INFLATER_SERVICE);
View view = inflater.inflate(R.layout.item_listview, null); // 第一个参数写你需要加载的布局文件
LayoutInflater inflater = LayoutInflater.from(MainActivity.this); // 参数 : 填写context
View view = inflater.inflate(R.layout.item_listview, null); // 第一个参数写你需要加载的布局文件
View view = View.inflate(MainActivity.this, R.layout.item_listview, null);
版权声明:本文为博主原创文章,未经博主允许不得转载。
标签:开发 android layoutinflater layout 布局
原文地址:http://blog.csdn.net/weiwosuoai/article/details/46929599