Package com.aerisweather.aeris.maps
Class AerisAnimateHandler
- java.lang.Object
-
- android.os.Handler
-
- com.aerisweather.aeris.maps.AerisAnimateHandler
-
public class AerisAnimateHandler extends android.os.HandlerAnimate handler designed to handle animating through a list of Bitmaps that were obtained through theLoadTileAnimationTask.
-
-
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 voidhandleMessage(android.os.Message msg)voidrecycle()Recycle the handler, and all bitmaps associated so they are not kept in memory.voidsetCurrentIndex(int index)voidsetStepDelegate(AerisTileStepDelegate stepDelegate)voidsetTitleDisplayDelegate(AerisTileDisplayDelegate delegate)Sets the display delegate.voidstart(int rate)Starts or queues another image to be posted at the next rate milliseconds.voidstepBackwards()Stops the animation and steps the animation one backward.voidstepForward()Stops the animation and steps the animation one forward.voidstop()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
-
-
-
-
Field Detail
-
START
public static final int START
- See Also:
- Constant Field Values
-
STOP
public static final int STOP
- See Also:
- Constant Field Values
-
-
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
-
setStepDelegate
public void setStepDelegate(AerisTileStepDelegate stepDelegate)
-
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:
handleMessagein classandroid.os.Handler
-
-