Android: listview: custom items: nullpointerexception, findviewbyid returns null

前端 未结 5 2260
耶瑟儿~
耶瑟儿~ 2020-12-11 14:27

I have been googling and searching to resolve this error for some time and I can`t seem to find out why and how to solve it.

I`m using a customAdapter to fill in my

5条回答
  •  情书的邮戳
    2020-12-11 14:43

    You are inflating the layout, but not using it while fetching it's views

    Do this:

     mHolder.textViewCenter = (TextView)convertView.findViewById(R.id.textview_list_item_central)
    

提交回复
热议问题