これら2つに違いはありますか?
inflater = (LayoutInflater) LayoutInflater.from(context);
inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
これら2つに違いはありますか?
inflater = (LayoutInflater) LayoutInflater.from(context);
inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
ソースコードを調べるとLayoutInflater
わかるように、現時点ではありません。を返すのではなくfrom()
をスローしますが、それ以外は同じです。Exception
null
個人的にはgetLayoutInflater()
一番使っています。