【发布时间】:2017-02-19 23:05:52
【问题描述】:
想问。有什么区别:
LayoutInflater layoutInflater = (LayoutInflater) getBaseContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
还有:
LayoutInflater layoutInflater = LayoutInflater.from(this);
?
【问题讨论】:
-
没有区别,查看
from源码 -
@Selvin,你能和我分享一下吗?
-
有什么用? Android 是开源的,很容易找到。
-
@Selvin,好的,谢谢)
标签: android layout view android-context layout-inflater