org.chromium.chrome.browser.widget.animation.AnimatorProperties Java Examples
The following examples show how to use
org.chromium.chrome.browser.widget.animation.AnimatorProperties.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: PaymentRequestUI.java From delion with Apache License 2.0 | 6 votes |
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(); }
Example #2
Source File: LocationBarLayout.java From delion with Apache License 2.0 | 6 votes |
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); }
Example #3
Source File: PaymentRequestUI.java From AndroidChromium with Apache License 2.0 | 6 votes |
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(); }
Example #4
Source File: LocationBarLayout.java From AndroidChromium with Apache License 2.0 | 6 votes |
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); }
Example #5
Source File: PaymentRequestUI.java From 365browser with Apache License 2.0 | 6 votes |
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(); }
Example #6
Source File: PaymentRequestUI.java From delion with Apache License 2.0 | 5 votes |
@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(); }
Example #7
Source File: LocationBarLayout.java From delion with Apache License 2.0 | 5 votes |
/** * 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); }
Example #8
Source File: PaymentRequestUI.java From AndroidChromium with Apache License 2.0 | 5 votes |
@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(); }
Example #9
Source File: LocationBarLayout.java From AndroidChromium with Apache License 2.0 | 5 votes |
/** * 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); }
Example #10
Source File: PaymentRequestUI.java From 365browser with Apache License 2.0 | 5 votes |
@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(); }