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
    */
  • 相关阅读:
    备忘录模式
    观察者模式
    状态模式
    模板方法模式
    策略模式
    装饰者模式
    访问者模式
    工作那些事(二十七)项目经理在项目中是什么角色?
    工作那些事(二十六)个人和团队
    工作那些事(二十五)项目经理与产品经理
  • 原文地址:https://www.cnblogs.com/feng9exe/p/5726066.html
Copyright © 2011-2022 走看看