inflate就相当于将一个xml中定义的布局找出来.

三种方式可以生成LayoutInflater:
  
  LayoutInflaterinflater=LayoutInflater.from(this);
  
  LayoutInflaterinflater=getLayoutInflater();
  
  LayoutInflaterinflater=(LayoutInflater)this.getSystemService

原文来自于:

http://android.tgbus.com/Android/tutorial/201104/348009.shtml

更多相关文章

  1. Android自定义dialog弹出布局
  2. LinearLayout 线性布局
  3. Android Studio 无法预览xml布局视图
  4. eclipse中Android布局的基本操作
  5. Android自学笔记之Android常见命令操作及一些普通布局属性
  6. Android共有五种布局方式
  7. Android布局_View属性
  8. Android利用setLayoutParams在代码中调整布局(Margin和居中)
  9. Android界面布局基本属性

随机推荐

  1. 2011.07.11(2)——— android 自定义Notifi
  2. Android(安卓)源码启动虚拟机经验
  3. android
  4. Difference of px, dp, dip and sp in an
  5. Android(安卓)Jetpack之Lifecycle的源码
  6. 总结系列-Android的文件系统
  7. ScrollView嵌套RecyclerView冲突解决
  8. startActivity exposed beyond app throu
  9. CheckBox自定义
  10. Android中真正的Player