本文整理匯總了Java中com.actionbarsherlock.internal.nineoldandroids.animation.Keyframe.ObjectKeyframe類的典型用法代碼示例。如果您正苦於以下問題:Java ObjectKeyframe類的具體用法?Java ObjectKeyframe怎麽用?Java ObjectKeyframe使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
ObjectKeyframe類屬於com.actionbarsherlock.internal.nineoldandroids.animation.Keyframe包,在下文中一共展示了ObjectKeyframe類的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: ofObject
import com.actionbarsherlock.internal.nineoldandroids.animation.Keyframe.ObjectKeyframe; //導入依賴的package包/類
public static KeyframeSet ofObject(Object... values) {
int numKeyframes = values.length;
ObjectKeyframe keyframes[] = new ObjectKeyframe[Math.max(numKeyframes,2)];
if (numKeyframes == 1) {
keyframes[0] = (ObjectKeyframe) Keyframe.ofObject(0f);
keyframes[1] = (ObjectKeyframe) Keyframe.ofObject(1f, values[0]);
} else {
keyframes[0] = (ObjectKeyframe) Keyframe.ofObject(0f, values[0]);
for (int i = 1; i < numKeyframes; ++i) {
keyframes[i] = (ObjectKeyframe) Keyframe.ofObject((float) i / (numKeyframes - 1), values[i]);
}
}
return new KeyframeSet(keyframes);
}
示例2: ofObject
import com.actionbarsherlock.internal.nineoldandroids.animation.Keyframe.ObjectKeyframe; //導入依賴的package包/類
public static KeyframeSet ofObject(Object... values) {
int numKeyframes = values.length;
ObjectKeyframe keyframes[] = new ObjectKeyframe[Math.max(numKeyframes, 2)];
if (numKeyframes == 1) {
keyframes[0] = (ObjectKeyframe) Keyframe.ofObject(0f);
keyframes[1] = (ObjectKeyframe) Keyframe.ofObject(1f, values[0]);
} else {
keyframes[0] = (ObjectKeyframe) Keyframe.ofObject(0f, values[0]);
for (int i = 1; i < numKeyframes; ++i) {
keyframes[i] = (ObjectKeyframe) Keyframe.ofObject((float) i / (numKeyframes - 1), values[i]);
}
}
return new KeyframeSet(keyframes);
}