Java 类com.nineoldandroids.animation.Keyframe.IntKeyframe 实例源码

项目:exciting-app    文件:KeyframeSet.java   
public static KeyframeSet ofInt(int... values) {
    int numKeyframes = values.length;
    IntKeyframe keyframes[] = new IntKeyframe[Math.max(numKeyframes,2)];
    if (numKeyframes == 1) {
        keyframes[0] = (IntKeyframe) Keyframe.ofInt(0f);
        keyframes[1] = (IntKeyframe) Keyframe.ofInt(1f, values[0]);
    } else {
        keyframes[0] = (IntKeyframe) Keyframe.ofInt(0f, values[0]);
        for (int i = 1; i < numKeyframes; ++i) {
            keyframes[i] = (IntKeyframe) Keyframe.ofInt((float) i / (numKeyframes - 1), values[i]);
        }
    }
    return new IntKeyframeSet(keyframes);
}
项目:exciting-app    文件:KeyframeSet.java   
public static KeyframeSet ofKeyframe(Keyframe... keyframes) {
    // if all keyframes of same primitive type, create the appropriate KeyframeSet
    int numKeyframes = keyframes.length;
    boolean hasFloat = false;
    boolean hasInt = false;
    boolean hasOther = false;
    for (int i = 0; i < numKeyframes; ++i) {
        if (keyframes[i] instanceof FloatKeyframe) {
            hasFloat = true;
        } else if (keyframes[i] instanceof IntKeyframe) {
            hasInt = true;
        } else {
            hasOther = true;
        }
    }
    if (hasFloat && !hasInt && !hasOther) {
        FloatKeyframe floatKeyframes[] = new FloatKeyframe[numKeyframes];
        for (int i = 0; i < numKeyframes; ++i) {
            floatKeyframes[i] = (FloatKeyframe) keyframes[i];
        }
        return new FloatKeyframeSet(floatKeyframes);
    } else if (hasInt && !hasFloat && !hasOther) {
        IntKeyframe intKeyframes[] = new IntKeyframe[numKeyframes];
        for (int i = 0; i < numKeyframes; ++i) {
            intKeyframes[i] = (IntKeyframe) keyframes[i];
        }
        return new IntKeyframeSet(intKeyframes);
    } else {
        return new KeyframeSet(keyframes);
    }
}
项目:exciting-app    文件:IntKeyframeSet.java   
@Override
public IntKeyframeSet clone() {
    ArrayList<Keyframe> keyframes = mKeyframes;
    int numKeyframes = mKeyframes.size();
    IntKeyframe[] newKeyframes = new IntKeyframe[numKeyframes];
    for (int i = 0; i < numKeyframes; ++i) {
        newKeyframes[i] = (IntKeyframe) keyframes.get(i).clone();
    }
    IntKeyframeSet newSet = new IntKeyframeSet(newKeyframes);
    return newSet;
}
项目:TheSceneryAlong    文件:KeyframeSet.java   
public static KeyframeSet ofInt(int... values) {
    int numKeyframes = values.length;
    IntKeyframe keyframes[] = new IntKeyframe[Math.max(numKeyframes,2)];
    if (numKeyframes == 1) {
        keyframes[0] = (IntKeyframe) Keyframe.ofInt(0f);
        keyframes[1] = (IntKeyframe) Keyframe.ofInt(1f, values[0]);
    } else {
        keyframes[0] = (IntKeyframe) Keyframe.ofInt(0f, values[0]);
        for (int i = 1; i < numKeyframes; ++i) {
            keyframes[i] = (IntKeyframe) Keyframe.ofInt((float) i / (numKeyframes - 1), values[i]);
        }
    }
    return new IntKeyframeSet(keyframes);
}
项目:TheSceneryAlong    文件:KeyframeSet.java   
public static KeyframeSet ofKeyframe(Keyframe... keyframes) {
    // if all keyframes of same primitive type, create the appropriate KeyframeSet
    int numKeyframes = keyframes.length;
    boolean hasFloat = false;
    boolean hasInt = false;
    boolean hasOther = false;
    for (int i = 0; i < numKeyframes; ++i) {
        if (keyframes[i] instanceof FloatKeyframe) {
            hasFloat = true;
        } else if (keyframes[i] instanceof IntKeyframe) {
            hasInt = true;
        } else {
            hasOther = true;
        }
    }
    if (hasFloat && !hasInt && !hasOther) {
        FloatKeyframe floatKeyframes[] = new FloatKeyframe[numKeyframes];
        for (int i = 0; i < numKeyframes; ++i) {
            floatKeyframes[i] = (FloatKeyframe) keyframes[i];
        }
        return new FloatKeyframeSet(floatKeyframes);
    } else if (hasInt && !hasFloat && !hasOther) {
        IntKeyframe intKeyframes[] = new IntKeyframe[numKeyframes];
        for (int i = 0; i < numKeyframes; ++i) {
            intKeyframes[i] = (IntKeyframe) keyframes[i];
        }
        return new IntKeyframeSet(intKeyframes);
    } else {
        return new KeyframeSet(keyframes);
    }
}
项目:TheSceneryAlong    文件:IntKeyframeSet.java   
@Override
public IntKeyframeSet clone() {
    ArrayList<Keyframe> keyframes = mKeyframes;
    int numKeyframes = mKeyframes.size();
    IntKeyframe[] newKeyframes = new IntKeyframe[numKeyframes];
    for (int i = 0; i < numKeyframes; ++i) {
        newKeyframes[i] = (IntKeyframe) keyframes.get(i).clone();
    }
    IntKeyframeSet newSet = new IntKeyframeSet(newKeyframes);
    return newSet;
}
项目:WeiboWeiBaTong    文件:KeyframeSet.java   
public static KeyframeSet ofInt(int... values) {
    int numKeyframes = values.length;
    IntKeyframe keyframes[] = new IntKeyframe[Math.max(numKeyframes,2)];
    if (numKeyframes == 1) {
        keyframes[0] = (IntKeyframe) Keyframe.ofInt(0f);
        keyframes[1] = (IntKeyframe) Keyframe.ofInt(1f, values[0]);
    } else {
        keyframes[0] = (IntKeyframe) Keyframe.ofInt(0f, values[0]);
        for (int i = 1; i < numKeyframes; ++i) {
            keyframes[i] = (IntKeyframe) Keyframe.ofInt((float) i / (numKeyframes - 1), values[i]);
        }
    }
    return new IntKeyframeSet(keyframes);
}
项目:WeiboWeiBaTong    文件:KeyframeSet.java   
public static KeyframeSet ofKeyframe(Keyframe... keyframes) {
    // if all keyframes of same primitive type, create the appropriate KeyframeSet
    int numKeyframes = keyframes.length;
    boolean hasFloat = false;
    boolean hasInt = false;
    boolean hasOther = false;
    for (int i = 0; i < numKeyframes; ++i) {
        if (keyframes[i] instanceof FloatKeyframe) {
            hasFloat = true;
        } else if (keyframes[i] instanceof IntKeyframe) {
            hasInt = true;
        } else {
            hasOther = true;
        }
    }
    if (hasFloat && !hasInt && !hasOther) {
        FloatKeyframe floatKeyframes[] = new FloatKeyframe[numKeyframes];
        for (int i = 0; i < numKeyframes; ++i) {
            floatKeyframes[i] = (FloatKeyframe) keyframes[i];
        }
        return new FloatKeyframeSet(floatKeyframes);
    } else if (hasInt && !hasFloat && !hasOther) {
        IntKeyframe intKeyframes[] = new IntKeyframe[numKeyframes];
        for (int i = 0; i < numKeyframes; ++i) {
            intKeyframes[i] = (IntKeyframe) keyframes[i];
        }
        return new IntKeyframeSet(intKeyframes);
    } else {
        return new KeyframeSet(keyframes);
    }
}
项目:WeiboWeiBaTong    文件:IntKeyframeSet.java   
@Override
public IntKeyframeSet clone() {
    ArrayList<Keyframe> keyframes = mKeyframes;
    int numKeyframes = mKeyframes.size();
    IntKeyframe[] newKeyframes = new IntKeyframe[numKeyframes];
    for (int i = 0; i < numKeyframes; ++i) {
        newKeyframes[i] = (IntKeyframe) keyframes.get(i).clone();
    }
    IntKeyframeSet newSet = new IntKeyframeSet(newKeyframes);
    return newSet;
}
项目:CouldBooks    文件:KeyframeSet.java   
public static KeyframeSet ofInt(int... values) {
    int numKeyframes = values.length;
    IntKeyframe keyframes[] = new IntKeyframe[Math.max(numKeyframes,2)];
    if (numKeyframes == 1) {
        keyframes[0] = (IntKeyframe) Keyframe.ofInt(0f);
        keyframes[1] = (IntKeyframe) Keyframe.ofInt(1f, values[0]);
    } else {
        keyframes[0] = (IntKeyframe) Keyframe.ofInt(0f, values[0]);
        for (int i = 1; i < numKeyframes; ++i) {
            keyframes[i] = (IntKeyframe) Keyframe.ofInt((float) i / (numKeyframes - 1), values[i]);
        }
    }
    return new IntKeyframeSet(keyframes);
}
项目:CouldBooks    文件:KeyframeSet.java   
public static KeyframeSet ofKeyframe(Keyframe... keyframes) {
    // if all keyframes of same primitive type, create the appropriate KeyframeSet
    int numKeyframes = keyframes.length;
    boolean hasFloat = false;
    boolean hasInt = false;
    boolean hasOther = false;
    for (int i = 0; i < numKeyframes; ++i) {
        if (keyframes[i] instanceof FloatKeyframe) {
            hasFloat = true;
        } else if (keyframes[i] instanceof IntKeyframe) {
            hasInt = true;
        } else {
            hasOther = true;
        }
    }
    if (hasFloat && !hasInt && !hasOther) {
        FloatKeyframe floatKeyframes[] = new FloatKeyframe[numKeyframes];
        for (int i = 0; i < numKeyframes; ++i) {
            floatKeyframes[i] = (FloatKeyframe) keyframes[i];
        }
        return new FloatKeyframeSet(floatKeyframes);
    } else if (hasInt && !hasFloat && !hasOther) {
        IntKeyframe intKeyframes[] = new IntKeyframe[numKeyframes];
        for (int i = 0; i < numKeyframes; ++i) {
            intKeyframes[i] = (IntKeyframe) keyframes[i];
        }
        return new IntKeyframeSet(intKeyframes);
    } else {
        return new KeyframeSet(keyframes);
    }
}
项目:CouldBooks    文件:IntKeyframeSet.java   
@Override
public IntKeyframeSet clone() {
    ArrayList<Keyframe> keyframes = mKeyframes;
    int numKeyframes = mKeyframes.size();
    IntKeyframe[] newKeyframes = new IntKeyframe[numKeyframes];
    for (int i = 0; i < numKeyframes; ++i) {
        newKeyframes[i] = (IntKeyframe) keyframes.get(i).clone();
    }
    IntKeyframeSet newSet = new IntKeyframeSet(newKeyframes);
    return newSet;
}
项目:PaperOrPlastic    文件:KeyframeSet.java   
public static KeyframeSet ofInt(int... values) {
    int numKeyframes = values.length;
    IntKeyframe keyframes[] = new IntKeyframe[Math.max(numKeyframes,2)];
    if (numKeyframes == 1) {
        keyframes[0] = (IntKeyframe) Keyframe.ofInt(0f);
        keyframes[1] = (IntKeyframe) Keyframe.ofInt(1f, values[0]);
    } else {
        keyframes[0] = (IntKeyframe) Keyframe.ofInt(0f, values[0]);
        for (int i = 1; i < numKeyframes; ++i) {
            keyframes[i] = (IntKeyframe) Keyframe.ofInt((float) i / (numKeyframes - 1), values[i]);
        }
    }
    return new IntKeyframeSet(keyframes);
}
项目:PaperOrPlastic    文件:KeyframeSet.java   
public static KeyframeSet ofKeyframe(Keyframe... keyframes) {
    // if all keyframes of same primitive type, create the appropriate KeyframeSet
    int numKeyframes = keyframes.length;
    boolean hasFloat = false;
    boolean hasInt = false;
    boolean hasOther = false;
    for (int i = 0; i < numKeyframes; ++i) {
        if (keyframes[i] instanceof FloatKeyframe) {
            hasFloat = true;
        } else if (keyframes[i] instanceof IntKeyframe) {
            hasInt = true;
        } else {
            hasOther = true;
        }
    }
    if (hasFloat && !hasInt && !hasOther) {
        FloatKeyframe floatKeyframes[] = new FloatKeyframe[numKeyframes];
        for (int i = 0; i < numKeyframes; ++i) {
            floatKeyframes[i] = (FloatKeyframe) keyframes[i];
        }
        return new FloatKeyframeSet(floatKeyframes);
    } else if (hasInt && !hasFloat && !hasOther) {
        IntKeyframe intKeyframes[] = new IntKeyframe[numKeyframes];
        for (int i = 0; i < numKeyframes; ++i) {
            intKeyframes[i] = (IntKeyframe) keyframes[i];
        }
        return new IntKeyframeSet(intKeyframes);
    } else {
        return new KeyframeSet(keyframes);
    }
}
项目:PaperOrPlastic    文件:IntKeyframeSet.java   
@Override
public IntKeyframeSet clone() {
    ArrayList<Keyframe> keyframes = mKeyframes;
    int numKeyframes = mKeyframes.size();
    IntKeyframe[] newKeyframes = new IntKeyframe[numKeyframes];
    for (int i = 0; i < numKeyframes; ++i) {
        newKeyframes[i] = (IntKeyframe) keyframes.get(i).clone();
    }
    IntKeyframeSet newSet = new IntKeyframeSet(newKeyframes);
    return newSet;
}
项目:NineOldAndroids-master    文件:KeyframeSet.java   
public static KeyframeSet ofInt(int... values) {
    int numKeyframes = values.length;
    IntKeyframe keyframes[] = new IntKeyframe[Math.max(numKeyframes,2)];
    if (numKeyframes == 1) {
        keyframes[0] = (IntKeyframe) Keyframe.ofInt(0f);
        keyframes[1] = (IntKeyframe) Keyframe.ofInt(1f, values[0]);
    } else {
        keyframes[0] = (IntKeyframe) Keyframe.ofInt(0f, values[0]);
        for (int i = 1; i < numKeyframes; ++i) {
            keyframes[i] = (IntKeyframe) Keyframe.ofInt((float) i / (numKeyframes - 1), values[i]);
        }
    }
    return new IntKeyframeSet(keyframes);
}
项目:NineOldAndroids-master    文件:KeyframeSet.java   
public static KeyframeSet ofKeyframe(Keyframe... keyframes) {
    // if all keyframes of same primitive type, create the appropriate KeyframeSet
    int numKeyframes = keyframes.length;
    boolean hasFloat = false;
    boolean hasInt = false;
    boolean hasOther = false;
    for (int i = 0; i < numKeyframes; ++i) {
        if (keyframes[i] instanceof FloatKeyframe) {
            hasFloat = true;
        } else if (keyframes[i] instanceof IntKeyframe) {
            hasInt = true;
        } else {
            hasOther = true;
        }
    }
    if (hasFloat && !hasInt && !hasOther) {
        FloatKeyframe floatKeyframes[] = new FloatKeyframe[numKeyframes];
        for (int i = 0; i < numKeyframes; ++i) {
            floatKeyframes[i] = (FloatKeyframe) keyframes[i];
        }
        return new FloatKeyframeSet(floatKeyframes);
    } else if (hasInt && !hasFloat && !hasOther) {
        IntKeyframe intKeyframes[] = new IntKeyframe[numKeyframes];
        for (int i = 0; i < numKeyframes; ++i) {
            intKeyframes[i] = (IntKeyframe) keyframes[i];
        }
        return new IntKeyframeSet(intKeyframes);
    } else {
        return new KeyframeSet(keyframes);
    }
}
项目:NineOldAndroids-master    文件:IntKeyframeSet.java   
@Override
public IntKeyframeSet clone() {
    ArrayList<Keyframe> keyframes = mKeyframes;
    int numKeyframes = mKeyframes.size();
    IntKeyframe[] newKeyframes = new IntKeyframe[numKeyframes];
    for (int i = 0; i < numKeyframes; ++i) {
        newKeyframes[i] = (IntKeyframe) keyframes.get(i).clone();
    }
    IntKeyframeSet newSet = new IntKeyframeSet(newKeyframes);
    return newSet;
}
项目:mc_backup    文件:KeyframeSet.java   
public static KeyframeSet ofInt(int... values) {
    int numKeyframes = values.length;
    IntKeyframe keyframes[] = new IntKeyframe[Math.max(numKeyframes,2)];
    if (numKeyframes == 1) {
        keyframes[0] = (IntKeyframe) Keyframe.ofInt(0f);
        keyframes[1] = (IntKeyframe) Keyframe.ofInt(1f, values[0]);
    } else {
        keyframes[0] = (IntKeyframe) Keyframe.ofInt(0f, values[0]);
        for (int i = 1; i < numKeyframes; ++i) {
            keyframes[i] = (IntKeyframe) Keyframe.ofInt((float) i / (numKeyframes - 1), values[i]);
        }
    }
    return new IntKeyframeSet(keyframes);
}
项目:mc_backup    文件:KeyframeSet.java   
public static KeyframeSet ofKeyframe(Keyframe... keyframes) {
    // if all keyframes of same primitive type, create the appropriate KeyframeSet
    int numKeyframes = keyframes.length;
    boolean hasFloat = false;
    boolean hasInt = false;
    boolean hasOther = false;
    for (int i = 0; i < numKeyframes; ++i) {
        if (keyframes[i] instanceof FloatKeyframe) {
            hasFloat = true;
        } else if (keyframes[i] instanceof IntKeyframe) {
            hasInt = true;
        } else {
            hasOther = true;
        }
    }
    if (hasFloat && !hasInt && !hasOther) {
        FloatKeyframe floatKeyframes[] = new FloatKeyframe[numKeyframes];
        for (int i = 0; i < numKeyframes; ++i) {
            floatKeyframes[i] = (FloatKeyframe) keyframes[i];
        }
        return new FloatKeyframeSet(floatKeyframes);
    } else if (hasInt && !hasFloat && !hasOther) {
        IntKeyframe intKeyframes[] = new IntKeyframe[numKeyframes];
        for (int i = 0; i < numKeyframes; ++i) {
            intKeyframes[i] = (IntKeyframe) keyframes[i];
        }
        return new IntKeyframeSet(intKeyframes);
    } else {
        return new KeyframeSet(keyframes);
    }
}
项目:mc_backup    文件:IntKeyframeSet.java   
@Override
public IntKeyframeSet clone() {
    ArrayList<Keyframe> keyframes = mKeyframes;
    int numKeyframes = mKeyframes.size();
    IntKeyframe[] newKeyframes = new IntKeyframe[numKeyframes];
    for (int i = 0; i < numKeyframes; ++i) {
        newKeyframes[i] = (IntKeyframe) keyframes.get(i).clone();
    }
    IntKeyframeSet newSet = new IntKeyframeSet(newKeyframes);
    return newSet;
}
项目:Mover    文件:KeyframeSet.java   
public static KeyframeSet ofInt(int... values) {
    int numKeyframes = values.length;
    IntKeyframe keyframes[] = new IntKeyframe[Math.max(numKeyframes,2)];
    if (numKeyframes == 1) {
        keyframes[0] = (IntKeyframe) Keyframe.ofInt(0f);
        keyframes[1] = (IntKeyframe) Keyframe.ofInt(1f, values[0]);
    } else {
        keyframes[0] = (IntKeyframe) Keyframe.ofInt(0f, values[0]);
        for (int i = 1; i < numKeyframes; ++i) {
            keyframes[i] = (IntKeyframe) Keyframe.ofInt((float) i / (numKeyframes - 1), values[i]);
        }
    }
    return new IntKeyframeSet(keyframes);
}
项目:Mover    文件:KeyframeSet.java   
public static KeyframeSet ofKeyframe(Keyframe... keyframes) {
    // if all keyframes of same primitive type, create the appropriate KeyframeSet
    int numKeyframes = keyframes.length;
    boolean hasFloat = false;
    boolean hasInt = false;
    boolean hasOther = false;
    for (int i = 0; i < numKeyframes; ++i) {
        if (keyframes[i] instanceof FloatKeyframe) {
            hasFloat = true;
        } else if (keyframes[i] instanceof IntKeyframe) {
            hasInt = true;
        } else {
            hasOther = true;
        }
    }
    if (hasFloat && !hasInt && !hasOther) {
        FloatKeyframe floatKeyframes[] = new FloatKeyframe[numKeyframes];
        for (int i = 0; i < numKeyframes; ++i) {
            floatKeyframes[i] = (FloatKeyframe) keyframes[i];
        }
        return new FloatKeyframeSet(floatKeyframes);
    } else if (hasInt && !hasFloat && !hasOther) {
        IntKeyframe intKeyframes[] = new IntKeyframe[numKeyframes];
        for (int i = 0; i < numKeyframes; ++i) {
            intKeyframes[i] = (IntKeyframe) keyframes[i];
        }
        return new IntKeyframeSet(intKeyframes);
    } else {
        return new KeyframeSet(keyframes);
    }
}
项目:Mover    文件:IntKeyframeSet.java   
@Override
public IntKeyframeSet clone() {
    ArrayList<Keyframe> keyframes = mKeyframes;
    int numKeyframes = mKeyframes.size();
    IntKeyframe[] newKeyframes = new IntKeyframe[numKeyframes];
    for (int i = 0; i < numKeyframes; ++i) {
        newKeyframes[i] = (IntKeyframe) keyframes.get(i).clone();
    }
    IntKeyframeSet newSet = new IntKeyframeSet(newKeyframes);
    return newSet;
}
项目:WeiboWeiBaTong    文件:KeyframeSet.java   
public static KeyframeSet ofInt(int... values) {
    int numKeyframes = values.length;
    IntKeyframe keyframes[] = new IntKeyframe[Math.max(numKeyframes,2)];
    if (numKeyframes == 1) {
        keyframes[0] = (IntKeyframe) Keyframe.ofInt(0f);
        keyframes[1] = (IntKeyframe) Keyframe.ofInt(1f, values[0]);
    } else {
        keyframes[0] = (IntKeyframe) Keyframe.ofInt(0f, values[0]);
        for (int i = 1; i < numKeyframes; ++i) {
            keyframes[i] = (IntKeyframe) Keyframe.ofInt((float) i / (numKeyframes - 1), values[i]);
        }
    }
    return new IntKeyframeSet(keyframes);
}
项目:WeiboWeiBaTong    文件:KeyframeSet.java   
public static KeyframeSet ofKeyframe(Keyframe... keyframes) {
    // if all keyframes of same primitive type, create the appropriate KeyframeSet
    int numKeyframes = keyframes.length;
    boolean hasFloat = false;
    boolean hasInt = false;
    boolean hasOther = false;
    for (int i = 0; i < numKeyframes; ++i) {
        if (keyframes[i] instanceof FloatKeyframe) {
            hasFloat = true;
        } else if (keyframes[i] instanceof IntKeyframe) {
            hasInt = true;
        } else {
            hasOther = true;
        }
    }
    if (hasFloat && !hasInt && !hasOther) {
        FloatKeyframe floatKeyframes[] = new FloatKeyframe[numKeyframes];
        for (int i = 0; i < numKeyframes; ++i) {
            floatKeyframes[i] = (FloatKeyframe) keyframes[i];
        }
        return new FloatKeyframeSet(floatKeyframes);
    } else if (hasInt && !hasFloat && !hasOther) {
        IntKeyframe intKeyframes[] = new IntKeyframe[numKeyframes];
        for (int i = 0; i < numKeyframes; ++i) {
            intKeyframes[i] = (IntKeyframe) keyframes[i];
        }
        return new IntKeyframeSet(intKeyframes);
    } else {
        return new KeyframeSet(keyframes);
    }
}
项目:WeiboWeiBaTong    文件:IntKeyframeSet.java   
@Override
public IntKeyframeSet clone() {
    ArrayList<Keyframe> keyframes = mKeyframes;
    int numKeyframes = mKeyframes.size();
    IntKeyframe[] newKeyframes = new IntKeyframe[numKeyframes];
    for (int i = 0; i < numKeyframes; ++i) {
        newKeyframes[i] = (IntKeyframe) keyframes.get(i).clone();
    }
    IntKeyframeSet newSet = new IntKeyframeSet(newKeyframes);
    return newSet;
}
项目:OurDailyBread    文件:KeyframeSet.java   
public static KeyframeSet ofInt(int... values) {
    int numKeyframes = values.length;
    IntKeyframe keyframes[] = new IntKeyframe[Math.max(numKeyframes,2)];
    if (numKeyframes == 1) {
        keyframes[0] = (IntKeyframe) Keyframe.ofInt(0f);
        keyframes[1] = (IntKeyframe) Keyframe.ofInt(1f, values[0]);
    } else {
        keyframes[0] = (IntKeyframe) Keyframe.ofInt(0f, values[0]);
        for (int i = 1; i < numKeyframes; ++i) {
            keyframes[i] = (IntKeyframe) Keyframe.ofInt((float) i / (numKeyframes - 1), values[i]);
        }
    }
    return new IntKeyframeSet(keyframes);
}
项目:OurDailyBread    文件:KeyframeSet.java   
public static KeyframeSet ofKeyframe(Keyframe... keyframes) {
    // if all keyframes of same primitive type, create the appropriate KeyframeSet
    int numKeyframes = keyframes.length;
    boolean hasFloat = false;
    boolean hasInt = false;
    boolean hasOther = false;
    for (int i = 0; i < numKeyframes; ++i) {
        if (keyframes[i] instanceof FloatKeyframe) {
            hasFloat = true;
        } else if (keyframes[i] instanceof IntKeyframe) {
            hasInt = true;
        } else {
            hasOther = true;
        }
    }
    if (hasFloat && !hasInt && !hasOther) {
        FloatKeyframe floatKeyframes[] = new FloatKeyframe[numKeyframes];
        for (int i = 0; i < numKeyframes; ++i) {
            floatKeyframes[i] = (FloatKeyframe) keyframes[i];
        }
        return new FloatKeyframeSet(floatKeyframes);
    } else if (hasInt && !hasFloat && !hasOther) {
        IntKeyframe intKeyframes[] = new IntKeyframe[numKeyframes];
        for (int i = 0; i < numKeyframes; ++i) {
            intKeyframes[i] = (IntKeyframe) keyframes[i];
        }
        return new IntKeyframeSet(intKeyframes);
    } else {
        return new KeyframeSet(keyframes);
    }
}
项目:OurDailyBread    文件:IntKeyframeSet.java   
@Override
public IntKeyframeSet clone() {
    ArrayList<Keyframe> keyframes = mKeyframes;
    int numKeyframes = mKeyframes.size();
    IntKeyframe[] newKeyframes = new IntKeyframe[numKeyframes];
    for (int i = 0; i < numKeyframes; ++i) {
        newKeyframes[i] = (IntKeyframe) keyframes.get(i).clone();
    }
    IntKeyframeSet newSet = new IntKeyframeSet(newKeyframes);
    return newSet;
}
项目:rpgpack-android    文件:KeyframeSet.java   
public static KeyframeSet ofInt(int... values) {
    int numKeyframes = values.length;
    IntKeyframe keyframes[] = new IntKeyframe[Math.max(numKeyframes,2)];
    if (numKeyframes == 1) {
        keyframes[0] = (IntKeyframe) Keyframe.ofInt(0f);
        keyframes[1] = (IntKeyframe) Keyframe.ofInt(1f, values[0]);
    } else {
        keyframes[0] = (IntKeyframe) Keyframe.ofInt(0f, values[0]);
        for (int i = 1; i < numKeyframes; ++i) {
            keyframes[i] = (IntKeyframe) Keyframe.ofInt((float) i / (numKeyframes - 1), values[i]);
        }
    }
    return new IntKeyframeSet(keyframes);
}
项目:rpgpack-android    文件:KeyframeSet.java   
public static KeyframeSet ofKeyframe(Keyframe... keyframes) {
    // if all keyframes of same primitive type, create the appropriate KeyframeSet
    int numKeyframes = keyframes.length;
    boolean hasFloat = false;
    boolean hasInt = false;
    boolean hasOther = false;
    for (int i = 0; i < numKeyframes; ++i) {
        if (keyframes[i] instanceof FloatKeyframe) {
            hasFloat = true;
        } else if (keyframes[i] instanceof IntKeyframe) {
            hasInt = true;
        } else {
            hasOther = true;
        }
    }
    if (hasFloat && !hasInt && !hasOther) {
        FloatKeyframe floatKeyframes[] = new FloatKeyframe[numKeyframes];
        for (int i = 0; i < numKeyframes; ++i) {
            floatKeyframes[i] = (FloatKeyframe) keyframes[i];
        }
        return new FloatKeyframeSet(floatKeyframes);
    } else if (hasInt && !hasFloat && !hasOther) {
        IntKeyframe intKeyframes[] = new IntKeyframe[numKeyframes];
        for (int i = 0; i < numKeyframes; ++i) {
            intKeyframes[i] = (IntKeyframe) keyframes[i];
        }
        return new IntKeyframeSet(intKeyframes);
    } else {
        return new KeyframeSet(keyframes);
    }
}
项目:rpgpack-android    文件:IntKeyframeSet.java   
@Override
public IntKeyframeSet clone() {
    ArrayList<Keyframe> keyframes = mKeyframes;
    int numKeyframes = mKeyframes.size();
    IntKeyframe[] newKeyframes = new IntKeyframe[numKeyframes];
    for (int i = 0; i < numKeyframes; ++i) {
        newKeyframes[i] = (IntKeyframe) keyframes.get(i).clone();
    }
    IntKeyframeSet newSet = new IntKeyframeSet(newKeyframes);
    return newSet;
}
项目:expandingList    文件:KeyframeSet.java   
public static KeyframeSet ofInt(int... values) {
    int numKeyframes = values.length;
    IntKeyframe keyframes[] = new IntKeyframe[Math.max(numKeyframes,2)];
    if (numKeyframes == 1) {
        keyframes[0] = (IntKeyframe) Keyframe.ofInt(0f);
        keyframes[1] = (IntKeyframe) Keyframe.ofInt(1f, values[0]);
    } else {
        keyframes[0] = (IntKeyframe) Keyframe.ofInt(0f, values[0]);
        for (int i = 1; i < numKeyframes; ++i) {
            keyframes[i] = (IntKeyframe) Keyframe.ofInt((float) i / (numKeyframes - 1), values[i]);
        }
    }
    return new IntKeyframeSet(keyframes);
}
项目:expandingList    文件:KeyframeSet.java   
public static KeyframeSet ofKeyframe(Keyframe... keyframes) {
    // if all keyframes of same primitive type, create the appropriate KeyframeSet
    int numKeyframes = keyframes.length;
    boolean hasFloat = false;
    boolean hasInt = false;
    boolean hasOther = false;
    for (int i = 0; i < numKeyframes; ++i) {
        if (keyframes[i] instanceof FloatKeyframe) {
            hasFloat = true;
        } else if (keyframes[i] instanceof IntKeyframe) {
            hasInt = true;
        } else {
            hasOther = true;
        }
    }
    if (hasFloat && !hasInt && !hasOther) {
        FloatKeyframe floatKeyframes[] = new FloatKeyframe[numKeyframes];
        for (int i = 0; i < numKeyframes; ++i) {
            floatKeyframes[i] = (FloatKeyframe) keyframes[i];
        }
        return new FloatKeyframeSet(floatKeyframes);
    } else if (hasInt && !hasFloat && !hasOther) {
        IntKeyframe intKeyframes[] = new IntKeyframe[numKeyframes];
        for (int i = 0; i < numKeyframes; ++i) {
            intKeyframes[i] = (IntKeyframe) keyframes[i];
        }
        return new IntKeyframeSet(intKeyframes);
    } else {
        return new KeyframeSet(keyframes);
    }
}
项目:expandingList    文件:IntKeyframeSet.java   
@Override
public IntKeyframeSet clone() {
    ArrayList<Keyframe> keyframes = mKeyframes;
    int numKeyframes = mKeyframes.size();
    IntKeyframe[] newKeyframes = new IntKeyframe[numKeyframes];
    for (int i = 0; i < numKeyframes; ++i) {
        newKeyframes[i] = (IntKeyframe) keyframes.get(i).clone();
    }
    IntKeyframeSet newSet = new IntKeyframeSet(newKeyframes);
    return newSet;
}
项目:Qmusic    文件:KeyframeSet.java   
public static KeyframeSet ofInt(int... values) {
    int numKeyframes = values.length;
    IntKeyframe keyframes[] = new IntKeyframe[Math.max(numKeyframes,2)];
    if (numKeyframes == 1) {
        keyframes[0] = (IntKeyframe) Keyframe.ofInt(0f);
        keyframes[1] = (IntKeyframe) Keyframe.ofInt(1f, values[0]);
    } else {
        keyframes[0] = (IntKeyframe) Keyframe.ofInt(0f, values[0]);
        for (int i = 1; i < numKeyframes; ++i) {
            keyframes[i] = (IntKeyframe) Keyframe.ofInt((float) i / (numKeyframes - 1), values[i]);
        }
    }
    return new IntKeyframeSet(keyframes);
}
项目:Qmusic    文件:KeyframeSet.java   
public static KeyframeSet ofKeyframe(Keyframe... keyframes) {
    // if all keyframes of same primitive type, create the appropriate KeyframeSet
    int numKeyframes = keyframes.length;
    boolean hasFloat = false;
    boolean hasInt = false;
    boolean hasOther = false;
    for (int i = 0; i < numKeyframes; ++i) {
        if (keyframes[i] instanceof FloatKeyframe) {
            hasFloat = true;
        } else if (keyframes[i] instanceof IntKeyframe) {
            hasInt = true;
        } else {
            hasOther = true;
        }
    }
    if (hasFloat && !hasInt && !hasOther) {
        FloatKeyframe floatKeyframes[] = new FloatKeyframe[numKeyframes];
        for (int i = 0; i < numKeyframes; ++i) {
            floatKeyframes[i] = (FloatKeyframe) keyframes[i];
        }
        return new FloatKeyframeSet(floatKeyframes);
    } else if (hasInt && !hasFloat && !hasOther) {
        IntKeyframe intKeyframes[] = new IntKeyframe[numKeyframes];
        for (int i = 0; i < numKeyframes; ++i) {
            intKeyframes[i] = (IntKeyframe) keyframes[i];
        }
        return new IntKeyframeSet(intKeyframes);
    } else {
        return new KeyframeSet(keyframes);
    }
}
项目:Qmusic    文件:IntKeyframeSet.java   
@Override
public IntKeyframeSet clone() {
    ArrayList<Keyframe> keyframes = mKeyframes;
    int numKeyframes = mKeyframes.size();
    IntKeyframe[] newKeyframes = new IntKeyframe[numKeyframes];
    for (int i = 0; i < numKeyframes; ++i) {
        newKeyframes[i] = (IntKeyframe) keyframes.get(i).clone();
    }
    IntKeyframeSet newSet = new IntKeyframeSet(newKeyframes);
    return newSet;
}
项目:exciting-app    文件:IntKeyframeSet.java   
public IntKeyframeSet(IntKeyframe... keyframes) {
    super(keyframes);
}