My question is basically in the title but I am curious if there is a difference between context.getLayoutInflater()
and LayoutInflater.from(context)
. For example:
View contentView = getActivity().getLayoutInflater().inflate(R.layout.some_layout, null);
and
View contentView = LayoutInflater.from(getActivity()).inflate(R.layout.some_layout, null);
No, they do the same thing. I see the from version used more these days, but they will do the same thing.