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


Java AnimatorProperties類代碼示例

本文整理匯總了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();
}
 
開發者ID:rkshuai,項目名稱:chromium-for-android-56-debug-video,代碼行數:24,代碼來源:PaymentRequestUI.java

示例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);
}
 
開發者ID:rkshuai,項目名稱:chromium-for-android-56-debug-video,代碼行數:18,代碼來源:LocationBarLayout.java

示例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();
}
 
開發者ID:rkshuai,項目名稱:chromium-for-android-56-debug-video,代碼行數:16,代碼來源:PaymentRequestUI.java

示例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);
}
 
開發者ID:rkshuai,項目名稱:chromium-for-android-56-debug-video,代碼行數:15,代碼來源:LocationBarLayout.java

示例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();
}
 
開發者ID:JackyAndroid,項目名稱:AndroidChromium,代碼行數:39,代碼來源:NewTabButton.java

示例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();
}
 
開發者ID:mogoweb,項目名稱:365browser,代碼行數:16,代碼來源:PaymentRequestUI.java


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