Exemplo n.º 1
0
	/**
	 * Dismiss chart data with animation.
	 *
	 * @param anim   Animation used to exit
	 */
	public void dismiss(Animation anim){

		if(anim != null) {
			mAnim = anim;

			final Runnable endAction = mAnim.getEndAction();
			mAnim.setEndAction(new Runnable() {
				@Override
				public void run() {
					if (endAction != null)
						endAction.run();
					data.clear();
					invalidate();
				}
			});

			data = mAnim.prepareExitAnimation(this);
		}else{
			data.clear();
		}
		invalidate();
	}