小编Nic*_*ick的帖子

Android - 如何在iphone中创建像删除一样的摇动效果?

我有gridView,有很多图像,点击编辑按钮,我希望图像摆动就像:如何创建iPhone的摇摆图标效果?.感谢任何指针来解决这个问题.

animation android effects

5
推荐指数
1
解决办法
1571
查看次数

Android:如何对角扩展和缩小视图?

我试图动画一个扩展和缩小回初始大小的视图.我尝试使用动画集添加两个动画,以便第二个动画将在第一个动画后开始,但无法使其正常工作.

AnimationSet expandAndShrink = new AnimationSet(true);
ScaleAnimation expand = new ScaleAnimation(
     1f, 1.5f, 
     1f, 1.5f,
     Animation.RELATIVE_TO_PARENT, 0,
     Animation.RELATIVE_TO_PARENT, 0);

ScaleAnimation shrink = new ScaleAnimation(
     1.5f, 1f, 
     1.5f, 1f,
     Animation.RELATIVE_TO_PARENT, 1f,
     Animation.RELATIVE_TO_PARENT, 1f);

expandAndShrink.addAnimation(expand);
expandAndShrink.addAnimation(shrink)
expandAndShrink.setFillAfter(true);
expandAndShrink.setDuration(1000);
expandAndShrink.setInterpolator(new AccelerateInterpolator(1.0f));

view.bringToFront();
view.startAnimation(expandAndShrink);
Run Code Online (Sandbox Code Playgroud)

我真的很感激任何帮助它的工作.提前致谢

animation android

1
推荐指数
1
解决办法
2755
查看次数

标签 统计

android ×2

animation ×2

effects ×1