My question is what is the best way to create a LayoutInflater instance? Is there any difference between
LayoutInflater inflater = LayoutInflater.from(context);
and
LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
Which is the better solution? Other solutions are also welcome.
Thanks.
If you checked the LayoutInflater.java source file you would find.