如何确定一个视图可见在ListView? [英] How to determine if a view is visible in a ListView?
本文介绍了如何确定一个视图可见在ListView?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我希望能够判断一个观点是在我的列表视图,这是由填充一个自定义的CursorAdapter可见。我怎样才能做到这一点?
I want to be able to tell if a view is visible in my listview, which is populated by a custom CursorAdapter. How can I do this?
推荐答案
您可以检查一个给定的位置是否可见,使用getFirstVisiblePosition()和getChildCount()。
You can check whether a given position is visible, using getFirstVisiblePosition() and getChildCount().
这篇关于如何确定一个视图可见在ListView?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文