2013年6月17日

Android中LayoutInflater的使用

摘要: 在实际工作中,事先写好的布局文件往往不能满足我们的需求,有时会根据情况在代码中自定义控件,这就需要用到LayoutInflater。LayoutInflater在Android中是“扩展”的意思,作用类似于findViewById(),不同的是LayoutInflater是用来获得布局文件对象的,而findViewById()是用来获得具体控件的。LayoutInflater经常在BaseAdapter的getView方法中用到,用来获取整个View并返回。实现LayoutInflater的实例化共有3种方法,(1).通过SystemService获得 LayoutInflaterinflat 阅读全文

posted @ 2013-06-17 15:44 leihupqrst 阅读(190) 评论(0) 推荐(0)

导航