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


Java PropertyValuesHolder.ofFloat方法代码示例

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


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

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

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

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

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

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

示例6: viewScaleAnimation

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

示例7: move

import com.nineoldandroids.animation.PropertyValuesHolder; //导入方法依赖的package包/类
private void move(boolean isFrom, String strX, String strY) {
    float currentX = ViewHelper.getX(view);
    float currentY = ViewHelper.getY(view);

    PropertyValuesHolder x = PropertyValuesHolder.ofFloat(strX, !isFrom ? currentX : floatTargets[0], isFrom ? currentX : floatTargets[0]);
    PropertyValuesHolder y = PropertyValuesHolder.ofFloat(strY, !isFrom ? currentY : floatTargets[1], isFrom ? currentY : floatTargets[1]);
    setValues(x, y);
    addListener(strX, strY);
}
 
开发者ID:canyinghao,项目名称:CanAnimation,代码行数:10,代码来源:CanValueAnimator.java

示例8: scale

import com.nineoldandroids.animation.PropertyValuesHolder; //导入方法依赖的package包/类
private void scale(boolean isFrom, String strX, String strY) {
    float currentScaleX = ViewHelper.getScaleX(view);
    float currentScaleY = ViewHelper.getScaleY(view);
    PropertyValuesHolder scaleX = PropertyValuesHolder.ofFloat(strX, !isFrom ? currentScaleX : floatTargets[0], isFrom ? currentScaleX : floatTargets[0]);
    PropertyValuesHolder scaleY = PropertyValuesHolder.ofFloat(strY, !isFrom ? currentScaleY : floatTargets[1], isFrom ? currentScaleY : floatTargets[1]);
    setValues(scaleX, scaleY);
    addListener(strX, strY);
}
 
开发者ID:canyinghao,项目名称:CanAnimation,代码行数:9,代码来源:CanValueAnimator.java


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