也就是说,它会立即以阻塞方式膨胀布局,并在返回之前调用onInflateFinished()
,还是立即返回并安排稍后膨胀?
最佳答案
Inflate
是同步的。异步没意义,更何况获取返回值,会变得相当复杂。
See docs :
Returns:
The root View of the inflated hierarchy. If root was supplied, this is the root View; otherwise it is the root of the inflated XML file.
关于android - LayoutInflater.inflate() 是同步的吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13158320/