本文整理匯總了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;
}