convertView = inflate.inflate(R.layout.list, null);   =>convertView = LayoutInflater.inflate(R.layout.list, null);   

解决方案 »

  1.   

    报错
    Cannot make a static reference to the non-static method inflate(int, ViewGroup) from the type LayoutInflater在类里面我定义了 LayoutInflater inflate的了
      

  2.   

    该如何实例化呢?
    LayoutInflater inflate; 这个没实例化啊 ,你log下看看是不是空把,是空就 在构造中传个Context对象过来然后inflate.from(context)实例化
      

  3.   

    该如何实例化呢?
    LayoutInflater inflate; 这个没实例化啊 ,你log下看看是不是空把,是空就 在构造中传个Context对象过来然后inflate.from(context)实例化
    确实没实例化
    可是
    convertView = LayoutInflater.from(context).inflate(R.layout.list, null);这样实例化跟
    inflate.from(context)这样有什么区别的呢?
      

  4.   

    该如何实例化呢?
    LayoutInflater inflate; 这个没实例化啊 ,你log下看看是不是空把,是空就 在构造中传个Context对象过来然后inflate.from(context)实例化
    确实没实例化
    可是
    convertView = LayoutInflater.from(context).inflate(R.layout.list, null);这样实例化跟
    inflate.from(context)这样有什么区别的呢?
    我写错了,你写的是对的,我那样不能实例化,因为对象都还是为空