coderABC

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

Android中得到布局文件对象有两种方式
第一种,在Activity所在类中

this.getLayoutInflater().inflater(R.layout.布局文件名,null);

第二种,在非Activity所在类中

Context.getSystemService(Context.LAYOUT_INFLATER_SERVICE).inflater(R.layout.布局文件名,null);

 

posted on 2016-04-13 20:33  as798982083  阅读(1064)  评论(0编辑  收藏  举报