当前位置:编程学习 > XML/UML >>

引入xml布局文件

[java]
//声明并实例化LayoutInflater   
LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); 
View vi = inflater.inflate(R.layout.main, null); 
//vi就是main这个布局生成的View,在需要的地方添加使用 


摘自 agods--足迹
补充:Web开发 , 其他 ,
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,