本文整理匯總了Java中org.chromium.chrome.browser.widget.animation.AnimatorProperties類的典型用法代碼示例。如果您正苦於以下問題:Java AnimatorProperties類的具體用法?Java AnimatorProperties怎麽用?Java AnimatorProperties使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
AnimatorProperties類屬於org.chromium.chrome.browser.widget.animation包,在下文中一共展示了AnimatorProperties類的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: DisappearingAnimator
import org.chromium.chrome.browser.widget.animation.AnimatorProperties; //導入依賴的package包/類
public DisappearingAnimator(boolean removeDialog) {
mIsDialogClosing = removeDialog;
Animator sheetFader = ObjectAnimator.ofFloat(
mRequestView, View.ALPHA, mRequestView.getAlpha(), 0f);
Animator sheetTranslator = ObjectAnimator.ofFloat(
mRequestView, View.TRANSLATION_Y, 0f, mAnimatorTranslation);
AnimatorSet current = new AnimatorSet();
current.setDuration(DIALOG_EXIT_ANIMATION_MS);
current.setInterpolator(new FastOutLinearInInterpolator());
if (mIsDialogClosing) {
Animator scrimFader = ObjectAnimator.ofInt(mFullContainer.getBackground(),
AnimatorProperties.DRAWABLE_ALPHA_PROPERTY, 127, 0);
current.playTogether(sheetFader, sheetTranslator, scrimFader);
} else {
current.playTogether(sheetFader, sheetTranslator);
}
mSheetAnimator = current;
mSheetAnimator.addListener(this);
mSheetAnimator.start();
}
示例2: fadeOutOmniboxResultsContainerBackground
import org.chromium.chrome.browser.widget.animation.AnimatorProperties; //導入依賴的package包/類
private void fadeOutOmniboxResultsContainerBackground() {
if (mFadeOutOmniboxBackgroundAnimator == null) {
mFadeOutOmniboxBackgroundAnimator = ObjectAnimator.ofInt(
getRootView().findViewById(R.id.omnibox_results_container).getBackground(),
AnimatorProperties.DRAWABLE_ALPHA_PROPERTY, 255, 0);
mFadeOutOmniboxBackgroundAnimator.setDuration(OMNIBOX_CONTAINER_BACKGROUND_FADE_MS);
mFadeOutOmniboxBackgroundAnimator.setInterpolator(
BakedBezierInterpolator.FADE_OUT_CURVE);
mFadeOutOmniboxBackgroundAnimator.addListener(new CancelAwareAnimatorListener() {
@Override
public void onEnd(Animator animator) {
updateOmniboxResultsContainerVisibility(false);
}
});
}
runOmniboxResultsFadeAnimation(mFadeOutOmniboxBackgroundAnimator);
}
示例3: onLayoutChange
import org.chromium.chrome.browser.widget.animation.AnimatorProperties; //導入依賴的package包/類
@Override
public void onLayoutChange(View v, int left, int top, int right, int bottom,
int oldLeft, int oldTop, int oldRight, int oldBottom) {
mRequestView.removeOnLayoutChangeListener(this);
Animator scrimFader = ObjectAnimator.ofInt(mFullContainer.getBackground(),
AnimatorProperties.DRAWABLE_ALPHA_PROPERTY, 0, 127);
Animator alphaAnimator = ObjectAnimator.ofFloat(mFullContainer, View.ALPHA, 0f, 1f);
AnimatorSet alphaSet = new AnimatorSet();
alphaSet.playTogether(scrimFader, alphaAnimator);
alphaSet.setDuration(DIALOG_ENTER_ANIMATION_MS);
alphaSet.setInterpolator(new LinearOutSlowInInterpolator());
alphaSet.start();
}
示例4: fadeInOmniboxResultsContainerBackground
import org.chromium.chrome.browser.widget.animation.AnimatorProperties; //導入依賴的package包/類
/**
* Trigger a fade in of the omnibox results background.
*/
protected void fadeInOmniboxResultsContainerBackground() {
if (mFadeInOmniboxBackgroundAnimator == null) {
mFadeInOmniboxBackgroundAnimator = ObjectAnimator.ofInt(
getRootView().findViewById(R.id.omnibox_results_container).getBackground(),
AnimatorProperties.DRAWABLE_ALPHA_PROPERTY, 0, 255);
mFadeInOmniboxBackgroundAnimator.setDuration(OMNIBOX_CONTAINER_BACKGROUND_FADE_MS);
mFadeInOmniboxBackgroundAnimator.setInterpolator(
BakedBezierInterpolator.FADE_IN_CURVE);
}
runOmniboxResultsFadeAnimation(mFadeInOmniboxBackgroundAnimator);
}
示例5: setIsIncognito
import org.chromium.chrome.browser.widget.animation.AnimatorProperties; //導入依賴的package包/類
/**
* Updates the visual state based on whether incognito or normal tabs are being created.
* @param incognito Whether the button is now used for creating incognito tabs.
*/
public void setIsIncognito(boolean incognito) {
if (mIsIncognito == incognito) return;
mIsIncognito = incognito;
if (mTransitionAnimation != null) {
mTransitionAnimation.cancel();
mTransitionAnimation = null;
}
Drawable fadeOutDrawable = incognito ? mNormalDrawable : mIncognitoDrawable;
Drawable fadeInDrawable = incognito ? mIncognitoDrawable : mNormalDrawable;
if (getVisibility() != VISIBLE) {
fadeOutDrawable.setAlpha(0);
fadeInDrawable.setAlpha(255);
return;
}
List<Animator> animations = new ArrayList<Animator>();
Animator animation = ObjectAnimator.ofInt(
fadeOutDrawable, AnimatorProperties.DRAWABLE_ALPHA_PROPERTY, 255, 0);
animation.setDuration(100);
animations.add(animation);
animation = ObjectAnimator.ofInt(
fadeInDrawable, AnimatorProperties.DRAWABLE_ALPHA_PROPERTY, 0, 255);
animation.setStartDelay(150);
animation.setDuration(100);
animations.add(animation);
mTransitionAnimation = new AnimatorSet();
mTransitionAnimation.playTogether(animations);
mTransitionAnimation.start();
}
示例6: onLayoutChange
import org.chromium.chrome.browser.widget.animation.AnimatorProperties; //導入依賴的package包/類
@Override
public void onLayoutChange(View v, int left, int top, int right, int bottom,
int oldLeft, int oldTop, int oldRight, int oldBottom) {
mRequestView.removeOnLayoutChangeListener(this);
Animator scrimFader = ObjectAnimator.ofInt(mFullContainer.getBackground(),
AnimatorProperties.DRAWABLE_ALPHA_PROPERTY, 0, 255);
Animator alphaAnimator = ObjectAnimator.ofFloat(mFullContainer, View.ALPHA, 0f, 1f);
AnimatorSet alphaSet = new AnimatorSet();
alphaSet.playTogether(scrimFader, alphaAnimator);
alphaSet.setDuration(DIALOG_ENTER_ANIMATION_MS);
alphaSet.setInterpolator(new LinearOutSlowInInterpolator());
alphaSet.start();
}