Results 1 to 1 of 1
  1. #1
    allaudin's Avatar
    allaudin is offline Senior Member
    Join Date
    Apr 2013
    Planet Earth
    Rep Power

    Default Animating fling gesture on custom view


    Lately, I have been trying to implement fling gesture in custom view in Android. I have gone through this tutorial but all I was able to scroll it by overriding computeScroll method. What I want to do is to make it smooth. Scroll should look like android native scrolling but in my case, as I am invalidating view on every call to computeScroll it's ab it jerky.

    For my custom view, I have saved a start offset which I increase or decrease based on the scrolling gesture. If it is scrolling downwards I add some value to start point and If it is scrolling upwards, I add negative value to offset.

    Secondly, I have seen in this article, they are using OverScroll but OverScroll only gets context in constructor. So when we call startScroll on OverScroller how does it scroll my view's canvas?
    Last edited by allaudin; 09-28-2016 at 08:41 AM.

Similar Threads

  1. Animating JInternalFrame
    By incredibleX in forum New To Java
    Replies: 4
    Last Post: 01-26-2014, 12:27 AM
  2. Need Help in Animating JButton
    By incredibleX in forum Advanced Java
    Replies: 3
    Last Post: 01-25-2014, 04:06 PM
  3. Custom Grid view
    By newProgrammer in forum Android
    Replies: 1
    Last Post: 12-03-2012, 06:44 PM
  4. [Slick] Animating a GIF?
    By SX16 in forum Java 2D
    Replies: 0
    Last Post: 11-27-2011, 02:52 AM
  5. trouble animating
    By rippon in forum AWT / Swing
    Replies: 3
    Last Post: 11-30-2010, 03:22 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts