当前位置: 首页>>代码示例>>Java>>正文


Java ScaleAnimation.setFillAfter方法代码示例

本文整理汇总了Java中android.view.animation.ScaleAnimation.setFillAfter方法的典型用法代码示例。如果您正苦于以下问题:Java ScaleAnimation.setFillAfter方法的具体用法?Java ScaleAnimation.setFillAfter怎么用?Java ScaleAnimation.setFillAfter使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在android.view.animation.ScaleAnimation的用法示例。


在下文中一共展示了ScaleAnimation.setFillAfter方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: doEnterAnim

import android.view.animation.ScaleAnimation; //导入方法依赖的package包/类
public void doEnterAnim(final View contentView, long animDuration) {
    if (builder.gravity == Gravity.BOTTOM) {
        ValueAnimator enterAnimator = ValueAnimator.ofFloat(contentView.getHeight(), 0);
        enterAnimator.setDuration(animDuration);
        enterAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
            @Override
            public void onAnimationUpdate(ValueAnimator animation) {
                float value = (float) animation.getAnimatedValue();
                contentView.setTranslationY(value);
            }
        });
        enterAnimator.start();
    } else {
        ScaleAnimation scaleAnimation = new ScaleAnimation(0F, 1.0F, 0F, 1.0F,
                Animation.RELATIVE_TO_PARENT, 0.5F, Animation.RELATIVE_TO_PARENT, 0.5F);
        scaleAnimation.setDuration(animDuration);
        scaleAnimation.setFillAfter(true);
        contentView.startAnimation(scaleAnimation);
    }
}
 
开发者ID:devilist,项目名称:RecyclerWheelPicker,代码行数:21,代码来源:WheelPicker.java

示例2: doExitAnim

import android.view.animation.ScaleAnimation; //导入方法依赖的package包/类
public void doExitAnim(final View contentView, long animDuration) {
    if (builder.gravity == Gravity.BOTTOM) {
        ValueAnimator exitAnimator = ValueAnimator.ofFloat(0, contentView.getHeight());
        exitAnimator.setDuration(animDuration);
        exitAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
            @Override
            public void onAnimationUpdate(ValueAnimator animation) {
                float value = (float) animation.getAnimatedValue();
                contentView.setTranslationY(value);
            }
        });
        exitAnimator.start();
    } else {
        ScaleAnimation scaleAnimation = new ScaleAnimation(1.0F, 0.0F, 1.0F, 0.0F,
                Animation.RELATIVE_TO_PARENT, 0.5F, Animation.RELATIVE_TO_PARENT, 0.5F);
        scaleAnimation.setDuration(animDuration);
        scaleAnimation.setFillAfter(true);
        contentView.startAnimation(scaleAnimation);
    }
}
 
开发者ID:devilist,项目名称:RecyclerWheelPicker,代码行数:21,代码来源:WheelPicker.java

示例3: onSuccess

import android.view.animation.ScaleAnimation; //导入方法依赖的package包/类
protected void onSuccess() {
    mCardView.removeAllViews();
    MediaPlayer.create(mContext, R.raw.shake).start();
    initShakeView();
    mCardView.addView(mShakeView);
    mCardView.setVisibility(View.VISIBLE);
    ScaleAnimation animation = new ScaleAnimation(0.0f, 1.0f, 0.0f, 1.0f,
            Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);
    animation.setDuration(320);
    animation.setFillAfter(true);
    mCardView.startAnimation(animation);

    mLoadingView.stop();
    mLoadingView.setVisibility(View.GONE);
    mTvState.setVisibility(View.GONE);
}
 
开发者ID:hsj-xiaokang,项目名称:OSchina_resources_android,代码行数:17,代码来源:BaseSensorFragment.java

示例4: addTextZoomAnimations

import android.view.animation.ScaleAnimation; //导入方法依赖的package包/类
private void addTextZoomAnimations(AnimationSet set) {
    ScaleAnimation mScaleAnim = new ScaleAnimation(1, SCALE_AMOUNT, 1f, SCALE_AMOUNT, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);
    mScaleAnim.setDuration(CHARACTER_ANIM_DURATION);
    set.addAnimation(mScaleAnim);
    ScaleAnimation mScaleDownAnim = new ScaleAnimation(1, SCALE_AMOUNT, 1f, SCALE_AMOUNT, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);
    mScaleDownAnim.setDuration(CHARACTER_ANIM_DURATION);
    mScaleDownAnim.setStartOffset(CHARACTER_ANIM_DURATION + 20);
    mScaleDownAnim.setFillAfter(true);
    set.addAnimation(mScaleDownAnim);
    set.setInterpolator(interpolator);
}
 
开发者ID:HarinTrivedi,项目名称:AnimatedPullToRefresh-master,代码行数:12,代码来源:AnimationHelper.java

示例5: createUpAnim

import android.view.animation.ScaleAnimation; //导入方法依赖的package包/类
ScaleAnimation createUpAnim() {
    ScaleAnimation localScaleAnimation = new ScaleAnimation(1.2F, 1.0F, 1.2F, 1.0F, 1, 0.5F, 1, 0.5F);
    localScaleAnimation.setDuration(50L);
    localScaleAnimation.setFillEnabled(true);
    localScaleAnimation.setFillEnabled(false);
    localScaleAnimation.setFillAfter(true);
    return localScaleAnimation;
}
 
开发者ID:zhangyaqiang,项目名称:Fatigue-Detection,代码行数:9,代码来源:EffectsButton.java

示例6: createDownAnim

import android.view.animation.ScaleAnimation; //导入方法依赖的package包/类
ScaleAnimation createDownAnim() {
    ScaleAnimation localScaleAnimation = new ScaleAnimation(1.0F, 1.2F, 1.0F, 1.2F, 1, 0.5F, 1, 0.5F);
    localScaleAnimation.setDuration(50L);
    localScaleAnimation.setFillEnabled(true);
    localScaleAnimation.setFillBefore(false);
    localScaleAnimation.setFillAfter(true);
    return localScaleAnimation;
}
 
开发者ID:zhangyaqiang,项目名称:Fatigue-Detection,代码行数:9,代码来源:EffectsButton.java

示例7: scaleBigAnim

import android.view.animation.ScaleAnimation; //导入方法依赖的package包/类
/**
 * 放大动画
 *
 * @param v        view
 * @param listener listener
 */
static void scaleBigAnim(View v, Animation.AnimationListener listener) {
    ScaleAnimation an2 = new ScaleAnimation(0.8f, 1f, 0.8f, 1f,
            Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);
    an2.setDuration(200);
    an2.setFillAfter(true);
    v.startAnimation(an2);
    an2.setAnimationListener(listener);
}
 
开发者ID:f-evil,项目名称:EVideoRecorder,代码行数:15,代码来源:ERecorderActivityImpl.java

示例8: scaleSmallAnim

import android.view.animation.ScaleAnimation; //导入方法依赖的package包/类
/**
 * 缩小动画
 *
 * @param v view
 */
static void scaleSmallAnim(View v) {
    ScaleAnimation an1 = new ScaleAnimation(1f, 0.8f, 1f, 0.8f,
            Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);
    an1.setDuration(200);
    an1.setFillAfter(true);
    v.startAnimation(an1);
}
 
开发者ID:f-evil,项目名称:EVideoRecorder,代码行数:13,代码来源:ERecorderActivityImpl.java

示例9: getZoomInAnimation

import android.view.animation.ScaleAnimation; //导入方法依赖的package包/类
private ScaleAnimation getZoomInAnimation(long startOffset, long touchTime) {
    ScaleAnimation zoomIn = new ScaleAnimation(SCALE_FACTOR, 1f, SCALE_FACTOR, 1f);
    zoomIn.setStartOffset(startOffset+SCALE_DURATION+touchTime);
    zoomIn.setDuration(SCALE_DURATION);
    zoomIn.setFillAfter(true);
    return zoomIn;
}
 
开发者ID:elimu-ai,项目名称:start-guide,代码行数:8,代码来源:GestureHelper.java

示例10: onButtonPressed

import android.view.animation.ScaleAnimation; //导入方法依赖的package包/类
private static void onButtonPressed(View button) {
    ScaleAnimation scaleAnimation = new ScaleAnimation(1, 0.9f,
                                                       1, 0.9f,
                                                       Animation.RELATIVE_TO_SELF, 0.5f,
                                                       Animation.RELATIVE_TO_SELF, 0.5f);
    scaleAnimation.setInterpolator(new DecelerateInterpolator());
    scaleAnimation.setDuration(100);
    scaleAnimation.setFillAfter(true);
    button.startAnimation(scaleAnimation);
}
 
开发者ID:Codigami,项目名称:CFAlertDialog,代码行数:11,代码来源:ViewUtil.java

示例11: onButtonReleased

import android.view.animation.ScaleAnimation; //导入方法依赖的package包/类
private static void onButtonReleased(View button) {
    ScaleAnimation scaleAnimation = new ScaleAnimation(0.9f, 1f,
                                                       0.9f, 1f,
                                                       Animation.RELATIVE_TO_SELF, 0.5f,
                                                       Animation.RELATIVE_TO_SELF, 0.5f);
    scaleAnimation.setInterpolator(new DecelerateInterpolator());
    scaleAnimation.setDuration(100);
    scaleAnimation.setFillAfter(true);
    button.startAnimation(scaleAnimation);
}
 
开发者ID:Codigami,项目名称:CFAlertDialog,代码行数:11,代码来源:ViewUtil.java

示例12: scale

import android.view.animation.ScaleAnimation; //导入方法依赖的package包/类
private Animation scale(){
    ScaleAnimation scaleAnimation = new ScaleAnimation(.75F, 1f, .75F, 1f,
            Animation.RELATIVE_TO_SELF, .5F, Animation.RELATIVE_TO_SELF, .5F);
    scaleAnimation.setDuration(BUTTON_ANIMATION_DURATION);
    scaleAnimation.setFillAfter(true);
    return  scaleAnimation;
}
 
开发者ID:amirarcane,项目名称:lock-screen,代码行数:8,代码来源:PinLockAdapter.java

示例13: init

import android.view.animation.ScaleAnimation; //导入方法依赖的package包/类
private void init()
{
    animatorNormal = new ScaleAnimation(scaleFactor, 1f, scaleFactor, 1f,
            Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF,
            0.5f);
    animatorNormal.setDuration(300);
    animatorNormal.setFillAfter(true);

    animatorSmaller = new ScaleAnimation(1f, scaleFactor, 1f, scaleFactor,
            Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF,
            0.5f);
    animatorSmaller.setDuration(300);
    animatorSmaller.setFillAfter(true);
}
 
开发者ID:RealMoMo,项目名称:72GGames_Demo,代码行数:15,代码来源:ImageViewScale.java

示例14: run

import android.view.animation.ScaleAnimation; //导入方法依赖的package包/类
@Override
public void run() {
    mShowTip = false;

    mTipView.clearAnimation();
    ScaleAnimation scaleAnimation = new ScaleAnimation(1, 1, 1, 0,
            Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0f);
    scaleAnimation.setDuration(ANIM_TIME);
    scaleAnimation.setFillAfter(true);
    mTipView.startAnimation(scaleAnimation);
}
 
开发者ID:angcyo,项目名称:RLibrary,代码行数:12,代码来源:RefreshLayout.java


注:本文中的android.view.animation.ScaleAnimation.setFillAfter方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。