@Override public void onClick(View v) { animatingButton.animate().alpha(1); } });
@Override public void onClick(View v) { animatingButton.animate().alpha(0); } });
@Override public void onClick(View v) { mListSelected.clear(); // This also updates the List on ServiceReader because it is poiting to the same object mLProcessContainer.removeAllViews(); mHandlerVG.post(drawRunnableGraphic); mBRemoveAll.animate().setDuration(300).alpha(0).setListener(new AnimatorListenerAdapter() { @Override public void onAnimationEnd(Animator animation) { mBRemoveAll.setVisibility(View.GONE); } }); } });
@Override public void onClick(View v) { animatingButton.animate().rotationYBy(720); } });
@TargetApi(16) public void setupLiveAnimOnButtonL16(final Button button, final Runnable onEndRunnable) { button.animate().setDuration(400); button.setOnTouchListener(new View.OnTouchListener() { @Override public boolean onTouch(View arg0, MotionEvent arg1) { if (arg1.getAction() == MotionEvent.ACTION_DOWN) { button.animate().setInterpolator(decelerator). scaleX(.7f).scaleY(.7f); } else if (arg1.getAction() == MotionEvent.ACTION_UP) { button.animate().setInterpolator(overshooter). scaleX(1.6f).scaleY(1.6f).withEndAction(onEndRunnable); } return false; } }); } }
@Override public boolean onTouch(View arg0, MotionEvent arg1) { if (arg1.getAction() == MotionEvent.ACTION_DOWN) { button.animate().setInterpolator(decelerator). scaleX(.7f).scaleY(.7f); } else if (arg1.getAction() == MotionEvent.ACTION_UP) { button.animate().setInterpolator(overshooter). scaleX(1.6f).scaleY(1.6f).withEndAction(onEndRunnable); } return false; } });
@Override public void onClick(View view) { b.animate().rotationYBy(180).setDuration(500).setListener(new Animator.AnimatorListener() { @Override public void onAnimationStart(Animator animator) {
@Override public void onClick(View v) { animatingButton.animate().x(0).y(0); } });
@Override public void animateContentIn(int delay, int duration) { mMessageView.setAlpha(0f); mMessageView.animate().alpha(1f).setDuration(duration) .setStartDelay(delay).start(); if (mActionView.getVisibility() == VISIBLE) { mActionView.setAlpha(0f); mActionView.animate().alpha(1f).setDuration(duration) .setStartDelay(delay).start(); } }
@Override public void animateContentIn(int delay, int duration) { mMessageView.setAlpha(0f); mMessageView.animate().alpha(1f).setDuration(duration) .setStartDelay(delay).start(); if (mActionView.getVisibility() == VISIBLE) { mActionView.setAlpha(0f); mActionView.animate().alpha(1f).setDuration(duration) .setStartDelay(delay).start(); } }
@Override public void animateContentOut(int delay, int duration) { mMessageView.setAlpha(1f); mMessageView.animate().alpha(0f).setDuration(duration) .setStartDelay(delay).start(); if (mActionView.getVisibility() == VISIBLE) { mActionView.setAlpha(1f); mActionView.animate().alpha(0f).setDuration(duration) .setStartDelay(delay).start(); } } }
@Override public void animateContentOut(int delay, int duration) { mMessageView.setAlpha(1f); mMessageView.animate().alpha(0f).setDuration(duration) .setStartDelay(delay).start(); if (mActionView.getVisibility() == VISIBLE) { mActionView.setAlpha(1f); mActionView.animate().alpha(0f).setDuration(duration) .setStartDelay(delay).start(); } } }
animatingButton.animate().setDuration(2000);
emailSignInButton.animate() .setStartDelay(1000) .setInterpolator(new AccelerateDecelerateInterpolator())
@Override public void onClick(View v) { int xValue = container.getWidth() - animatingButton.getWidth(); int yValue = container.getHeight() - animatingButton.getHeight(); animatingButton.animate().x(xValue).y(yValue); } });