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


Java ScaleAnimation.setInterpolator方法代码示例

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


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

示例1: hide

import android.view.animation.ScaleAnimation; //导入方法依赖的package包/类
/**
 * Hides the FAB.
 */
@Override
public void hide() {
    // Only use scale animation if FAB is visible
    if (getVisibility() == View.VISIBLE) {
        // Pivots indicate where the animation begins from
        float pivotX = getPivotX() + getTranslationX();
        float pivotY = getPivotY() + getTranslationY();

        // Animate FAB shrinking
        ScaleAnimation anim = new ScaleAnimation(1, 0, 1, 0, pivotX, pivotY);
        anim.setDuration(FAB_ANIM_DURATION);
        anim.setInterpolator(getInterpolator());
        startAnimation(anim);
    }
    setVisibility(View.INVISIBLE);
}
 
开发者ID:sfilmak,项目名称:MakiLite,代码行数:20,代码来源:Fab.java

示例2: ScaleLoadingLayout

import android.view.animation.ScaleAnimation; //导入方法依赖的package包/类
public ScaleLoadingLayout(Context context, Mode mode, Orientation scrollDirection, TypedArray attrs) {
		super(context, mode, scrollDirection, attrs);
		/**创建缩放动画动画*/
		mRotateDrawableWhilePulling = attrs.getBoolean(R.styleable.PullToRefresh_ptrRotateDrawableWhilePulling, true);

//		mContentLayout.setSca(ScaleType.MATRIX);
//		mHeaderImageMatrix = new Matrix();
//		mHeaderImage.setImageMatrix(mHeaderImageMatrix);

		mScalAnimation = new ScaleAnimation(BASE_SCALE, 1, Animation.RELATIVE_TO_SELF, BASE_SCALE, Animation.RELATIVE_TO_SELF,
				1);
		mScalAnimation.setInterpolator(ANIMATION_INTERPOLATOR);
		mScalAnimation.setDuration(ROTATION_ANIMATION_DURATION);
		mScalAnimation.setRepeatCount(Animation.INFINITE);
		mScalAnimation.setRepeatMode(Animation.RESTART);
	}
 
开发者ID:SavorGit,项目名称:Hotspot-master-devp,代码行数:17,代码来源:ScaleLoadingLayout.java

示例3: startScale

import android.view.animation.ScaleAnimation; //导入方法依赖的package包/类
private ScaleAnimation startScale() {
	ScaleAnimation scale = new ScaleAnimation(0, 1, 0, 1, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);
	scale.setInterpolator(this, android.R.anim.accelerate_interpolator);
	scale.setStartOffset(0);
	scale.setDuration(1500);
	return scale;
}
 
开发者ID:isuhao,项目名称:QMark,代码行数:8,代码来源:WelcomeSnowActy.java

示例4: endScale

import android.view.animation.ScaleAnimation; //导入方法依赖的package包/类
private ScaleAnimation endScale(int startTime) {
	ScaleAnimation scale = new ScaleAnimation(1, 0, 1, 0, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);
	scale.setInterpolator(this, android.R.anim.decelerate_interpolator);
	scale.setStartOffset(startTime - 300);
	scale.setDuration(300);
	return scale;
}
 
开发者ID:isuhao,项目名称:QMark,代码行数:8,代码来源:WelcomeSnowActy.java

示例5: makeOpenCloseAnimation

import android.view.animation.ScaleAnimation; //导入方法依赖的package包/类
static Animation makeOpenCloseAnimation(Context context, float startScale, float endScale, float startAlpha, float endAlpha) {
    AnimationSet set = new AnimationSet(false);
    ScaleAnimation scale = new ScaleAnimation(startScale, endScale, startScale, endScale, 1, 0.5f, 1, 0.5f);
    scale.setInterpolator(DECELERATE_QUINT);
    scale.setDuration(220);
    set.addAnimation(scale);
    AlphaAnimation alpha = new AlphaAnimation(startAlpha, endAlpha);
    alpha.setInterpolator(DECELERATE_CUBIC);
    alpha.setDuration(220);
    set.addAnimation(alpha);
    return set;
}
 
开发者ID:JackChan1999,项目名称:letv,代码行数:13,代码来源:FragmentManagerImpl.java

示例6: 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

示例7: 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

示例8: getAnimationSetScaleBig

import android.view.animation.ScaleAnimation; //导入方法依赖的package包/类
/**
 * 放大动画
 *
 * @return
 */
public static AnimationSet getAnimationSetScaleBig() {
    AnimationSet animationSet = new AnimationSet(true);

    ScaleAnimation scaleAnimation = new ScaleAnimation(0.1f, 1.0f, 0.1f, 1.0f, RELATIVE_TO_SELF, 0.5f, RELATIVE_TO_SELF, 0.5f);
    scaleAnimation.setInterpolator(new DecelerateInterpolator());
    scaleAnimation.setDuration(400);


    animationSet.addAnimation(scaleAnimation);
    animationSet.setDuration(400);

    return animationSet;
}
 
开发者ID:nuptboyzhb,项目名称:RecyclerViewAnimation,代码行数:19,代码来源:MyLayoutAnimationHelper.java

示例9: getAnimationSetScaleNarrow

import android.view.animation.ScaleAnimation; //导入方法依赖的package包/类
/**
 * 缩小动画
 *
 * @return
 */
public static AnimationSet getAnimationSetScaleNarrow() {
    AnimationSet animationSet = new AnimationSet(true);

    ScaleAnimation scaleAnimation = new ScaleAnimation(2.1f, 1.0f, 2.1f, 1.0f, RELATIVE_TO_SELF, 0.5f, RELATIVE_TO_SELF, 0.5f);
    scaleAnimation.setInterpolator(new DecelerateInterpolator());
    scaleAnimation.setDuration(400);

    animationSet.addAnimation(scaleAnimation);
    animationSet.setDuration(400);

    return animationSet;
}
 
开发者ID:nuptboyzhb,项目名称:RecyclerViewAnimation,代码行数:18,代码来源:MyLayoutAnimationHelper.java

示例10: hide

import android.view.animation.ScaleAnimation; //导入方法依赖的package包/类
public void hide() {
    // Only use scale animation if FAB is visible
    if (getVisibility() == View.VISIBLE) {
        // Pivots indicate where the animation begins from
        float pivotX = getPivotX() + getTranslationX();
        float pivotY = getPivotY() + getTranslationY();

        // Animate FAB shrinking
        ScaleAnimation anim = new ScaleAnimation(1, 0, 1, 0, pivotX, pivotY);
        anim.setDuration(FAB_ANIM_DURATION);
        anim.setInterpolator(getInterpolator());
        startAnimation(anim);
    }
    setVisibility(View.INVISIBLE);
}
 
开发者ID:MBach,项目名称:LeMondeRssReader,代码行数:16,代码来源:ExtendedFabButton.java

示例11: scale

import android.view.animation.ScaleAnimation; //导入方法依赖的package包/类
private void scale(View v) {
    ScaleAnimation scaleAnimation = new ScaleAnimation(1, 1, 1, 0.9f,
            Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF,
            1.2f);
    scaleAnimation.setRepeatMode(Animation.REVERSE);
    scaleAnimation.setInterpolator(new AccelerateInterpolator());
    scaleAnimation.setDuration(150);
    scaleAnimation.setRepeatCount(-1);
    v.startAnimation(scaleAnimation);
}
 
开发者ID:tohodog,项目名称:QSRefreshLayout,代码行数:11,代码来源:ElemeRefreshView.java


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