當前位置: 首頁>>代碼示例>>Java>>正文


Java SupportAnimator類代碼示例

本文整理匯總了Java中io.codetail.animation.SupportAnimator的典型用法代碼示例。如果您正苦於以下問題:Java SupportAnimator類的具體用法?Java SupportAnimator怎麽用?Java SupportAnimator使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


SupportAnimator類屬於io.codetail.animation包,在下文中一共展示了SupportAnimator類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: revealOff

import io.codetail.animation.SupportAnimator; //導入依賴的package包/類
@Override
final void revealOff(final View fab, final View transformView, final RevealCallback callback) {
    SupportAnimator animator = ViewAnimationUtils.createCircularReveal(
            transformView,
            getCenterX(fab),
            getCenterY(fab),
            (float) Math.hypot(transformView.getWidth(), transformView.getHeight()) / 2,
            fab.getWidth() / 2);
    animator.setInterpolator(REVEAL_INTERPOLATOR);
    animator.addListener(new SupportAnimator.AnimatorListener() {
        @Override
        public void onAnimationStart() {
            callback.onRevealStart();
        }

        @Override
        public void onAnimationEnd() {
            transformView.setVisibility(View.INVISIBLE);
            callback.onRevealEnd();
        }

        @Override
        public void onAnimationCancel() {
            //
        }

        @Override
        public void onAnimationRepeat() {
            //
        }
    });
    if (transformView.getVisibility() == View.VISIBLE) {
        animator.setDuration((int) getRevealAnimationDuration());
        animator.start();
        transformView.setEnabled(true);
    }
}
 
開發者ID:SimonCherryGZ,項目名稱:JewelryUI,代碼行數:38,代碼來源:FabAnimatorPreL.java

示例2: animateBg

import io.codetail.animation.SupportAnimator; //導入依賴的package包/類
public void animateBg() {
    mImage.setVisibility(INVISIBLE);

    int cx = mImage.getWidth();
    int cy = mImage.getHeight();

    SupportAnimator animator = ViewAnimationUtils.createCircularReveal(mImage, cx, cy, 0, Math.max(cx, cy));
    animator.addListener(new SupportAnimator.SimpleAnimatorListener() {
        @Override
        public void onAnimationStart() {
            super.onAnimationStart();
            mImage.setVisibility(VISIBLE);
        }
    });
    animator.setStartDelay(500);
    animator.start();
}
 
開發者ID:morogoku,項目名稱:MTweaks-KernelAdiutorMOD,代碼行數:18,代碼來源:NavHeaderView.java

示例3: onPostExecute

import io.codetail.animation.SupportAnimator; //導入依賴的package包/類
protected void onPostExecute(Void voi) {
	SupportAnimator.AnimatorListener animator = new SupportAnimator.AnimatorListener() {
		@Override
		public void onAnimationEnd() {
			navigateToNextActivity();
		}

		@Override
		public void onAnimationStart() {}
		@Override
		public void onAnimationCancel() {}
		@Override
		public void onAnimationRepeat() {}
	};

	if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT && !mTransitionViewWhite.isAttachedToWindow()) {
		animator.onAnimationEnd();
		return;
	}

	showTransitionAnimation().addListener(animator);
}
 
開發者ID:SebastianRask,項目名稱:Pocket-Plays-for-Twitch,代碼行數:23,代碼來源:ConfirmSetupActivity.java

示例4: quitWithAnimation

import io.codetail.animation.SupportAnimator; //導入依賴的package包/類
private void quitWithAnimation() {
	SupportAnimator animator = revealTransition.reverse();
	if (animator == null) {
		super.onBackPressed();
		return;
	}
	animator.setDuration(1000);
	animator.addListener(new SupportAnimator.AnimatorListener() {
		@Override
		public void onAnimationStart() {}

		@Override
		public void onAnimationEnd() {
			mainContentLayout.setVisibility(View.INVISIBLE);
			finish();
		}

		@Override
		public void onAnimationCancel() {}

		@Override
		public void onAnimationRepeat() {}
	});
	animator.start();
}
 
開發者ID:SebastianRask,項目名稱:Pocket-Plays-for-Twitch,代碼行數:26,代碼來源:DonationActivity.java

示例5: playInitAnimation

import io.codetail.animation.SupportAnimator; //導入依賴的package包/類
private void playInitAnimation() {
	DisplayMetrics dm = getResources().getDisplayMetrics();
	// Get the center for the FAB
	int cx = dm.widthPixels / 2;
	int cy = 0;

	float finalRadius = dm.heightPixels;

	revealTransition = ViewAnimationUtils.createCircularReveal(mainContentLayout, cx, cy, 0, finalRadius);
	revealTransition.setInterpolator(new AccelerateDecelerateInterpolator());
	revealTransition.setDuration(800);
	revealTransition.addListener(new SupportAnimator.AnimatorListener() {
		@Override
		public void onAnimationStart() {
			mainContentLayout.setVisibility(View.VISIBLE);
		}
		public void onAnimationEnd() {}
		public void onAnimationCancel() {}
		public void onAnimationRepeat() {}
	});
	revealTransition.start();
}
 
開發者ID:SebastianRask,項目名稱:Pocket-Plays-for-Twitch,代碼行數:23,代碼來源:DonationActivity.java

示例6: circularDismissView

import io.codetail.animation.SupportAnimator; //導入依賴的package包/類
private void circularDismissView(final View view) {
	final int DURATION = 600;

	// Get the center for the FAB
	int cx = (int) view.getX() + view.getMeasuredHeight() / 2;
	int cy = (int) view.getY() + view.getMeasuredWidth() / 2;

	// get the final radius for the clipping circle
	int dx = Math.max(cx, view.getWidth() - cx);
	int dy = Math.max(cy, view.getHeight() - cy);
	float finalRadius = (float) Math.hypot(dx, dy);

	final SupportAnimator dismissAnimation = ViewAnimationUtils.createCircularReveal(view, cx, cy, 0, finalRadius).reverse();
	dismissAnimation.setInterpolator(new AccelerateDecelerateInterpolator());
	dismissAnimation.setDuration(DURATION);
	dismissAnimation.start();
	new Handler().postDelayed(new Runnable() {
		@Override
		public void run() {
			mSuperContainer.setVisibility(View.GONE);
		}
	}, DURATION);
}
 
開發者ID:SebastianRask,項目名稱:Pocket-Plays-for-Twitch,代碼行數:24,代碼來源:UpdateDialogHandler.java

示例7: setActivityToolbarCircularRevealAnimation

import io.codetail.animation.SupportAnimator; //導入依賴的package包/類
public static void setActivityToolbarCircularRevealAnimation(final Toolbar aDecorativeToolbar) {
	aDecorativeToolbar.addOnLayoutChangeListener(new View.OnLayoutChangeListener() {
		@Override
		public void onLayoutChange(View v, int left, int top, int right, int bottom, int oldLeft, int oldTop, int oldRight, int oldBottom) {
			v.removeOnLayoutChangeListener(this);

			int CIRCULAR_REVEAL_DURATION = 700;
			int cx = (aDecorativeToolbar.getLeft() + aDecorativeToolbar.getRight()) / 2;
			int cy = 0;

			// get the final radius for the clipping circle
			int finalRadius = Math.max(aDecorativeToolbar.getWidth(), aDecorativeToolbar.getHeight());

			SupportAnimator animator = ViewAnimationUtils.createCircularReveal(aDecorativeToolbar, cx, cy, 0, finalRadius);

			animator.setInterpolator(new AccelerateDecelerateInterpolator());
			animator.setDuration(CIRCULAR_REVEAL_DURATION);
			animator.start();
		}
	});
}
 
開發者ID:SebastianRask,項目名稱:Pocket-Plays-for-Twitch,代碼行數:22,代碼來源:AnimationService.java

示例8: enterReveal

import io.codetail.animation.SupportAnimator; //導入依賴的package包/類
void enterReveal(String type) {
    fab.setVisibility(View.GONE);
    final View myView = findViewById(R.id.reveal);
    int finalRadius = Math.max(myView.getWidth(), myView.getHeight());
    SupportAnimator anim =
            ViewAnimationUtils.createCircularReveal(myView, cx, cy, 0, finalRadius);
    if (type.equals("Reply")) {
        myView.setVisibility(View.VISIBLE);
        myView.findViewById(R.id.section_reply).setVisibility(View.VISIBLE);
        myView.findViewById(R.id.section_internal_note).setVisibility(View.GONE);
        overlay.setVisibility(View.VISIBLE);
    } else {
        myView.setVisibility(View.VISIBLE);
        myView.findViewById(R.id.section_reply).setVisibility(View.GONE);
        myView.findViewById(R.id.section_internal_note).setVisibility(View.VISIBLE);
        overlay.setVisibility(View.VISIBLE);
    }

    anim.start();
}
 
開發者ID:ladybirdweb,項目名稱:faveo-helpdesk-android-app,代碼行數:21,代碼來源:TicketDetailActivity.java

示例9: createReverseReveal

import io.codetail.animation.SupportAnimator; //導入依賴的package包/類
private void createReverseReveal() {
    SupportAnimator reverseMenuAnimator = mMenuAnimator.reverse();
    mMenuAnimator = null;
    reverseMenuAnimator.setDuration(700);
    reverseMenuAnimator.addListener(new SupportAnimator.AnimatorListener() {
        @Override
        public void onAnimationStart() {
            translateFabToBottom();
        }

        @Override
        public void onAnimationEnd() {
            mMenu.setVisibility(View.GONE);
        }

        @Override
        public void onAnimationCancel() {
        }

        @Override
        public void onAnimationRepeat() {
        }
    });
    reverseMenuAnimator.start();
}
 
開發者ID:lukamarin,項目名稱:Rocket.Chat-android,代碼行數:26,代碼來源:FabMenuLayout.java

示例10: createReveal

import io.codetail.animation.SupportAnimator; //導入依賴的package包/類
private void createReveal(int cx, int cy, float initialRadius, float finalRadius) {
    mMenuAnimator = ViewAnimationUtils.createCircularReveal(mMenu, cx, cy, initialRadius, finalRadius);
    mMenuAnimator.setInterpolator(new AccelerateDecelerateInterpolator());
    mMenuAnimator.setDuration(500);
    mMenuAnimator.addListener(new SupportAnimator.AnimatorListener() {
        @Override
        public void onAnimationStart() {
            mMenu.setVisibility(View.VISIBLE);
        }

        @Override
        public void onAnimationEnd() {
        }

        @Override
        public void onAnimationCancel() {
        }

        @Override
        public void onAnimationRepeat() {
        }
    });
    mMenuAnimator.start();
}
 
開發者ID:lukamarin,項目名稱:Rocket.Chat-android,代碼行數:25,代碼來源:FabMenuLayout.java

示例11: appearBluePair

import io.codetail.animation.SupportAnimator; //導入依賴的package包/類
void appearBluePair() {
    mBluePair.setVisibility(View.VISIBLE);

    float finalRadius = Math.max(mBluePair.getWidth(), mBluePair.getHeight()) * 1.5f;

    SupportAnimator animator = ViewAnimationUtils.createCircularReveal(mBluePair, endBlueX, endBlueY, mBlue.getWidth() / 2f,
            finalRadius);
    animator.setDuration(500);
    animator.setInterpolator(ACCELERATE);
    animator.addListener(new SimpleListener() {
        @Override
        public void onAnimationEnd() {
            raise();
        }
    });
    animator.start();
}
 
開發者ID:Haoxiqiang,項目名稱:MaterialCalendar,代碼行數:18,代碼來源:MemoFragment.java

示例12: appearRed

import io.codetail.animation.SupportAnimator; //導入依賴的package包/類
void appearRed() {
    mRed.setVisibility(View.VISIBLE);

    int cx = mRed.getWidth() / 2;
    int cy = mRed.getHeight() / 2;

    SupportAnimator animator = ViewAnimationUtils.createCircularReveal(mRed, cx, cy, 0, mRed.getWidth() / 2);
    animator.addListener(new SimpleListener() {
        @Override
        public void onAnimationEnd() {
            upRed();
        }
    });
    animator.setInterpolator(ACCELERATE);
    animator.start();
}
 
開發者ID:Haoxiqiang,項目名稱:MaterialCalendar,代碼行數:17,代碼來源:MemoFragment.java

示例13: disappearRed

import io.codetail.animation.SupportAnimator; //導入依賴的package包/類
void disappearRed() {

        int cx = mRed.getWidth() / 2;
        int cy = mRed.getHeight() / 2;

        SupportAnimator animator = ViewAnimationUtils.createCircularReveal(mRed, cx, cy, mRed.getWidth() / 2, 0);
        animator.addListener(new SimpleListener() {
            @Override
            public void onAnimationEnd() {
                mRed.setVisibility(View.INVISIBLE);
                ViewHelper.setX(mRed, startRedX);
                ViewHelper.setY(mRed, startRedY);
                release();
            }
        });
        animator.setInterpolator(DECELERATE);
        animator.start();
    }
 
開發者ID:Haoxiqiang,項目名稱:MaterialCalendar,代碼行數:19,代碼來源:MemoFragment.java

示例14: disappearBluePair

import io.codetail.animation.SupportAnimator; //導入依賴的package包/類
void disappearBluePair() {
    float finalRadius = Math.max(mBluePair.getWidth(), mBluePair.getHeight()) * 1.5f;

    SupportAnimator animator = ViewAnimationUtils.createCircularReveal(mBluePair, endBlueX, endBlueY,
            finalRadius, mBlue.getWidth() / 2f);
    animator.setDuration(500);
    animator.addListener(new SimpleListener() {
        @Override
        public void onAnimationEnd() {
            mBluePair.setVisibility(View.INVISIBLE);
            returnBlue();
        }
    });
    animator.setInterpolator(DECELERATE);
    animator.start();
}
 
開發者ID:Haoxiqiang,項目名稱:MaterialCalendar,代碼行數:17,代碼來源:MemoFragment.java

示例15: disappearRed

import io.codetail.animation.SupportAnimator; //導入依賴的package包/類
void disappearRed() {

        int cx = mRed.getWidth() / 2;
        int cy = mRed.getHeight() / 2;

        SupportAnimator animator = ViewAnimationUtils.createCircularReveal(mRed, cx, cy, mRed.getWidth() / 2, 0);
        animator.addListener(new SimpleListener() {
            @Override
            public void onAnimationEnd() {
                mRed.setVisibility(View.INVISIBLE);
                mRed.setX(startRedX);
                mRed.setY(startRedY);
                release();
            }
        });
        animator.setInterpolator(DECELERATE);
        animator.start();
    }
 
開發者ID:asyl,項目名稱:ArcAnimator,代碼行數:19,代碼來源:TransitionLoopFragment.java


注:本文中的io.codetail.animation.SupportAnimator類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。