NullPointerException in custom adapter getView

后端 未结 3 697
青春惊慌失措
青春惊慌失措 2020-12-18 04:12

I\'m coding a custom adapter for a ListView that has a custom list to it.

obviously, I have to write the getView function. so here is my code:



        
3条回答
  •  情话喂你
    2020-12-18 04:45

    are you initializing inflater? if not initialize it.

    inflater = getLayoutInflater();
    

    or

     inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
    

提交回复
热议问题