Cannot understand NullPointerException with custom adapter

后端 未结 2 1928
予麋鹿
予麋鹿 2021-01-07 03:02

I am trying to create a list view which as TextView that can display html content , an WebView and other basic TextViews.I tried to extend SimpleAdapter but i struck with th

相关标签:
2条回答
  • 2021-01-07 03:25

    As I can see in the code above, your problem was in the "return convertView;" line. You've just returned an input view, not the inflated one.

    0 讨论(0)
  • 2021-01-07 03:47

    Not sure if this is the cause but the last parameter to the SimpleAdapter constructor should all be TextViews.

    SimpleAdapter

    0 讨论(0)
提交回复
热议问题