zoukankan      html  css  js  c++  java
  • LayoutInflater

    将资源文件实例化为类的工具;

    inflate
    [in'fleit]
    vt., vi.
      使膨胀;打气
    to inflate a tire
    给轮胎打气
      使通货膨胀
     
    android解释:实例化,实现


    /**
    * Instantiates a layout XML file into its corresponding {@link android.view.View}
    * objects. It is never used directly. Instead, use
    * {@link android.app.Activity#getLayoutInflater()} or
    * {@link Context#getSystemService} 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:
    *
    * <pre>LayoutInflater inflater = (LayoutInflater)context.getSystemService
    * (Context.LAYOUT_INFLATER_SERVICE);</pre>
    *
    * <p>
    * To create a new LayoutInflater with an additional {@link Factory} for your
    * own views, you can use {@link #cloneInContext} to clone an existing
    * ViewFactory, and then call {@link #setFactory} on it to include your
    * Factory.
    *
    * <p>
    * 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.<em>something</em> file.)
    *
    * @see Context#getSystemService
    */
  • 相关阅读:
    CH4302 Interval GCD
    20201017 模拟赛总结
    LOJ#2610. 「NOIP2013」货车运输
    POJ3696 The Luckiest number
    20200925 小练习总结
    更新一波状态
    AFO
    【扩展lucas定理】
    【LCT维护子树信息】uoj207 共价大爷游长沙
    [bzoj4589]Hard Nim(FWT快速沃尔什变化+快速幂)
  • 原文地址:https://www.cnblogs.com/feng9exe/p/5726066.html
Copyright © 2011-2022 走看看