首页 > 试题广场 >

关于LayoutInflater的说法错误的是

[单选题]
关于LayoutInflater的说法错误的是
  • LayoutInflater的from方法是static(静态)的
  • LayoutInflater的inflate方法可以有三个参数
  • 在Activity中可以通过getLayoutInflater方法获得LayoutInflater对象
  • LayoutInflater的具有一个参数Context对象的构造方法
protected LayoutInflater(Context context)

这里应该选 D,protected 没公开出来

发表于 2019-10-11 14:56:58 回复(0)
c也可以吧,layoutInflater = context.getLayoutInflater(); activity里也有这个方法: public LayoutInflater getLayoutInflater() { throw new RuntimeException("Stub!"); }
编辑于 2019-09-17 11:13:08 回复(0)
发表于 2019-08-29 15:06:25 回复(0)
获取context就是获取一个系统服务,通过getsysyltemservice方法得到,难道不需要通过context? activity不是context? 所以又一个错题
发表于 2019-08-28 00:32:37 回复(1)
C? 这题目越来越看不懂了...
发表于 2019-08-15 16:32:02 回复(0)