首页 > 代码库 > 熟悉AndroidAPI系列13——LayoutInflater
熟悉AndroidAPI系列13——LayoutInflater
如何把一个xml文件渲染成一个View控件
1 //如何把一个xml文件渲染为一个View控件2 //得到一个对这个Activity的渲染器inflater3 LayoutInflater inflater = this.getLayoutInflater();4 //将image_switch.xml渲染成View控件5 View view = inflater.inflate(R.layout.image_switch, null);6 builder.setView(view);
熟悉AndroidAPI系列13——LayoutInflater
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。