本文整理汇总了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();
}