Getting force close while scrolling down the list View in Android

后端 未结 1 748
独厮守ぢ
独厮守ぢ 2021-01-26 10:50

I am getting force close errors while I try to scroll down my list View in fragment activity, which has 1 image View and 2 text view. I am beginner in android, so don\'t have th

相关标签:
1条回答
  • 2021-01-26 11:29

    Your holder is null, always. In method getView you assign null to holder. In else you should assign tagged object to holder.

    In your method, getView():

    {
    //...
    } else {
    holder = (ViewHolder)convertView.getTag();
    }
    
    0 讨论(0)
提交回复
热议问题