public class AnimHelper
extends java.lang.Object
限定符和类型 | 类和说明 |
---|---|
static class |
AnimHelper.TuSdkViewAnimatorAdapter
动画监听
|
构造器和说明 |
---|
AnimHelper() |
限定符和类型 | 方法和说明 |
---|---|
static androidx.core.view.ViewPropertyAnimatorCompat |
alphaAnimator(android.view.View view,
int duration,
float start,
float end)
执行透明动画
|
static void |
alphaHidden(android.view.View view)
隐藏视图动画
|
static android.view.animation.Animation |
alphAnimation(boolean isHidden,
int durationMillis)
获取透明动画
|
static void |
alphaShow(android.view.View view)
显示视图动画
|
static void |
clear(android.view.View view)
清除动画
|
static void |
clearAnimation(android.view.View view)
清除动画
|
static android.view.animation.Animation |
getResAnima(android.content.Context context,
int id)
获取资源动画
|
static android.view.animation.Animation |
heightAnimation(android.view.View view,
int toHeight)
高度动画
|
static android.view.animation.Animation |
offsetYPullAnimation(int durationMillis,
boolean isHidden,
boolean isTop)
视图头部或尾部拉伸动画
|
static void |
removeViewAnimtor(android.view.View view,
android.animation.Animator.AnimatorListener delegate)
删除视图动画
|
static void |
rotate3dAnimtor(android.view.View view,
int durationMillis,
float startY,
float endY,
float startScale,
float endScale,
android.animation.Animator.AnimatorListener delegate)
执行视图3D旋转缩放
|
static void |
rotate3dView(android.view.View view,
int durationMillis,
android.view.animation.Animation.AnimationListener delegate)
执行视图3D旋转
|
static void |
rotate3dView(android.view.View view,
int durationMillis,
float start,
float end,
boolean reverse,
android.view.animation.Animation.AnimationListener delegate)
执行视图3D旋转
AnimHelper.rotate3dView(this.getRootView(), 150, 0, -90, true,
new AnimationListenerAdapter()
{
@Override
public void onAnimationEnd(Animation animation)
{
presentActivity(intent, null, isDestory);
}
});
AnimHelper.rotate3dView(this.getRootView(), 150, 90, 0, false, null);
|
static androidx.core.view.ViewPropertyAnimatorCompat |
rotateAnimation(android.view.View view,
InterfaceOrientation orien,
int duration)
旋转动画
|
static android.view.animation.Animation |
scaleAlphaAnimation(int durationMillis,
boolean isPush)
缩放渐隐动画
|
static android.view.animation.Animation |
shakeAnimation(int counts)
晃动动画
|
static void |
startHeightAnim(android.view.View view,
int toHeight,
int duration)
开始高度伸缩动画
|
public static android.view.animation.Animation getResAnima(android.content.Context context, int id)
context
- id
- public static void clearAnimation(android.view.View view)
view
- public static android.view.animation.Animation shakeAnimation(int counts)
counts
- 1秒钟晃动多少下public static android.view.animation.Animation heightAnimation(android.view.View view, int toHeight)
view
- toHeight
- public static android.view.animation.Animation alphAnimation(boolean isHidden, int durationMillis)
isHidden
- durationMillis
- public static androidx.core.view.ViewPropertyAnimatorCompat alphaAnimator(android.view.View view, int duration, float start, float end)
view
- duration
- start
- end
- public static void alphaHidden(android.view.View view)
view
- public static void alphaShow(android.view.View view)
view
- public static androidx.core.view.ViewPropertyAnimatorCompat rotateAnimation(android.view.View view, InterfaceOrientation orien, int duration)
view
- orien
- duration
- public static android.view.animation.Animation offsetYPullAnimation(int durationMillis, boolean isHidden, boolean isTop)
durationMillis
- 动画持续时间isHidden
- 是否隐藏isTop
- 是否为头部视图public static android.view.animation.Animation scaleAlphaAnimation(int durationMillis, boolean isPush)
durationMillis
- 持续时间isPush
- 是否为显示动画public static void rotate3dView(android.view.View view, int durationMillis, android.view.animation.Animation.AnimationListener delegate)
view
- durationMillis
- delegate
- public static void rotate3dView(android.view.View view, int durationMillis, float start, float end, boolean reverse, android.view.animation.Animation.AnimationListener delegate)
AnimHelper.rotate3dView(this.getRootView(), 150, 0, -90, true, new AnimationListenerAdapter() { @Override public void onAnimationEnd(Animation animation) { presentActivity(intent, null, isDestory); } }); AnimHelper.rotate3dView(this.getRootView(), 150, 90, 0, false, null);
context
- view
- durationMillis
- start
- end
- reverse
- delegate
- public static void rotate3dAnimtor(android.view.View view, int durationMillis, float startY, float endY, float startScale, float endScale, android.animation.Animator.AnimatorListener delegate)
view
- durationMillis
- startY
- endY
- startScale
- endScale
- delegate
- public static void removeViewAnimtor(android.view.View view, android.animation.Animator.AnimatorListener delegate)
view
- delegate
- public static void clear(android.view.View view)
view
- public static void startHeightAnim(android.view.View view, int toHeight, int duration)
view
- toHeight
- duration
-