Sud*_*kar 2 animation android android-animation
当我启动屏幕时,我需要使用气泡动画显示屏幕上的视图,如放大,缩小,淡入等.
The*_*der 17
在您onCreateView()只需获取整个布局视图getDecorView()并应用下面的动画代码:
ScaleAnimation scale = new ScaleAnimation(0, 1, 0, 1, ScaleAnimation.RELATIVE_TO_SELF, .5f, ScaleAnimation.RELATIVE_TO_SELF, .5f);
scale.setDuration(300);
scale.setInterpolator(new OvershootInterpolator());
Run Code Online (Sandbox Code Playgroud)
将动画应用于视图:
yourView.startAnimation(scale);
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
6888 次 |
| 最近记录: |