LayoutInflater的用法
2017-09-02 16:17
127 查看
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
LayoutInflater inflater = (LayoutInflater)context.getSystemService
(Context.LAYOUT_INFLATER_SERVICE);
For performance reasons, view inflation relies heavily on pre-processing of XML files that is done at build time. Therefore, it is not currently possible to use LayoutInflater with an XmlPullParser over a plain XML file at runtime; it only works with an XmlPullParser returned from a compiled resource (R.something file.)
相关文章推荐
- Android LayoutInflater.inflate()的参数及其用法
- LayoutInflater的inflate函数用法
- LayoutInflater的inflate函数用法详解
- LayoutInflater的inflate函数用法详解
- LayoutInflater的inflate函数用法详解
- LayoutInflater用法
- 关于LayoutInflater的错误用法(警告提示:Avoid passing null as the view root)
- Android成长之路-LayoutInflater和inflate的用法
- LayoutInflater的inflate函数用法详解
- Android中LayoutInflater的用法
- android LayoutInflater.inflate()的参数及其用法
- 总结系列-LayoutInflater的inflate函数用法详解
- LayoutInflater的inflate函数用法详解
- LayoutInflater 用法
- LayoutInflater和inflate的用法,有图有真相
- android LayoutInflater.inflate()的参数及其用法
- android LayoutInflater和inflate()方法的用法
- LayoutInflater的正确用法
- LayoutInflater的inflate函数用法讲解
- LayoutInflater的inflate函数用法详解