Android ListView: get data index of visible item

前端 未结 3 975
隐瞒了意图╮
隐瞒了意图╮ 2020-11-30 01:37

I have an Android ListView created with a SimpleAdapter that has more items in it than fit in the screen. After the list has been scrolled, I need

3条回答
  •  一个人的身影
    2020-11-30 02:29

    Simply use the getPositionForView(View) (see documentation). The main advantage of this method is it also works with descendant Views of an item.

提交回复
热议问题