How can i implement the first name of the contact disappear as i scroll the contacts
In android contacts application, if I set the 'Sort list by' options to 'Last name', when I开发者_Python百科 scroll the contacts list view, the first name of that contact is invisible. But the scrolling stop, the first name of the contact is visible.
I have a list view in my application, how can i get notified when does my list view stops scrolling?
Thank you.
See the Android API Demos app on the emulator; there's a "slow adapter" example that does this (source code). The key part is in the onScrollStateChanged
method where it checks the scrollState
for OnScrollListener.SCROLL_STATE_IDLE
, SCROLL_STATE_TOUCH_SCROLL
and SCROLL_STATE_FLING
(and related state-check code in the getView
method).
精彩评论