inflate「inflate翻译」
inflate 和expand 的区别?
inflate指因充气而膨胀,inflate的对象是膨胀的物体,被动用法:xxx is inflated或者inflate xxx。
expand指的是尺寸、体积等变大或者重要性增强等等,expand是物体的动作,主动用法:xxx expands
可以用expand来说明inflate的动作,例如下面的句子:

Inflate a tyre 给轮胎打气。
A tyre expands when you pump air into it. 轮胎一打气就鼓起来
android中的“inflate”是什么意思?
inflate的作用就是将一个用xml定义的布局文件查找出来,注意与findViewById()的区别,inflate是加载一个布局文件,而findViewById则是从布局文件中查找一个控件。
1、获取LayoutInflater对象有三种方法
LayoutInflater inflater=LayoutInflater.from(this);
LayoutInflater inflater=getLayoutInflater();
LayoutInflater inflater=(LayoutInflater)this.getSystemService(LAYOUT_INFLATER_SERVICE);
2、关于LayoutInflater类inflate(int resource, ViewGroup root, boolean attachToRoot)
什么是Inflation
inflation in.fla.tion[In`flєʃən;
inˋflєiʃn]《inflate 的名词》名词1 (U)膨胀,充气2 (U)自满,得意; 夸张3‘经济’通货膨胀【同义字】inflation 货币贬值,物价上涨deflation通货紧缩,物价持续性下跌reflation使物价回稳,景气回升,使物价适度上升
英语inflating怎么翻译?
英语inflating表示膨胀的意思。
inflating
音标:英[ɪnˈfleɪtɪŋ] 美[ɪnˈfleɪtɪŋ]
v. 使充气; 膨胀; 鼓吹; 吹捧; (使)涨价;
inflating为inflate的现在分词;
短语搭配:
1、Inflate tool 膨胀工具
2、Inflate Cartoon 充气卡通
例句:
1、Don's lifejacket had failed to inflate.
唐的救生衣未能充气膨胀。
2、The life jacket failed to inflate.
救生衣未能充气。
3、His life jacket failed to inflate.
他的救生衣未能充气胀起来。
词形变化:
动词过去式: inflated
动词过去分词: inflated
动词现在分词: inflating
动词第三人称单数: inflates
inflate详解
生成布局的时候,经常会用到LayoutInflater.from(context).inflate(layoutRes, parent, false)方法,一直不知其具体实现以及各参数作用,靠猜来实现? 很惭愧,趁闲暇赶紧补补~
常用到的inflate方式:
LayoutInflater.inflate有多个重载的方法,但是最后都调用的是同一个
public View inflate(XmlPullParser parser, @Nullable ViewGroup root, boolean attachToRoot)
总结:
根据xml标签名称生成View,非public方法
View createViewFromTag(View parent, String name, Context context, AttributeSet attrs, boolean ignoreThemeAttr)
大概流程:
public final View createView(String name, String prefix, AttributeSet attrs)
总结:通过 类加载器 实现
void rInflate(XmlPullParser parser, View parent, Context context, AttributeSet attrs, boolean finishInflate)
rInflate方法是一个递归的方法,会将解析出来的View作为root(父View),继续进行子节点的解析,直到无法解析,即以下情况:
详细介绍
demo



