开发者

Android ScrollView isFinished?

Just looking 开发者_开发知识库for an easy answer that I can't find on Google. Simply put. Is there a way to tell when ScrollView has stopped scrolling after a fling?


Yes, after fling it comes in ideal state which means that your fling is over. For this you have to put listener on your list view Like list.setOnScrollListener(this). Then you have to check in the listener that if it's in ideal state or not. like this

public void onScrollStateChanged(AbsListView view, int scrollState) 
{          
     if(OnScrollListener.SCROLL_STATE_IDLE)
    {
        your code;
    }
}
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜