LayoutInflater

Instantiates a layout XML file into its corresponding View objects. It is never used directly. Instead, use getLayoutInflater() or getSystemService(String) to retrieve a standard LayoutInflater instance that is already hooked up to the current context and correctly configured for the device you are running on. For example: 

将一个xml layout文件转化为对应的View对象 

return inflater.inflate(R.layout.slidelistview, null);
inflater = LayoutInflater.from(MainActivity.this);

posted on 2016-05-07 17:08  oyl  阅读(213)  评论(0编辑  收藏  举报

导航