本质上是一样的,题主可以查看Android源代码:
我们看下View类inflater方法的代码:其实方法内本质还是在调用inflater.inflater方法
public static View inflate(Context context, @LayoutRes int resource, ViewGroup root) {
LayoutInflater factory = LayoutInflater.from(context);
return factory.inflate(resource, root);
}