如何知道哪个列表项对用户可见? [英] How to know which list item is visible to user?

查看:78
本文介绍了如何知道哪个列表项对用户可见?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我通过我的应用录制了视频,然后将其存储在存储卡中.

I recorded videos through my app,And i stored in memory card.

在我获得这些视频并将其添加到列表视图之后.

After i get those videos and added to list view .

基于屏幕尺寸,用户只能看到一个视频.

Based on screen size only one video is visible to user.

如果用户上下滚动并停止.

If user scroll up and down and stop.

那时候我想知道在用户面前是哪一个.

At that point i want to know which one is in front of user.

如果有人知道解决方案,请帮助我.或采取其他任何方式

If any one know the solution please help me.or any other way to do

预先感谢

推荐答案

好的,有两种方法可以帮助您.

OK, there are two methods could help you.

ListView.getFirstVisiblePosition()
ListView.getLastVisiblePosition()

查看此页面以了解详细信息.

这篇关于如何知道哪个列表项对用户可见?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆