Sometimes listView.getChildAt(int index) returns NULL (Android)

后端 未结 4 1679
离开以前
离开以前 2020-12-02 02:06

I have a listView with a custom adapter. When something happens (a click in a child) I do some calculation things and modify the child View. IF some condition has been fulfi

4条回答
  •  时光取名叫无心
    2020-12-02 02:55

    Because of view recycling, listView.getChildAt() will only return a view for the positions it is displaying, and maybe one more. Maybe if you share more of your code we can help you figure out how to best tackle the problem.

提交回复
热议问题