本文整理汇总了Java中android.view.animation.ScaleAnimation.setStartOffset方法的典型用法代码示例。如果您正苦于以下问题:Java ScaleAnimation.setStartOffset方法的具体用法?Java ScaleAnimation.setStartOffset怎么用?Java ScaleAnimation.setStartOffset使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.view.animation.ScaleAnimation
的用法示例。
在下文中一共展示了ScaleAnimation.setStartOffset方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: 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;
}
示例2: randomScale
import android.view.animation.ScaleAnimation; //导入方法依赖的package包/类
private ScaleAnimation randomScale() {
float scaleTo = (float) (0.3f + Math.random() * 0.5f);
ScaleAnimation scale = new ScaleAnimation(1, scaleTo, 1, scaleTo, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);
scale.setRepeatCount(Animation.INFINITE);
scale.setRepeatMode(Animation.REVERSE);
scale.setStartOffset(1000);
scale.setDuration((int) (Math.random() * 3000) + 1000);
return scale;
}
示例3: 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;
}
示例4: addTextZoomAnimations
import android.view.animation.ScaleAnimation; //导入方法依赖的package包/类
private void addTextZoomAnimations(AnimationSet set) {
ScaleAnimation mScaleAnim = new ScaleAnimation(1, SCALE_AMOUNT, 1f, SCALE_AMOUNT, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);
mScaleAnim.setDuration(CHARACTER_ANIM_DURATION);
set.addAnimation(mScaleAnim);
ScaleAnimation mScaleDownAnim = new ScaleAnimation(1, SCALE_AMOUNT, 1f, SCALE_AMOUNT, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);
mScaleDownAnim.setDuration(CHARACTER_ANIM_DURATION);
mScaleDownAnim.setStartOffset(CHARACTER_ANIM_DURATION + 20);
mScaleDownAnim.setFillAfter(true);
set.addAnimation(mScaleDownAnim);
set.setInterpolator(interpolator);
}
示例5: addLoopScaleAnimations
import android.view.animation.ScaleAnimation; //导入方法依赖的package包/类
private void addLoopScaleAnimations(long duration, AnimationSet set) {
ScaleAnimation mScaleAnim = new ScaleAnimation(1, SCALE_AMOUNT, 1f, SCALE_AMOUNT, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);
mScaleAnim.setDuration(duration);
set.addAnimation(mScaleAnim);
ScaleAnimation mScaleDownAnim = new ScaleAnimation(SCALE_AMOUNT, 1, SCALE_AMOUNT, 1, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);
mScaleDownAnim.setDuration(duration);
mScaleDownAnim.setStartOffset(duration + 50);
set.addAnimation(mScaleDownAnim);
set.setInterpolator(interpolator);
}
示例6: getZoomInAnimation
import android.view.animation.ScaleAnimation; //导入方法依赖的package包/类
private ScaleAnimation getZoomInAnimation(long startOffset, long touchTime) {
ScaleAnimation zoomIn = new ScaleAnimation(SCALE_FACTOR, 1f, SCALE_FACTOR, 1f);
zoomIn.setStartOffset(startOffset+SCALE_DURATION+touchTime);
zoomIn.setDuration(SCALE_DURATION);
zoomIn.setFillAfter(true);
return zoomIn;
}