本文整理汇总了Java中android.view.animation.ScaleAnimation.setRepeatMode方法的典型用法代码示例。如果您正苦于以下问题:Java ScaleAnimation.setRepeatMode方法的具体用法?Java ScaleAnimation.setRepeatMode怎么用?Java ScaleAnimation.setRepeatMode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.view.animation.ScaleAnimation
的用法示例。
在下文中一共展示了ScaleAnimation.setRepeatMode方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: ScaleLoadingLayout
import android.view.animation.ScaleAnimation; //导入方法依赖的package包/类
public ScaleLoadingLayout(Context context, Mode mode, Orientation scrollDirection, TypedArray attrs) {
super(context, mode, scrollDirection, attrs);
/**创建缩放动画动画*/
mRotateDrawableWhilePulling = attrs.getBoolean(R.styleable.PullToRefresh_ptrRotateDrawableWhilePulling, true);
// mContentLayout.setSca(ScaleType.MATRIX);
// mHeaderImageMatrix = new Matrix();
// mHeaderImage.setImageMatrix(mHeaderImageMatrix);
mScalAnimation = new ScaleAnimation(BASE_SCALE, 1, Animation.RELATIVE_TO_SELF, BASE_SCALE, Animation.RELATIVE_TO_SELF,
1);
mScalAnimation.setInterpolator(ANIMATION_INTERPOLATOR);
mScalAnimation.setDuration(ROTATION_ANIMATION_DURATION);
mScalAnimation.setRepeatCount(Animation.INFINITE);
mScalAnimation.setRepeatMode(Animation.RESTART);
}
示例2: onSizeChanged
import android.view.animation.ScaleAnimation; //导入方法依赖的package包/类
@Override
protected void onSizeChanged(int w, int h, int oldw, int oldh) {
super.onSizeChanged(w, h, oldw, oldh);
WIDTH = w;
HEIGHT = h;
scaleAnimation = new ScaleAnimation(1.0f, zoomScale, 1.0f, zoomScale, w / 2, h / 2);
scaleAnimation.setDuration(zoomDuration);
scaleAnimation.setRepeatMode(Animation.REVERSE);
scaleAnimation.setRepeatCount(1);
}
示例3: 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;
}
示例4: onSizeChanged
import android.view.animation.ScaleAnimation; //导入方法依赖的package包/类
@Override
protected void onSizeChanged(int w, int h, int oldw, int oldh)
{
super.onSizeChanged(w, h, oldw, oldh);
WIDTH = w;
HEIGHT = h;
scaleAnimation = new ScaleAnimation(1.0f, zoomScale, 1.0f, zoomScale, w / 2, h / 2);
scaleAnimation.setDuration(zoomDuration);
scaleAnimation.setRepeatMode(Animation.REVERSE);
scaleAnimation.setRepeatCount(1);
}
示例5: animationScale
import android.view.animation.ScaleAnimation; //导入方法依赖的package包/类
public static void animationScale(View view, float sizeIn, float sizeOut, int duration) {
ScaleAnimation scaleAnimation = new ScaleAnimation(sizeIn, sizeOut, sizeIn, sizeOut,
Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);
scaleAnimation.setDuration(duration);
scaleAnimation.setRepeatMode(Animation.REVERSE);
scaleAnimation.setRepeatCount(Animation.INFINITE);
view.startAnimation(scaleAnimation);
}
示例6: scale
import android.view.animation.ScaleAnimation; //导入方法依赖的package包/类
private void scale(View v) {
ScaleAnimation scaleAnimation = new ScaleAnimation(1, 1, 1, 0.9f,
Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF,
1.2f);
scaleAnimation.setRepeatMode(Animation.REVERSE);
scaleAnimation.setInterpolator(new AccelerateInterpolator());
scaleAnimation.setDuration(150);
scaleAnimation.setRepeatCount(-1);
v.startAnimation(scaleAnimation);
}