Search in sources :

Example 76 with ScaleAnimation

use of android.view.animation.ScaleAnimation in project platform_frameworks_base by android.

the class AppTransition method createAspectScaledThumbnailEnterExitAnimationLocked.

/**
     * This alternate animation is created when we are doing a thumbnail transition, for the
     * activity that is leaving, and the activity that is entering.
     */
Animation createAspectScaledThumbnailEnterExitAnimationLocked(int thumbTransitState, int uiMode, int orientation, int transit, Rect containingFrame, Rect contentInsets, @Nullable Rect surfaceInsets, boolean freeform, int taskId) {
    Animation a;
    final int appWidth = containingFrame.width();
    final int appHeight = containingFrame.height();
    getDefaultNextAppTransitionStartRect(mTmpRect);
    final int thumbWidthI = mTmpRect.width();
    final float thumbWidth = thumbWidthI > 0 ? thumbWidthI : 1;
    final int thumbHeightI = mTmpRect.height();
    final float thumbHeight = thumbHeightI > 0 ? thumbHeightI : 1;
    final int thumbStartX = mTmpRect.left - containingFrame.left - contentInsets.left;
    final int thumbStartY = mTmpRect.top - containingFrame.top;
    switch(thumbTransitState) {
        case THUMBNAIL_TRANSITION_ENTER_SCALE_UP:
        case THUMBNAIL_TRANSITION_EXIT_SCALE_DOWN:
            {
                final boolean scaleUp = thumbTransitState == THUMBNAIL_TRANSITION_ENTER_SCALE_UP;
                if (freeform && scaleUp) {
                    a = createAspectScaledThumbnailEnterFreeformAnimationLocked(containingFrame, surfaceInsets, taskId);
                } else if (freeform) {
                    a = createAspectScaledThumbnailExitFreeformAnimationLocked(containingFrame, surfaceInsets, taskId);
                } else {
                    AnimationSet set = new AnimationSet(true);
                    // In portrait, we scale to fit the width
                    mTmpFromClipRect.set(containingFrame);
                    mTmpToClipRect.set(containingFrame);
                    // Containing frame is in screen space, but we need the clip rect in the
                    // app space.
                    mTmpFromClipRect.offsetTo(0, 0);
                    mTmpToClipRect.offsetTo(0, 0);
                    // Exclude insets region from the source clip.
                    mTmpFromClipRect.inset(contentInsets);
                    mNextAppTransitionInsets.set(contentInsets);
                    if (isTvUiMode(uiMode) || orientation == Configuration.ORIENTATION_PORTRAIT) {
                        // We scale the width and clip to the top/left square
                        float scale = thumbWidth / (appWidth - contentInsets.left - contentInsets.right);
                        int unscaledThumbHeight = (int) (thumbHeight / scale);
                        mTmpFromClipRect.bottom = mTmpFromClipRect.top + unscaledThumbHeight;
                        mNextAppTransitionInsets.set(contentInsets);
                        Animation scaleAnim = new ScaleAnimation(scaleUp ? scale : 1, scaleUp ? 1 : scale, scaleUp ? scale : 1, scaleUp ? 1 : scale, containingFrame.width() / 2f, containingFrame.height() / 2f + contentInsets.top);
                        final float targetX = (mTmpRect.left - containingFrame.left);
                        final float x = containingFrame.width() / 2f - containingFrame.width() / 2f * scale;
                        final float targetY = (mTmpRect.top - containingFrame.top);
                        final float y = containingFrame.height() / 2f - containingFrame.height() / 2f * scale;
                        final float startX = targetX - x;
                        final float startY = targetY - y;
                        Animation clipAnim = scaleUp ? new ClipRectAnimation(mTmpFromClipRect, mTmpToClipRect) : new ClipRectAnimation(mTmpToClipRect, mTmpFromClipRect);
                        Animation translateAnim = scaleUp ? createCurvedMotion(startX, 0, startY - contentInsets.top, 0) : createCurvedMotion(0, startX, 0, startY - contentInsets.top);
                        set.addAnimation(clipAnim);
                        set.addAnimation(scaleAnim);
                        set.addAnimation(translateAnim);
                    } else {
                        // In landscape, we don't scale at all and only crop
                        mTmpFromClipRect.bottom = mTmpFromClipRect.top + thumbHeightI;
                        mTmpFromClipRect.right = mTmpFromClipRect.left + thumbWidthI;
                        Animation clipAnim = scaleUp ? new ClipRectAnimation(mTmpFromClipRect, mTmpToClipRect) : new ClipRectAnimation(mTmpToClipRect, mTmpFromClipRect);
                        Animation translateAnim = scaleUp ? createCurvedMotion(thumbStartX, 0, thumbStartY - contentInsets.top, 0) : createCurvedMotion(0, thumbStartX, 0, thumbStartY - contentInsets.top);
                        set.addAnimation(clipAnim);
                        set.addAnimation(translateAnim);
                    }
                    a = set;
                    a.setZAdjustment(Animation.ZORDER_TOP);
                }
                break;
            }
        case THUMBNAIL_TRANSITION_EXIT_SCALE_UP:
            {
                // Previous app window during the scale up
                if (transit == TRANSIT_WALLPAPER_INTRA_OPEN) {
                    // Fade out the source activity if we are animating to a wallpaper
                    // activity.
                    a = new AlphaAnimation(1, 0);
                } else {
                    a = new AlphaAnimation(1, 1);
                }
                break;
            }
        case THUMBNAIL_TRANSITION_ENTER_SCALE_DOWN:
            {
                // Target app window during the scale down
                if (transit == TRANSIT_WALLPAPER_INTRA_OPEN) {
                    // Fade in the destination activity if we are animating from a wallpaper
                    // activity.
                    a = new AlphaAnimation(0, 1);
                } else {
                    a = new AlphaAnimation(1, 1);
                }
                break;
            }
        default:
            throw new RuntimeException("Invalid thumbnail transition state");
    }
    return prepareThumbnailAnimationWithDuration(a, appWidth, appHeight, getAspectScaleDuration(), getAspectScaleInterpolator());
}
Also used : ScaleAnimation(android.view.animation.ScaleAnimation) WindowAnimation_wallpaperCloseExitAnimation(com.android.internal.R.styleable.WindowAnimation_wallpaperCloseExitAnimation) CurvedTranslateAnimation(com.android.server.wm.animation.CurvedTranslateAnimation) WindowAnimation_activityOpenEnterAnimation(com.android.internal.R.styleable.WindowAnimation_activityOpenEnterAnimation) WindowAnimation_wallpaperOpenExitAnimation(com.android.internal.R.styleable.WindowAnimation_wallpaperOpenExitAnimation) WindowAnimation_taskToBackEnterAnimation(com.android.internal.R.styleable.WindowAnimation_taskToBackEnterAnimation) WindowAnimation_activityOpenExitAnimation(com.android.internal.R.styleable.WindowAnimation_activityOpenExitAnimation) TranslateAnimation(android.view.animation.TranslateAnimation) Animation(android.view.animation.Animation) ClipRectAnimation(android.view.animation.ClipRectAnimation) WindowAnimation_wallpaperOpenEnterAnimation(com.android.internal.R.styleable.WindowAnimation_wallpaperOpenEnterAnimation) WindowAnimation_launchTaskBehindTargetAnimation(com.android.internal.R.styleable.WindowAnimation_launchTaskBehindTargetAnimation) WindowAnimation_launchTaskBehindSourceAnimation(com.android.internal.R.styleable.WindowAnimation_launchTaskBehindSourceAnimation) WindowAnimation_taskCloseExitAnimation(com.android.internal.R.styleable.WindowAnimation_taskCloseExitAnimation) AlphaAnimation(android.view.animation.AlphaAnimation) WindowAnimation_wallpaperIntraCloseEnterAnimation(com.android.internal.R.styleable.WindowAnimation_wallpaperIntraCloseEnterAnimation) WindowAnimation_taskToBackExitAnimation(com.android.internal.R.styleable.WindowAnimation_taskToBackExitAnimation) WindowAnimation_activityCloseEnterAnimation(com.android.internal.R.styleable.WindowAnimation_activityCloseEnterAnimation) WindowAnimation_taskCloseEnterAnimation(com.android.internal.R.styleable.WindowAnimation_taskCloseEnterAnimation) WindowAnimation_taskOpenEnterAnimation(com.android.internal.R.styleable.WindowAnimation_taskOpenEnterAnimation) WindowAnimation_wallpaperIntraCloseExitAnimation(com.android.internal.R.styleable.WindowAnimation_wallpaperIntraCloseExitAnimation) ClipRectTBAnimation(com.android.server.wm.animation.ClipRectTBAnimation) WindowAnimation_taskOpenExitAnimation(com.android.internal.R.styleable.WindowAnimation_taskOpenExitAnimation) ClipRectLRAnimation(com.android.server.wm.animation.ClipRectLRAnimation) WindowAnimation_activityCloseExitAnimation(com.android.internal.R.styleable.WindowAnimation_activityCloseExitAnimation) WindowAnimation_taskToFrontEnterAnimation(com.android.internal.R.styleable.WindowAnimation_taskToFrontEnterAnimation) WindowAnimation_wallpaperIntraOpenEnterAnimation(com.android.internal.R.styleable.WindowAnimation_wallpaperIntraOpenEnterAnimation) WindowAnimation_wallpaperIntraOpenExitAnimation(com.android.internal.R.styleable.WindowAnimation_wallpaperIntraOpenExitAnimation) WindowAnimation_taskToFrontExitAnimation(com.android.internal.R.styleable.WindowAnimation_taskToFrontExitAnimation) WindowAnimation_wallpaperCloseEnterAnimation(com.android.internal.R.styleable.WindowAnimation_wallpaperCloseEnterAnimation) ClipRectAnimation(android.view.animation.ClipRectAnimation) AnimationSet(android.view.animation.AnimationSet) AlphaAnimation(android.view.animation.AlphaAnimation) ScaleAnimation(android.view.animation.ScaleAnimation)

Example 77 with ScaleAnimation

use of android.view.animation.ScaleAnimation in project platform_frameworks_base by android.

the class AppTransition method createThumbnailScaleAnimationLocked.

/**
     * This animation runs for the thumbnail that gets cross faded with the enter/exit activity
     * when a thumbnail is specified with the pending animation override.
     */
Animation createThumbnailScaleAnimationLocked(int appWidth, int appHeight, int transit, Bitmap thumbnailHeader) {
    Animation a;
    getDefaultNextAppTransitionStartRect(mTmpRect);
    final int thumbWidthI = thumbnailHeader.getWidth();
    final float thumbWidth = thumbWidthI > 0 ? thumbWidthI : 1;
    final int thumbHeightI = thumbnailHeader.getHeight();
    final float thumbHeight = thumbHeightI > 0 ? thumbHeightI : 1;
    if (mNextAppTransitionScaleUp) {
        // Animation for the thumbnail zooming from its initial size to the full screen
        float scaleW = appWidth / thumbWidth;
        float scaleH = appHeight / thumbHeight;
        Animation scale = new ScaleAnimation(1, scaleW, 1, scaleH, computePivot(mTmpRect.left, 1 / scaleW), computePivot(mTmpRect.top, 1 / scaleH));
        scale.setInterpolator(mDecelerateInterpolator);
        Animation alpha = new AlphaAnimation(1, 0);
        alpha.setInterpolator(mThumbnailFadeOutInterpolator);
        // This AnimationSet uses the Interpolators assigned above.
        AnimationSet set = new AnimationSet(false);
        set.addAnimation(scale);
        set.addAnimation(alpha);
        a = set;
    } else {
        // Animation for the thumbnail zooming down from the full screen to its final size
        float scaleW = appWidth / thumbWidth;
        float scaleH = appHeight / thumbHeight;
        a = new ScaleAnimation(scaleW, 1, scaleH, 1, computePivot(mTmpRect.left, 1 / scaleW), computePivot(mTmpRect.top, 1 / scaleH));
    }
    return prepareThumbnailAnimation(a, appWidth, appHeight, transit);
}
Also used : ScaleAnimation(android.view.animation.ScaleAnimation) WindowAnimation_wallpaperCloseExitAnimation(com.android.internal.R.styleable.WindowAnimation_wallpaperCloseExitAnimation) CurvedTranslateAnimation(com.android.server.wm.animation.CurvedTranslateAnimation) WindowAnimation_activityOpenEnterAnimation(com.android.internal.R.styleable.WindowAnimation_activityOpenEnterAnimation) WindowAnimation_wallpaperOpenExitAnimation(com.android.internal.R.styleable.WindowAnimation_wallpaperOpenExitAnimation) WindowAnimation_taskToBackEnterAnimation(com.android.internal.R.styleable.WindowAnimation_taskToBackEnterAnimation) WindowAnimation_activityOpenExitAnimation(com.android.internal.R.styleable.WindowAnimation_activityOpenExitAnimation) TranslateAnimation(android.view.animation.TranslateAnimation) Animation(android.view.animation.Animation) ClipRectAnimation(android.view.animation.ClipRectAnimation) WindowAnimation_wallpaperOpenEnterAnimation(com.android.internal.R.styleable.WindowAnimation_wallpaperOpenEnterAnimation) WindowAnimation_launchTaskBehindTargetAnimation(com.android.internal.R.styleable.WindowAnimation_launchTaskBehindTargetAnimation) WindowAnimation_launchTaskBehindSourceAnimation(com.android.internal.R.styleable.WindowAnimation_launchTaskBehindSourceAnimation) WindowAnimation_taskCloseExitAnimation(com.android.internal.R.styleable.WindowAnimation_taskCloseExitAnimation) AlphaAnimation(android.view.animation.AlphaAnimation) WindowAnimation_wallpaperIntraCloseEnterAnimation(com.android.internal.R.styleable.WindowAnimation_wallpaperIntraCloseEnterAnimation) WindowAnimation_taskToBackExitAnimation(com.android.internal.R.styleable.WindowAnimation_taskToBackExitAnimation) WindowAnimation_activityCloseEnterAnimation(com.android.internal.R.styleable.WindowAnimation_activityCloseEnterAnimation) WindowAnimation_taskCloseEnterAnimation(com.android.internal.R.styleable.WindowAnimation_taskCloseEnterAnimation) WindowAnimation_taskOpenEnterAnimation(com.android.internal.R.styleable.WindowAnimation_taskOpenEnterAnimation) WindowAnimation_wallpaperIntraCloseExitAnimation(com.android.internal.R.styleable.WindowAnimation_wallpaperIntraCloseExitAnimation) ClipRectTBAnimation(com.android.server.wm.animation.ClipRectTBAnimation) WindowAnimation_taskOpenExitAnimation(com.android.internal.R.styleable.WindowAnimation_taskOpenExitAnimation) ClipRectLRAnimation(com.android.server.wm.animation.ClipRectLRAnimation) WindowAnimation_activityCloseExitAnimation(com.android.internal.R.styleable.WindowAnimation_activityCloseExitAnimation) WindowAnimation_taskToFrontEnterAnimation(com.android.internal.R.styleable.WindowAnimation_taskToFrontEnterAnimation) WindowAnimation_wallpaperIntraOpenEnterAnimation(com.android.internal.R.styleable.WindowAnimation_wallpaperIntraOpenEnterAnimation) WindowAnimation_wallpaperIntraOpenExitAnimation(com.android.internal.R.styleable.WindowAnimation_wallpaperIntraOpenExitAnimation) WindowAnimation_taskToFrontExitAnimation(com.android.internal.R.styleable.WindowAnimation_taskToFrontExitAnimation) WindowAnimation_wallpaperCloseEnterAnimation(com.android.internal.R.styleable.WindowAnimation_wallpaperCloseEnterAnimation) AnimationSet(android.view.animation.AnimationSet) AlphaAnimation(android.view.animation.AlphaAnimation) ScaleAnimation(android.view.animation.ScaleAnimation)

Example 78 with ScaleAnimation

use of android.view.animation.ScaleAnimation in project platform_frameworks_base by android.

the class AppTransition method createScaleUpAnimationLocked.

private Animation createScaleUpAnimationLocked(int transit, boolean enter, Rect containingFrame) {
    Animation a;
    getDefaultNextAppTransitionStartRect(mTmpRect);
    final int appWidth = containingFrame.width();
    final int appHeight = containingFrame.height();
    if (enter) {
        // Entering app zooms out from the center of the initial rect.
        float scaleW = mTmpRect.width() / (float) appWidth;
        float scaleH = mTmpRect.height() / (float) appHeight;
        Animation scale = new ScaleAnimation(scaleW, 1, scaleH, 1, computePivot(mTmpRect.left, scaleW), computePivot(mTmpRect.top, scaleH));
        scale.setInterpolator(mDecelerateInterpolator);
        Animation alpha = new AlphaAnimation(0, 1);
        alpha.setInterpolator(mThumbnailFadeOutInterpolator);
        AnimationSet set = new AnimationSet(false);
        set.addAnimation(scale);
        set.addAnimation(alpha);
        set.setDetachWallpaper(true);
        a = set;
    } else if (transit == TRANSIT_WALLPAPER_INTRA_OPEN || transit == TRANSIT_WALLPAPER_INTRA_CLOSE) {
        // If we are on top of the wallpaper, we need an animation that
        // correctly handles the wallpaper staying static behind all of
        // the animated elements.  To do this, will just have the existing
        // element fade out.
        a = new AlphaAnimation(1, 0);
        a.setDetachWallpaper(true);
    } else {
        // For normal animations, the exiting element just holds in place.
        a = new AlphaAnimation(1, 1);
    }
    // Pick the desired duration.  If this is an inter-activity transition,
    // it  is the standard duration for that.  Otherwise we use the longer
    // task transition duration.
    final long duration;
    switch(transit) {
        case TRANSIT_ACTIVITY_OPEN:
        case TRANSIT_ACTIVITY_CLOSE:
            duration = mConfigShortAnimTime;
            break;
        default:
            duration = DEFAULT_APP_TRANSITION_DURATION;
            break;
    }
    a.setDuration(duration);
    a.setFillAfter(true);
    a.setInterpolator(mDecelerateInterpolator);
    a.initialize(appWidth, appHeight, appWidth, appHeight);
    return a;
}
Also used : ScaleAnimation(android.view.animation.ScaleAnimation) WindowAnimation_wallpaperCloseExitAnimation(com.android.internal.R.styleable.WindowAnimation_wallpaperCloseExitAnimation) CurvedTranslateAnimation(com.android.server.wm.animation.CurvedTranslateAnimation) WindowAnimation_activityOpenEnterAnimation(com.android.internal.R.styleable.WindowAnimation_activityOpenEnterAnimation) WindowAnimation_wallpaperOpenExitAnimation(com.android.internal.R.styleable.WindowAnimation_wallpaperOpenExitAnimation) WindowAnimation_taskToBackEnterAnimation(com.android.internal.R.styleable.WindowAnimation_taskToBackEnterAnimation) WindowAnimation_activityOpenExitAnimation(com.android.internal.R.styleable.WindowAnimation_activityOpenExitAnimation) TranslateAnimation(android.view.animation.TranslateAnimation) Animation(android.view.animation.Animation) ClipRectAnimation(android.view.animation.ClipRectAnimation) WindowAnimation_wallpaperOpenEnterAnimation(com.android.internal.R.styleable.WindowAnimation_wallpaperOpenEnterAnimation) WindowAnimation_launchTaskBehindTargetAnimation(com.android.internal.R.styleable.WindowAnimation_launchTaskBehindTargetAnimation) WindowAnimation_launchTaskBehindSourceAnimation(com.android.internal.R.styleable.WindowAnimation_launchTaskBehindSourceAnimation) WindowAnimation_taskCloseExitAnimation(com.android.internal.R.styleable.WindowAnimation_taskCloseExitAnimation) AlphaAnimation(android.view.animation.AlphaAnimation) WindowAnimation_wallpaperIntraCloseEnterAnimation(com.android.internal.R.styleable.WindowAnimation_wallpaperIntraCloseEnterAnimation) WindowAnimation_taskToBackExitAnimation(com.android.internal.R.styleable.WindowAnimation_taskToBackExitAnimation) WindowAnimation_activityCloseEnterAnimation(com.android.internal.R.styleable.WindowAnimation_activityCloseEnterAnimation) WindowAnimation_taskCloseEnterAnimation(com.android.internal.R.styleable.WindowAnimation_taskCloseEnterAnimation) WindowAnimation_taskOpenEnterAnimation(com.android.internal.R.styleable.WindowAnimation_taskOpenEnterAnimation) WindowAnimation_wallpaperIntraCloseExitAnimation(com.android.internal.R.styleable.WindowAnimation_wallpaperIntraCloseExitAnimation) ClipRectTBAnimation(com.android.server.wm.animation.ClipRectTBAnimation) WindowAnimation_taskOpenExitAnimation(com.android.internal.R.styleable.WindowAnimation_taskOpenExitAnimation) ClipRectLRAnimation(com.android.server.wm.animation.ClipRectLRAnimation) WindowAnimation_activityCloseExitAnimation(com.android.internal.R.styleable.WindowAnimation_activityCloseExitAnimation) WindowAnimation_taskToFrontEnterAnimation(com.android.internal.R.styleable.WindowAnimation_taskToFrontEnterAnimation) WindowAnimation_wallpaperIntraOpenEnterAnimation(com.android.internal.R.styleable.WindowAnimation_wallpaperIntraOpenEnterAnimation) WindowAnimation_wallpaperIntraOpenExitAnimation(com.android.internal.R.styleable.WindowAnimation_wallpaperIntraOpenExitAnimation) WindowAnimation_taskToFrontExitAnimation(com.android.internal.R.styleable.WindowAnimation_taskToFrontExitAnimation) WindowAnimation_wallpaperCloseEnterAnimation(com.android.internal.R.styleable.WindowAnimation_wallpaperCloseEnterAnimation) AnimationSet(android.view.animation.AnimationSet) AlphaAnimation(android.view.animation.AlphaAnimation) ScaleAnimation(android.view.animation.ScaleAnimation)

Example 79 with ScaleAnimation

use of android.view.animation.ScaleAnimation in project platform_frameworks_base by android.

the class DragState method createCancelAnimationLocked.

private Animation createCancelAnimationLocked() {
    final AnimationSet set = new AnimationSet(false);
    set.addAnimation(new ScaleAnimation(1, 0, 1, 0, mThumbOffsetX, mThumbOffsetY));
    set.addAnimation(new AlphaAnimation(mOriginalAlpha, 0));
    set.setDuration(ANIMATION_DURATION_MS);
    set.setInterpolator(mCubicEaseOutInterpolator);
    set.initialize(0, 0, 0, 0);
    // Will start on the first call to getTransformation.
    set.start();
    return set;
}
Also used : AnimationSet(android.view.animation.AnimationSet) AlphaAnimation(android.view.animation.AlphaAnimation) ScaleAnimation(android.view.animation.ScaleAnimation)

Example 80 with ScaleAnimation

use of android.view.animation.ScaleAnimation in project android_frameworks_base by DirtyUnicorns.

the class AppTransition method createScaleUpAnimationLocked.

private Animation createScaleUpAnimationLocked(int transit, boolean enter, Rect containingFrame) {
    Animation a;
    getDefaultNextAppTransitionStartRect(mTmpRect);
    final int appWidth = containingFrame.width();
    final int appHeight = containingFrame.height();
    if (enter) {
        // Entering app zooms out from the center of the initial rect.
        float scaleW = mTmpRect.width() / (float) appWidth;
        float scaleH = mTmpRect.height() / (float) appHeight;
        Animation scale = new ScaleAnimation(scaleW, 1, scaleH, 1, computePivot(mTmpRect.left, scaleW), computePivot(mTmpRect.top, scaleH));
        scale.setInterpolator(mDecelerateInterpolator);
        Animation alpha = new AlphaAnimation(0, 1);
        alpha.setInterpolator(mThumbnailFadeOutInterpolator);
        AnimationSet set = new AnimationSet(false);
        set.addAnimation(scale);
        set.addAnimation(alpha);
        set.setDetachWallpaper(true);
        a = set;
    } else if (transit == TRANSIT_WALLPAPER_INTRA_OPEN || transit == TRANSIT_WALLPAPER_INTRA_CLOSE) {
        // If we are on top of the wallpaper, we need an animation that
        // correctly handles the wallpaper staying static behind all of
        // the animated elements.  To do this, will just have the existing
        // element fade out.
        a = new AlphaAnimation(1, 0);
        a.setDetachWallpaper(true);
    } else {
        // For normal animations, the exiting element just holds in place.
        a = new AlphaAnimation(1, 1);
    }
    // Pick the desired duration.  If this is an inter-activity transition,
    // it  is the standard duration for that.  Otherwise we use the longer
    // task transition duration.
    final long duration;
    switch(transit) {
        case TRANSIT_ACTIVITY_OPEN:
        case TRANSIT_ACTIVITY_CLOSE:
            duration = mConfigShortAnimTime;
            break;
        default:
            duration = DEFAULT_APP_TRANSITION_DURATION;
            break;
    }
    a.setDuration(duration);
    a.setFillAfter(true);
    a.setInterpolator(mDecelerateInterpolator);
    a.initialize(appWidth, appHeight, appWidth, appHeight);
    return a;
}
Also used : ScaleAnimation(android.view.animation.ScaleAnimation) WindowAnimation_wallpaperCloseExitAnimation(com.android.internal.R.styleable.WindowAnimation_wallpaperCloseExitAnimation) CurvedTranslateAnimation(com.android.server.wm.animation.CurvedTranslateAnimation) WindowAnimation_activityOpenEnterAnimation(com.android.internal.R.styleable.WindowAnimation_activityOpenEnterAnimation) WindowAnimation_wallpaperOpenExitAnimation(com.android.internal.R.styleable.WindowAnimation_wallpaperOpenExitAnimation) WindowAnimation_taskToBackEnterAnimation(com.android.internal.R.styleable.WindowAnimation_taskToBackEnterAnimation) WindowAnimation_activityOpenExitAnimation(com.android.internal.R.styleable.WindowAnimation_activityOpenExitAnimation) TranslateAnimation(android.view.animation.TranslateAnimation) Animation(android.view.animation.Animation) ClipRectAnimation(android.view.animation.ClipRectAnimation) WindowAnimation_wallpaperOpenEnterAnimation(com.android.internal.R.styleable.WindowAnimation_wallpaperOpenEnterAnimation) WindowAnimation_launchTaskBehindTargetAnimation(com.android.internal.R.styleable.WindowAnimation_launchTaskBehindTargetAnimation) WindowAnimation_launchTaskBehindSourceAnimation(com.android.internal.R.styleable.WindowAnimation_launchTaskBehindSourceAnimation) WindowAnimation_taskCloseExitAnimation(com.android.internal.R.styleable.WindowAnimation_taskCloseExitAnimation) AlphaAnimation(android.view.animation.AlphaAnimation) WindowAnimation_wallpaperIntraCloseEnterAnimation(com.android.internal.R.styleable.WindowAnimation_wallpaperIntraCloseEnterAnimation) WindowAnimation_taskToBackExitAnimation(com.android.internal.R.styleable.WindowAnimation_taskToBackExitAnimation) WindowAnimation_activityCloseEnterAnimation(com.android.internal.R.styleable.WindowAnimation_activityCloseEnterAnimation) WindowAnimation_taskCloseEnterAnimation(com.android.internal.R.styleable.WindowAnimation_taskCloseEnterAnimation) WindowAnimation_taskOpenEnterAnimation(com.android.internal.R.styleable.WindowAnimation_taskOpenEnterAnimation) WindowAnimation_wallpaperIntraCloseExitAnimation(com.android.internal.R.styleable.WindowAnimation_wallpaperIntraCloseExitAnimation) ClipRectTBAnimation(com.android.server.wm.animation.ClipRectTBAnimation) WindowAnimation_taskOpenExitAnimation(com.android.internal.R.styleable.WindowAnimation_taskOpenExitAnimation) ClipRectLRAnimation(com.android.server.wm.animation.ClipRectLRAnimation) WindowAnimation_activityCloseExitAnimation(com.android.internal.R.styleable.WindowAnimation_activityCloseExitAnimation) WindowAnimation_taskToFrontEnterAnimation(com.android.internal.R.styleable.WindowAnimation_taskToFrontEnterAnimation) WindowAnimation_wallpaperIntraOpenEnterAnimation(com.android.internal.R.styleable.WindowAnimation_wallpaperIntraOpenEnterAnimation) WindowAnimation_wallpaperIntraOpenExitAnimation(com.android.internal.R.styleable.WindowAnimation_wallpaperIntraOpenExitAnimation) WindowAnimation_taskToFrontExitAnimation(com.android.internal.R.styleable.WindowAnimation_taskToFrontExitAnimation) WindowAnimation_wallpaperCloseEnterAnimation(com.android.internal.R.styleable.WindowAnimation_wallpaperCloseEnterAnimation) AnimationSet(android.view.animation.AnimationSet) AlphaAnimation(android.view.animation.AlphaAnimation) ScaleAnimation(android.view.animation.ScaleAnimation)

Aggregations

ScaleAnimation (android.view.animation.ScaleAnimation)114 AnimationSet (android.view.animation.AnimationSet)60 AlphaAnimation (android.view.animation.AlphaAnimation)56 Animation (android.view.animation.Animation)50 TranslateAnimation (android.view.animation.TranslateAnimation)40 ClipRectAnimation (android.view.animation.ClipRectAnimation)28 CurvedTranslateAnimation (com.android.server.wm.animation.CurvedTranslateAnimation)28 WindowAnimation_activityCloseEnterAnimation (com.android.internal.R.styleable.WindowAnimation_activityCloseEnterAnimation)26 WindowAnimation_activityCloseExitAnimation (com.android.internal.R.styleable.WindowAnimation_activityCloseExitAnimation)26 WindowAnimation_activityOpenEnterAnimation (com.android.internal.R.styleable.WindowAnimation_activityOpenEnterAnimation)26 WindowAnimation_activityOpenExitAnimation (com.android.internal.R.styleable.WindowAnimation_activityOpenExitAnimation)26 WindowAnimation_taskCloseEnterAnimation (com.android.internal.R.styleable.WindowAnimation_taskCloseEnterAnimation)26 WindowAnimation_taskCloseExitAnimation (com.android.internal.R.styleable.WindowAnimation_taskCloseExitAnimation)26 WindowAnimation_taskOpenEnterAnimation (com.android.internal.R.styleable.WindowAnimation_taskOpenEnterAnimation)26 WindowAnimation_taskOpenExitAnimation (com.android.internal.R.styleable.WindowAnimation_taskOpenExitAnimation)26 WindowAnimation_taskToBackEnterAnimation (com.android.internal.R.styleable.WindowAnimation_taskToBackEnterAnimation)26 WindowAnimation_taskToBackExitAnimation (com.android.internal.R.styleable.WindowAnimation_taskToBackExitAnimation)26 WindowAnimation_taskToFrontEnterAnimation (com.android.internal.R.styleable.WindowAnimation_taskToFrontEnterAnimation)26 WindowAnimation_taskToFrontExitAnimation (com.android.internal.R.styleable.WindowAnimation_taskToFrontExitAnimation)26 WindowAnimation_wallpaperCloseEnterAnimation (com.android.internal.R.styleable.WindowAnimation_wallpaperCloseEnterAnimation)26