Class AerisAnimateHandler


  • public class AerisAnimateHandler
    extends android.os.Handler
    Animate handler designed to handle animating through a list of Bitmaps that were obtained through the LoadTileAnimationTask.
    • Nested Class Summary

      • Nested classes/interfaces inherited from class android.os.Handler

        android.os.Handler.Callback
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int START  
      static int STOP  
    • Constructor Summary

      Constructors 
      Constructor Description
      AerisAnimateHandler​(List<AerisAmpAnimationInfo> ampImageList, android.widget.ImageView imageView)
      Constructs the handler with the imageList to animate through and the ImageView to use.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void handleMessage​(android.os.Message msg)  
      void recycle()
      Recycle the handler, and all bitmaps associated so they are not kept in memory.
      void setCurrentIndex​(int index)  
      void setStepDelegate​(AerisTileStepDelegate stepDelegate)  
      void setTitleDisplayDelegate​(AerisTileDisplayDelegate delegate)
      Sets the display delegate.
      void start​(int rate)
      Starts or queues another image to be posted at the next rate milliseconds.
      void stepBackwards()
      Stops the animation and steps the animation one backward.
      void stepForward()
      Stops the animation and steps the animation one forward.
      void stop()
      Stops the animation
      • Methods inherited from class android.os.Handler

        createAsync, createAsync, dispatchMessage, dump, getLooper, getMessageName, hasCallbacks, hasMessages, hasMessages, obtainMessage, obtainMessage, obtainMessage, obtainMessage, obtainMessage, post, postAtFrontOfQueue, postAtTime, postAtTime, postDelayed, postDelayed, removeCallbacks, removeCallbacks, removeCallbacksAndMessages, removeMessages, removeMessages, sendEmptyMessage, sendEmptyMessageAtTime, sendEmptyMessageDelayed, sendMessage, sendMessageAtFrontOfQueue, sendMessageAtTime, sendMessageDelayed, toString
    • Constructor Detail

      • AerisAnimateHandler

        public AerisAnimateHandler​(List<AerisAmpAnimationInfo> ampImageList,
                                   android.widget.ImageView imageView)
        Constructs the handler with the imageList to animate through and the ImageView to use.
        Parameters:
        ampImageList - list to animate through.
        imageView - ImageView to animate.
    • Method Detail

      • setTitleDisplayDelegate

        public void setTitleDisplayDelegate​(AerisTileDisplayDelegate delegate)
        Sets the display delegate. This will update the delegate each frame as a different image is displayed with the Tile name and a date object from the tile.
        Parameters:
        delegate - delegate to use in this handler
      • start

        public void start​(int rate)
        Starts or queues another image to be posted at the next rate milliseconds.
        Parameters:
        rate - rate to post the new frame.
      • stop

        public void stop()
        Stops the animation
      • recycle

        public void recycle()
        Recycle the handler, and all bitmaps associated so they are not kept in memory. Use for additional cleanup.
      • stepForward

        public void stepForward()
        Stops the animation and steps the animation one forward. If past the last index, goes back to the first.
      • stepBackwards

        public void stepBackwards()
        Stops the animation and steps the animation one backward. If past the first index, goes to the last index.
      • setCurrentIndex

        public void setCurrentIndex​(int index)
      • handleMessage

        public void handleMessage​(android.os.Message msg)
        Overrides:
        handleMessage in class android.os.Handler