ViewPropertyAnimator alpha - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for ViewPropertyAnimator alpha method.

This code example shows how to use the following methods:alpha, setDuration, setStartDelay
This code example shows how to use the following methods:alpha, scaleX, scaleY, setDuration, setInterpolator
    /** Creates the open/close animation */ 
    private void animateScale(boolean isExitAnimation, final Runnable onAnimationEndRunnable) {
        mChild.setPivotX(mTargetScreen.centerX() - mChild.getLeft());
        mChild.setPivotY(mTargetScreen.centerY() - mChild.getTop());
        ViewPropertyAnimator animator = mChild.animate();
        animator.setDuration(mAnimationDuration);
        final int scaleInterpolator = isExitAnimation ? android.R.interpolator.accelerate_quint
                : android.R.interpolator.decelerate_quint;
        animator.setInterpolator(AnimationUtils.loadInterpolator(getContext(), scaleInterpolator));
        final float scaleTarget = isExitAnimation ? 0.5f : 1.0f;
        animator.scaleX(scaleTarget);
        animator.scaleY(scaleTarget);
        animator.alpha(isExitAnimation ? 0.0f : 1.0f);
 
        if (onAnimationEndRunnable != null) {
            animator.setListener(new AnimatorListener() {
                @Override 
                public void onAnimationStart(Animator animation) {}
 
                @Override 
                public void onAnimationRepeat(Animator animation) {}
7
CodeRank
This code example shows how to use the following methods:alpha, cancel, setDuration, setListener
This code example shows how to use the following methods:alpha, cancel, setDuration, setListener
This code example shows how to use the following methods:alpha, setDuration, setStartDelay
This code example shows how to use the following methods:alpha, cancel
		mHideHandler.removeCallbacks(mHideRunnable);
		mHideHandler.postDelayed(mHideRunnable, ANIMATION_DURATION);
		 
		mShakeView.setVisibility(View.VISIBLE);
		if(Build.VERSION.SDK_INT >= 14)
			mShakeAnimator.cancel();
		if(Build.VERSION.SDK_INT >= 12)
			mShakeAnimator.alpha(1)
						.setDuration(mShakeView.getResources().getInteger(android.R.integer.config_shortAnimTime))
						.setListener(null);
		else { 
			Animation fadeIn = AnimationUtils.loadAnimation(context, android.R.anim.fade_in);
			mShakeView.startAnimation(fadeIn);
		} 
	} 
	 
	@TargetApi(14) 
	public void hideAnimation() { 
		if(Build.VERSION.SDK_INT >= 14)
			mShakeAnimator.cancel();
4
CodeRank
This code example shows how to use the following methods:alpha, cancel
    } 
 
    public void hideUndoBar(boolean immediate) {
        removePreviousHandlerCallback(); 
        if (!immediate) {
            animator.cancel();
            animateFadeOut(); 
        } else { 
            removeBarView(); 
        } 
    } 
 
    private void removeBarView() { 
        undoBarView.setVisibility(View.GONE);
        undoBarView.setAlpha(ALPHA_MIN);
    } 
 
    private void animateFadeOut() { 
        setAnimationDuration(ALPHA_MIN).setListener(new AnimatorListenerAdapter() {
            @Override 

4
CodeRank
This code example shows how to use the following methods:alpha, rotationY, scaleX, scaleY, setDuration
-3
CodeRank
This code example shows how to use the following methods:alpha, rotationY, scaleX, scaleY, setDuration
-3
CodeRank
This code example shows how to use the following methods:alpha, rotationY, scaleX, scaleY, setDuration
-3
CodeRank

Related ViewPropertyAnimator alpha Questions & Answers:

alpha Method Overview
This method will cause the View's alpha property to be animated to the specified value.
See Code Examples for other Android ViewPropertyAnimator Methods: