當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。