通过overridePendingTransition(R.anim.zoomin, R.anim.zoomout);方法我实现了页面切换的淡入淡出动画效果
现在想在程序中动态设置动画的持续时间,不知道具体怎样实现,还请各位高手帮忙!
现在想在程序中动态设置动画的持续时间,不知道具体怎样实现,还请各位高手帮忙!
解决方案 »
- 请教如何对apk签名
- 求助关于读取xml文件的问题
- 加入有米广告时AdManager.init(),第一个参数的问题
- AppWidget不能响应点击事件
- eclipse中不能粘贴文件,Cannot paste the clipboard contents into the selected elements.
- Android 中,怎样实现本地数据sqlite与远程数据库中的数据同步
- Android项目的Javadoc注释,编译出来老是说找不到符号和包???
- android4.0+如何屏蔽home键?
- android系统设置里的触摸提示音功能怎样实现开启和关闭?
- Android开发,新手提问,请大家帮我分析一下错误原因,急……在线等……
- Android导出APK里的数据库文件至SD卡【原创】
- Android的服务进程和后台进程有什么区别?还有那些空进程是用来做什么的?
1.Animation animation; [email protected]
2. [email protected]
3.animation=AnimationUtils.loadAnimation(this, R.anim.animation); [email protected]
4. [email protected]
5.然后再想要实现动画效果的控件上通过使用 startAnimation() 方法进行添加。 [email protected]
6. [email protected]
7.// 编写动画对象,并且获取自定应的动画样式 [email protected]
8. [email protected]
9.animation=AnimationUtils.loadAnimation(this, R.anim.animation); [email protected]
10. [email protected]
11. spinner.setOnTouchListener(new Spinner.OnTouchListener() { [email protected]
12. [email protected]
13. [email protected]
14. [email protected]
15. @Override [email protected]
16. [email protected]
17. public boolean onTouch(View v, MotionEvent event) { [email protected]
18. [email protected]
19. // TODO Auto-generated method stub [email protected]
20. [email protected]
21. // 运行动画 animation [email protected]
22. [email protected]
23. v.startAnimation(animation); [email protected]
24. [email protected]
25. // 将 spinner 的可见性设置为不可见状态 [email protected]
26. [email protected]
27. v.setVisibility(View.INVISIBLE); [email protected]
28. [email protected]
29. return false; [email protected]
30. [email protected]
31. } [email protected]
32. [email protected]
33. }); [email protected]
.