开发者

Android Linkify stops getSelectedItemPosition() from working?

开发者 https://www.devze.com 2023-01-11 15:03 出处:网络
I have a ListView which has a TextView in the row. The TextView has been Linkified and has had setMovementMethod(LinkMovementMethod.getInstance()) set on it.

I have a ListView which has a TextView in the row. The TextView has been Linkified and has had setMovementMethod(LinkMovementMethod.getInstance()) set on it.

The ListView is n开发者_JAVA技巧o longer selectable and the ListView's getSelectedItemPosition() always return -1 .

Is there a way to know where the ListView has scrolled to in this case?


You can try AdapterView#getFirstVisiblePosition() it will return the position in the adapter for the first visible child view on the screen.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号