Simple "No" answer will calm me. If there is any difference then what it is?
No
As long as the Activity or Window that calls getLayoutInflater()
has the same Context that would call getSystemService()
, there is no difference.
Proof You can trace the LayoutInflater returned by getLayoutInflater()
to LayoutInflater.from() and you can see this is just a shortcut for getSystemService()
from the source code:
public static LayoutInflater from(Context context) { LayoutInflater LayoutInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); if (LayoutInflater == null) { throw new AssertionError("LayoutInflater not found."); } return LayoutInflater; }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With