本文整理汇总了Java中android.view.animation.ScaleAnimation.setAnimationListener方法的典型用法代码示例。如果您正苦于以下问题:Java ScaleAnimation.setAnimationListener方法的具体用法?Java ScaleAnimation.setAnimationListener怎么用?Java ScaleAnimation.setAnimationListener使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.view.animation.ScaleAnimation
的用法示例。
在下文中一共展示了ScaleAnimation.setAnimationListener方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getLessenScaleAnimation
import android.view.animation.ScaleAnimation; //导入方法依赖的package包/类
/**
* Get a shrink animation
*
* @param durationMillis duration
* @param animationListener Animation monitor
* @return A shrink animation
*/
public static ScaleAnimation getLessenScaleAnimation(long durationMillis, Animation.AnimationListener animationListener) {
ScaleAnimation scaleAnimation = new ScaleAnimation(1.0f, 0.0f, 1.0f,
0.0f, ScaleAnimation.RELATIVE_TO_SELF,
ScaleAnimation.RELATIVE_TO_SELF);
scaleAnimation.setDuration(durationMillis);
scaleAnimation.setAnimationListener(animationListener);
return scaleAnimation;
}
示例2: getAmplificationAnimation
import android.view.animation.ScaleAnimation; //导入方法依赖的package包/类
/**
* Get an enlarged animation
*
* @param durationMillis duration
* @param animationListener Animation monitor
* @return An enlarged animation
*/
public static ScaleAnimation getAmplificationAnimation(long durationMillis, Animation.AnimationListener animationListener) {
ScaleAnimation scaleAnimation = new ScaleAnimation(0.0f, 1.0f, 0.0f,
1.0f, ScaleAnimation.RELATIVE_TO_SELF,
ScaleAnimation.RELATIVE_TO_SELF);
scaleAnimation.setDuration(durationMillis);
scaleAnimation.setAnimationListener(animationListener);
return scaleAnimation;
}
示例3: scaleBigAnim
import android.view.animation.ScaleAnimation; //导入方法依赖的package包/类
/**
* 放大动画
*
* @param v view
* @param listener listener
*/
static void scaleBigAnim(View v, Animation.AnimationListener listener) {
ScaleAnimation an2 = new ScaleAnimation(0.8f, 1f, 0.8f, 1f,
Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);
an2.setDuration(200);
an2.setFillAfter(true);
v.startAnimation(an2);
an2.setAnimationListener(listener);
}
示例4: getLessenScaleAnimation
import android.view.animation.ScaleAnimation; //导入方法依赖的package包/类
/**
* 获取一个缩小动画
*
* @param durationMillis 时间
* @param animationListener 监听
* @return 一个缩小动画
*/
public static ScaleAnimation getLessenScaleAnimation(long durationMillis, AnimationListener animationListener) {
ScaleAnimation scaleAnimation = new ScaleAnimation(1.0f, 0.0f, 1.0f, 0.0f, ScaleAnimation.RELATIVE_TO_SELF, ScaleAnimation.RELATIVE_TO_SELF);
scaleAnimation.setDuration(durationMillis);
scaleAnimation.setAnimationListener(animationListener);
return scaleAnimation;
}
示例5: getScaleAnimation
import android.view.animation.ScaleAnimation; //导入方法依赖的package包/类
/**
* 获取一个放大动画
*
* @param durationMillis 时间
* @param animationListener 监听
* @return 返回一个放大的效果
*/
public static ScaleAnimation getScaleAnimation(long durationMillis, AnimationListener animationListener) {
ScaleAnimation scaleAnimation = new ScaleAnimation(0.0f, 1.0f, 0.0f, 1.0f, ScaleAnimation.RELATIVE_TO_SELF, ScaleAnimation.RELATIVE_TO_SELF);
scaleAnimation.setDuration(durationMillis);
scaleAnimation.setAnimationListener(animationListener);
return scaleAnimation;
}