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


Java PropertyValuesHolder类代码示例

本文整理汇总了Java中com.nineoldandroids.animation.PropertyValuesHolder的典型用法代码示例。如果您正苦于以下问题:Java PropertyValuesHolder类的具体用法?Java PropertyValuesHolder怎么用?Java PropertyValuesHolder使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: getDisappearAnimator

import com.nineoldandroids.animation.PropertyValuesHolder; //导入依赖的package包/类
public ObjectAnimator getDisappearAnimator() {
    if (!mIsInitialized || !mDrawValuesReady) {
        Log.e(TAG, "RadialSelectorView was not ready for animation.");
        return null;
    }

    Keyframe kf0, kf1, kf2;
    float midwayPoint = 0.2f;
    int duration = 500;

    kf0 = Keyframe.ofFloat(0f, 1);
    kf1 = Keyframe.ofFloat(midwayPoint, mTransitionMidRadiusMultiplier);
    kf2 = Keyframe.ofFloat(1f, mTransitionEndRadiusMultiplier);
    PropertyValuesHolder radiusDisappear = PropertyValuesHolder.ofKeyframe(
            "animationRadiusMultiplier", kf0, kf1, kf2);

    kf0 = Keyframe.ofFloat(0f, 1f);
    kf1 = Keyframe.ofFloat(1f, 0f);
    PropertyValuesHolder fadeOut = PropertyValuesHolder.ofKeyframe("alpha", kf0, kf1);

    ObjectAnimator disappearAnimator = ObjectAnimator.ofPropertyValuesHolder(
            this, radiusDisappear, fadeOut).setDuration(duration);
    disappearAnimator.addUpdateListener(mInvalidateUpdateListener);

    return disappearAnimator;
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:27,代码来源:RadialSelectorView.java

示例2: getPulseAnimator

import com.nineoldandroids.animation.PropertyValuesHolder; //导入依赖的package包/类
public static ObjectAnimator getPulseAnimator(View labelToAnimate,
                                              float decreaseRatio, float increaseRatio) {
    Keyframe k0 = Keyframe.ofFloat(0f, 1f);
    Keyframe k1 = Keyframe.ofFloat(0.275f, decreaseRatio);
    Keyframe k2 = Keyframe.ofFloat(0.69f, increaseRatio);
    Keyframe k3 = Keyframe.ofFloat(1f, 1f);

    PropertyValuesHolder scaleX = PropertyValuesHolder.ofKeyframe("scaleX",
            k0, k1, k2, k3);
    PropertyValuesHolder scaleY = PropertyValuesHolder.ofKeyframe("scaleY",
            k0, k1, k2, k3);
    ObjectAnimator pulseAnimator = ObjectAnimator.ofPropertyValuesHolder(
            labelToAnimate, scaleX, scaleY);
    pulseAnimator.setDuration(PULSE_ANIMATOR_DURATION);

    return pulseAnimator;
}
 
开发者ID:hsj-xiaokang,项目名称:OSchina_resources_android,代码行数:18,代码来源:Utils.java

示例3: createReverse

import com.nineoldandroids.animation.PropertyValuesHolder; //导入依赖的package包/类
@CheckResult
PropertyValuesHolder createReverse() {
    final int max;
    if (isFloat) {
        float[] newfVals = new float[fVals.length];
        max = fVals.length;
        for (int i = 0; i < max; i++) {
            newfVals[i] = fVals[max - i - 1];
        }
        return PropertyValuesHolder.ofFloat(property, newfVals);
    } else {
        int[] newiVals = new int[iVals.length];
        max = iVals.length;
        for (int i = 0; i < max; i++) {
            newiVals[i] = iVals[max - i - 1];
        }
        return PropertyValuesHolder.ofInt(property, newiVals);
    }
}
 
开发者ID:kaichunlin,项目名称:android-transition,代码行数:20,代码来源:AbstractTransitionBuilder.java

示例4: getPulseAnimator

import com.nineoldandroids.animation.PropertyValuesHolder; //导入依赖的package包/类
/**
 * Render an animator to pulsate a view in place.
 *
 * @param labelToAnimate the view to pulsate.
 * @return The animator object. Use .start() to begin.
 */
public static ObjectAnimator getPulseAnimator(View labelToAnimate, float decreaseRatio,
                                              float increaseRatio) {
    Keyframe k0 = Keyframe.ofFloat(0f, 1f);
    Keyframe k1 = Keyframe.ofFloat(0.275f, decreaseRatio);
    Keyframe k2 = Keyframe.ofFloat(0.69f, increaseRatio);
    Keyframe k3 = Keyframe.ofFloat(1f, 1f);

    PropertyValuesHolder scaleX = PropertyValuesHolder.ofKeyframe(sPropertyScaleX, k0, k1, k2, k3);
    PropertyValuesHolder scaleY = PropertyValuesHolder.ofKeyframe(sPropertyScaleY, k0, k1, k2, k3);
    ObjectAnimator pulseAnimator =
            ObjectAnimator.ofPropertyValuesHolder(labelToAnimate, scaleX, scaleY);
    pulseAnimator.setDuration(PULSE_ANIMATOR_DURATION);

    return pulseAnimator;
}
 
开发者ID:restorer,项目名称:gloomy-dungeons-2,代码行数:22,代码来源:DateTimePickerUtils.java

示例5: getDisappearAnimator

import com.nineoldandroids.animation.PropertyValuesHolder; //导入依赖的package包/类
public ObjectAnimator getDisappearAnimator() {
    if (!mIsInitialized || !mDrawValuesReady) {
        Log.e(TAG, "RadialSelectorView was not ready for animation.");
        return null;
    }

    Keyframe kf0, kf1;

    kf0 = Keyframe.ofFloat(0f, 1f);
    kf1 = Keyframe.ofFloat(1f, 0f);
    PropertyValuesHolder fade = PropertyValuesHolder.ofKeyframe("alpha", kf0, kf1);

    ObjectAnimator disappearAnimator = ObjectAnimator.ofPropertyValuesHolder(this, fade).setDuration(300);
    disappearAnimator.addUpdateListener(mInvalidateUpdateListener);

    return disappearAnimator;
}
 
开发者ID:restorer,项目名称:gloomy-dungeons-2,代码行数:18,代码来源:RadialSelectorView.java

示例6: getReappearAnimator

import com.nineoldandroids.animation.PropertyValuesHolder; //导入依赖的package包/类
public ObjectAnimator getReappearAnimator() {
    if (!mIsInitialized || !mDrawValuesReady) {
        Log.e(TAG, "RadialSelectorView was not ready for animation.");
        return null;
    }

    Keyframe kf0, kf1;

    kf0 = Keyframe.ofFloat(0f, 0f);
    kf1 = Keyframe.ofFloat(1f, 1f);
    PropertyValuesHolder fade = PropertyValuesHolder.ofKeyframe("alpha", kf0, kf1);

    ObjectAnimator reappearAnimator = ObjectAnimator.ofPropertyValuesHolder(this, fade).setDuration(300);
    reappearAnimator.addUpdateListener(mInvalidateUpdateListener);
    return reappearAnimator;
}
 
开发者ID:restorer,项目名称:gloomy-dungeons-2,代码行数:17,代码来源:RadialSelectorView.java

示例7: getPulseAnimator

import com.nineoldandroids.animation.PropertyValuesHolder; //导入依赖的package包/类
/**
 * Render an animator to pulsate a view in place.
 * @param labelToAnimate the view to pulsate.
 * @return The animator object. Use .start() to begin.
 */
public static ObjectAnimator getPulseAnimator(View labelToAnimate, float decreaseRatio,
        float increaseRatio) {
    Keyframe k0 = Keyframe.ofFloat(0f, 1f);
    Keyframe k1 = Keyframe.ofFloat(0.275f, decreaseRatio);
    Keyframe k2 = Keyframe.ofFloat(0.69f, increaseRatio);
    Keyframe k3 = Keyframe.ofFloat(1f, 1f);

    PropertyValuesHolder scaleX = PropertyValuesHolder.ofKeyframe("scaleX", k0, k1, k2, k3);
    PropertyValuesHolder scaleY = PropertyValuesHolder.ofKeyframe("scaleY", k0, k1, k2, k3);
    ObjectAnimator pulseAnimator =
            ObjectAnimator.ofPropertyValuesHolder(labelToAnimate, scaleX, scaleY);
    pulseAnimator.setDuration(PULSE_ANIMATOR_DURATION);

    return pulseAnimator;
}
 
开发者ID:zenyagami,项目名称:DateTimepicker,代码行数:21,代码来源:Utils.java

示例8: getPulseAnimator

import com.nineoldandroids.animation.PropertyValuesHolder; //导入依赖的package包/类
/**
 * Render an animator to pulsate a view in place.
 * @param labelToAnimate the view to pulsate.
 * @return The animator object. Use .start() to begin.
 */
public static ObjectAnimator getPulseAnimator(View labelToAnimate, float decreaseRatio,
        float increaseRatio) {
    Keyframe k0 = Keyframe.ofFloat(0f, 1f);
    Keyframe k1 = Keyframe.ofFloat(0.275f, decreaseRatio);
    Keyframe k2 = Keyframe.ofFloat(0.69f, increaseRatio);
    Keyframe k3 = Keyframe.ofFloat(1f, 1f);

    PropertyValuesHolder scaleX = PropertyValuesHolder.ofKeyframe("scaleX", k0, k1, k2, k3);
    PropertyValuesHolder scaleY = PropertyValuesHolder.ofKeyframe("scaleY", k0, k1, k2, k3);
    ObjectAnimator pulseAnimator =
            ObjectAnimator.ofPropertyValuesHolder(
                    AnimatorProxy.NEEDS_PROXY ? AnimatorProxy.wrap(labelToAnimate) : labelToAnimate, scaleX,
                    scaleY);
    pulseAnimator.setDuration(PULSE_ANIMATOR_DURATION);

    return pulseAnimator;
}
 
开发者ID:bhm,项目名称:Cthulhator,代码行数:23,代码来源:Utils.java

示例9: getPulseAnimator

import com.nineoldandroids.animation.PropertyValuesHolder; //导入依赖的package包/类
/**
 * Render an animator to pulsate a view in place.
 * 
 * @param labelToAnimate
 *            the view to pulsate.
 * @return The animator object. Use .start() to begin.
 */
public static ObjectAnimator getPulseAnimator(View labelToAnimate, float decreaseRatio,
		float increaseRatio) {
	Keyframe k0 = Keyframe.ofFloat(0f, 1f);
	Keyframe k1 = Keyframe.ofFloat(0.275f, decreaseRatio);
	Keyframe k2 = Keyframe.ofFloat(0.69f, increaseRatio);
	Keyframe k3 = Keyframe.ofFloat(1f, 1f);

	PropertyValuesHolder scaleX = PropertyValuesHolder.ofKeyframe("scaleX", k0, k1, k2, k3);
	PropertyValuesHolder scaleY = PropertyValuesHolder.ofKeyframe("scaleY", k0, k1, k2, k3);
	ObjectAnimator pulseAnimator =
			ObjectAnimator.ofPropertyValuesHolder(AnimatorProxy.NEEDS_PROXY ?
					AnimatorProxy.wrap(labelToAnimate) : labelToAnimate, scaleX, scaleY);
	pulseAnimator.setDuration(PULSE_ANIMATOR_DURATION);

	return pulseAnimator;
}
 
开发者ID:RedInput,项目名称:DateTimePickerCompat,代码行数:24,代码来源:Utils.java

示例10: getPulseAnimator

import com.nineoldandroids.animation.PropertyValuesHolder; //导入依赖的package包/类
public static ObjectAnimator getPulseAnimator(View labelToAnimate, float decreaseRatio, float increaseRatio) {
    Keyframe k0 = Keyframe.ofFloat(0f, 1f);
    Keyframe k1 = Keyframe.ofFloat(0.275f, decreaseRatio);
    Keyframe k2 = Keyframe.ofFloat(0.69f, increaseRatio);
    Keyframe k3 = Keyframe.ofFloat(1f, 1f);

    PropertyValuesHolder scaleX = PropertyValuesHolder.ofKeyframe("scaleX", k0, k1, k2, k3);
    PropertyValuesHolder scaleY = PropertyValuesHolder.ofKeyframe("scaleY", k0, k1, k2, k3);
    ObjectAnimator pulseAnimator = ObjectAnimator.ofPropertyValuesHolder(labelToAnimate, scaleX, scaleY);
    pulseAnimator.setDuration(PULSE_ANIMATOR_DURATION);

    return pulseAnimator;
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:14,代码来源:Utils.java

示例11: getReappearAnimator

import com.nineoldandroids.animation.PropertyValuesHolder; //导入依赖的package包/类
public ObjectAnimator getReappearAnimator() {
    if (!mIsInitialized || !mDrawValuesReady) {
        Log.e(TAG, "RadialSelectorView was not ready for animation.");
        return null;
    }

    Keyframe kf0, kf1, kf2, kf3;
    float midwayPoint = 0.2f;
    int duration = 500;

    // The time points are half of what they would normally be, because this animation is
    // staggered against the disappear so they happen seamlessly. The reappear starts
    // halfway into the disappear.
    float delayMultiplier = 0.25f;
    float transitionDurationMultiplier = 1f;
    float totalDurationMultiplier = transitionDurationMultiplier + delayMultiplier;
    int totalDuration = (int) (duration * totalDurationMultiplier);
    float delayPoint = (delayMultiplier * duration) / totalDuration;
    midwayPoint = 1 - (midwayPoint * (1 - delayPoint));

    kf0 = Keyframe.ofFloat(0f, mTransitionEndRadiusMultiplier);
    kf1 = Keyframe.ofFloat(delayPoint, mTransitionEndRadiusMultiplier);
    kf2 = Keyframe.ofFloat(midwayPoint, mTransitionMidRadiusMultiplier);
    kf3 = Keyframe.ofFloat(1f, 1);
    PropertyValuesHolder radiusReappear = PropertyValuesHolder.ofKeyframe(
            "animationRadiusMultiplier", kf0, kf1, kf2, kf3);

    kf0 = Keyframe.ofFloat(0f, 0f);
    kf1 = Keyframe.ofFloat(delayPoint, 0f);
    kf2 = Keyframe.ofFloat(1f, 1f);
    PropertyValuesHolder fadeIn = PropertyValuesHolder.ofKeyframe("alpha", kf0, kf1, kf2);

    ObjectAnimator reappearAnimator = ObjectAnimator.ofPropertyValuesHolder(
            this, radiusReappear, fadeIn).setDuration(totalDuration);
    reappearAnimator.addUpdateListener(mInvalidateUpdateListener);
    return reappearAnimator;
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:38,代码来源:RadialSelectorView.java

示例12: viewAnimationScal

import com.nineoldandroids.animation.PropertyValuesHolder; //导入依赖的package包/类
/**
 * 缩放动画
 *
 * @param view
 */
public void viewAnimationScal(final View view) {
    PropertyValuesHolder pvhX = PropertyValuesHolder.ofFloat("scaleX", 1, 1.5f, 1);
    PropertyValuesHolder pvhY = PropertyValuesHolder.ofFloat("scaleY", 1, 1.5f, 1);
    ViewHelper.setPivotX(view, view.getWidth() >> 1);
    ViewHelper.setPivotY(view, view.getHeight() >> 1);
    ObjectAnimator animator2 = ObjectAnimator.ofPropertyValuesHolder(view, pvhX, pvhY).setDuration(300);
    animator2.setInterpolator(mInterpolator);
    animator2.start();
}
 
开发者ID:tengbinlive,项目名称:aibao_demo,代码行数:15,代码来源:AnimationHelper.java

示例13: createAnimation

import com.nineoldandroids.animation.PropertyValuesHolder; //导入依赖的package包/类
@Override
public List<Animator> createAnimation() {
    List<Animator> animators=new ArrayList<>();
    PropertyValuesHolder rotation5=PropertyValuesHolder.ofFloat("rotationX",0,180,180,0,0);
    PropertyValuesHolder rotation6=PropertyValuesHolder.ofFloat("rotationY",0,0,180,180,0);
    ObjectAnimator animator=ObjectAnimator.ofPropertyValuesHolder(getTarget(), rotation6,rotation5);
    animator.setInterpolator(new LinearInterpolator());
    animator.setRepeatCount(-1);
    animator.setDuration(2500);
    animator.start();
    animators.add(animator);
    return animators;
}
 
开发者ID:cowthan,项目名称:AyoSunny,代码行数:14,代码来源:SquareSpinIndicator.java

示例14: createAnimation

import com.nineoldandroids.animation.PropertyValuesHolder; //导入依赖的package包/类
@Override
public List<Animator> createAnimation() {
    List<Animator> animators=new ArrayList<>();
    PropertyValuesHolder rotation5=PropertyValuesHolder.ofFloat("rotationX",0,180,180,0,0);
    PropertyValuesHolder rotation6=PropertyValuesHolder.ofFloat("rotationY",0,0,180,180,0);
    
    ObjectAnimator animator=ObjectAnimator.ofPropertyValuesHolder(getTarget(), rotation6,rotation5);
    animator.setInterpolator(new LinearInterpolator());
    animator.setRepeatCount(-1);
    animator.setDuration(2500);
    animator.start();

    animators.add(animator);
    return animators;
}
 
开发者ID:cowthan,项目名称:AyoSunny,代码行数:16,代码来源:TriangleSkewSpinIndicator.java

示例15: createAnimation

import com.nineoldandroids.animation.PropertyValuesHolder; //导入依赖的package包/类
@Override
public List<Animator> createAnimation() {
    PropertyValuesHolder rotation6=PropertyValuesHolder.ofFloat("rotationX",0,360);
    ObjectAnimator animator=ObjectAnimator.ofPropertyValuesHolder(getTarget(), rotation6);
    animator.setInterpolator(new LinearInterpolator());
    animator.setRepeatCount(-1);
    animator.setDuration(1500);
    animator.start();
    List<Animator> animators=new ArrayList<>();
    animators.add(animator);
    return animators;
}
 
开发者ID:cowthan,项目名称:AyoSunny,代码行数:13,代码来源:BallPulseRiseIndicator.java


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