Android: How to detect when a scroll has ended

后端 未结 14 881
误落风尘
误落风尘 2020-11-27 10:54

I am using the onScroll method of GestureDetector.SimpleOnGestureListener to scroll a large bitmap on a canvas. When the scroll has ended I want to redraw the bitmap in case

14条回答
  •  情话喂你
    2020-11-27 11:29

    I am sure it is too late for you, however, it seems I have found the right solution to your original question and not necessary the intention.

    If you are using Scroller/OverScroller Object for scrolling you should check the return value from the following function.

    public boolean computeScrollOffset() 
    

    enjoy

    harvinder

提交回复
热议问题