Starts an animation on the view.
<p/>
<br>
contributed by: marcosbeirigo

@param animId   Id of the desired animation.
@param listener The listener to recieve notifications from the animation on its events.
@return self
960986
public T animate(int animId, Animation.AnimationListener listener) {
        Animation anim = AnimationUtils.loadAnimation(context, animId);
        anim.setAnimationListener(listener);
        return animate(anim);
    }
1282942
@RequiresApi(Build.VERSION_CODES.KITKAT)
    public void removePauseListener(@NonNull IconicsAnimationPauseListener listener) {
        if (mPauseListeners == null) {
            return;
        }
        mPauseListeners.remove(listener);
        if (mPauseListeners.size() == 0) {
            mPauseListeners = null;
            mAnimator.removePauseListener((Animator.AnimatorPauseListener) mProxyPauseListener);
        }
    }
264453
private AnimatorListener createDismissAnimationListener() {
        return new AnimatorListenerAdapter() {

            @Override
            public void onAnimationEnd(Animator animation) {
                super.onAnimationEnd(animation);
                AbstractAnimateableDialog.super.dismiss();
            }

        };
    }
1204052
public void removeUpdateListener(AnimatorUpdateListener listener) {
        if (mUpdateListeners == null) {
            return;
        }
        mUpdateListeners.remove(listener);
        if (mUpdateListeners.size() == 0) {
            mUpdateListeners = null;
        }
    }
453555
public void showWithAnimationWithListener(Animator.AnimatorListener animatorListener) {
		scrollDirection = SCROLL_TO_TOP;
		ObjectAnimator objectAnimator = objectAnimatorFactory.getObjectAnimator(animatedView, ANIMATION_TYPE, HIDDEN_Y_POSITION);
		if (animatorListener != null) {
			objectAnimator.addListener(animatorListener);
		}
		objectAnimator.setDuration(durationInMillis);
		objectAnimator.start();
	}
421697
@NonNull
    public Transition removeListener(@NonNull TransitionListener listener) {
        if (mListeners == null) {
            return this;
        }
        mListeners.remove(listener);
        if (mListeners.size() == 0) {
            mListeners = null;
        }
        return this;
    }
639590
public void addListener(final WebAppListener listener) {
		NullArgumentException.validateNotNull(listener, "Listener");
		NullArgumentException.validateNotNull(listener.getListenerClass(),
				"Listener class");
		if (!listeners.contains(listener)) {
			listeners.add(listener);
		}
	}
1192693
public Animation start(GVRAnimationEngine engine) {
        ((GVRAnimation) getAnimation()).start(engine);
        mIsRunning = true;
        return this;
    }
1229035
protected void animate(int translationY) {
		ObjectAnimator animator = objectAnimatorFactory.getObjectAnimator(animatedView, ANIMATION_TYPE, translationY);
		animator.setDuration(durationInMillis);
		animator.start();
	}
1069108
private void startAnimationInternal() {
        long duration = toController.getSettings().getAnimationsDuration();
        float durationFraction = toPosition == 1f
                ? (isLeaving ? position : 1f - position)
                : (isLeaving ? position / toPosition : (1f - position) / (1f - toPosition));

        positionScroller.setDuration((long) (duration * durationFraction));
        positionScroller.startScroll(position, isLeaving ? 0f : 1f);
        animationEngine.start();
        onAnimationStarted();
    }
909605
public final void addListener(
            @NonNull final Listener<DataType, KeyType, ViewType, ParamType> listener) {
        listeners.add(listener);
    }
1139294
public synchronized static void init(final NewExtensionListener _listener)
    {
        PeerMonitor.listener = _listener;

        if (PeerMonitor.self == null)
        {
            PeerMonitor.self = new PeerMonitor();
        }
        else if (_listener != null)
        {
            logger.error("Call to PeerMonitor.init, but it's already initialized. Listener will not be set");
        }
    }
1170408
@Deprecated
  public void start(final Listener listener) {
    if (listener instanceof Observer) {
      start((Observer) listener);
    } else {
      start(new Observer() {
          @Override
          public void onError(Status error) {
            listener.onError(error);
          }

          @Override
          public void onResult(ResolutionResult resolutionResult) {
            listener.onAddresses(resolutionResult.getAddresses(), resolutionResult.getAttributes());
          }
      });
    }
  }
235405
public void startAnimation()
  {
    Date time = new Date();
    this.beginAnimation = time.getTime();
    this.endAnimation = beginAnimation + (long) (animationTime * 1000);
    this.animate = true;
  }
369536
public BaseListener setNextListener(BaseListener listener)
    {
        BaseListener listenerTemp = m_nextListener;
        m_nextListener = listener;
        return listenerTemp;
    }
710501
@Override
    public void onSetListeners() {
        imageViewPerson.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                PersonHolderListener listener = getListener(PersonHolderListener.class);
                if (listener != null) {
                    listener.onPersonImageClicked(getItem());
                }
            }
        });
    }
1261230
private void initListeners() {
        listViewProperty().addListener((listObj, oldList, newList) -> {
            if (newList != null) {
                if (getListView() instanceof JFXListView) {
                    ((JFXListView<?>) newList).currentVerticalGapProperty().addListener((o, oldVal, newVal) -> {
                        cellRippler.rippler.setClip(null);
                        if (newVal.doubleValue() != 0) {
                            playExpandAnimation = true;
                            getListView().requestLayout();
                        } else {
                            // fake expand state
                            double gap = clip.getY() * 2;
                            gapAnimation = new Timeline(
                                new KeyFrame(Duration.millis(240),
                                    new KeyValue(this.translateYProperty(),
                                        -gap / 2 - (gap * (getIndex())),
                                        Interpolator.EASE_BOTH)
                                ));
                            gapAnimation.play();
                            gapAnimation.setOnFinished((finish) -> {
                                requestLayout();
                                Platform.runLater(() -> getListView().requestLayout());
                            });
                        }
                    });

                    selectedProperty().addListener((o, oldVal, newVal) -> {
                        if (newVal) {
                            selectionChanged = true;
                        }
                    });
                }