android开发常见问题与解决
2011-11-04 11:55
288 查看
Activity animation
1 Changing the animation between Activities
Activity.overridePendingTransition
2 Start Activity with an animation
Activity
-> theme: android:windowAnimationStyle
-> style: android:activityOpenEnterAnimation, android:activityOpenExitAnimation, android:activityCloseEnterAnimation, android:activityCloseExitAnimation
Click / Touch listener
There is a subtle, yet very important difference between the ClickListener and the TouchListener. The TouchListener is executed befor the view can respond to the event. The ClickListener will receive its event only after the view has handled it.
So when you touch your screen, the TouchListener is executed first and when you return true for your event, the ClickListener will never get it. But if you press the trackball of your device, the ClickListener should be fired because the TouchListener will not respond to it.
1 Changing the animation between Activities
Activity.overridePendingTransition
2 Start Activity with an animation
Activity
-> theme: android:windowAnimationStyle
-> style: android:activityOpenEnterAnimation, android:activityOpenExitAnimation, android:activityCloseEnterAnimation, android:activityCloseExitAnimation
Click / Touch listener
There is a subtle, yet very important difference between the ClickListener and the TouchListener. The TouchListener is executed befor the view can respond to the event. The ClickListener will receive its event only after the view has handled it.
So when you touch your screen, the TouchListener is executed first and when you return true for your event, the ClickListener will never get it. But if you press the trackball of your device, the ClickListener should be fired because the TouchListener will not respond to it.
相关文章推荐
- android开发常见问题及解决
- Android开发常见问题及解决方法小结
- [Android开发常见问题-11] Unable to execute dex: Multiple dex files define 解决方法
- [Android开发常见问题-11] Unable to execute dex: Multiple dex files define 解决方法
- Android 开发中5 个比较常见的内存泄漏问题及解决办法
- android google map 开发中的常见问题及解决(无法获取 google map apiKey 和Couldn't get connection factory client)
- 5个Android开发中比较常见的内存泄漏问题及解决办法
- Android开发中常见的5大内存泄漏问题及解决办法
- 5个Android开发中比较常见的内存泄漏问题及解决办法
- Xamarin.Android开发及常见问题的解决
- Android 开发环境搭建及常见问题解决
- android开发常见问题及解决
- Android开发 |常见的内存泄漏问题及解决办法
- 5个Android开发中比较常见的内存泄漏问题及解决办法
- Android开发中常见问题以及解决办法
- 5个Android开发中比较常见的内存泄漏问题及解决办法
- Android开发中比较常见的内存泄漏问题及解决办
- 5个Android开发中比较常见的内存泄漏问题及解决办法
- 5个Android开发中比较常见的内存泄漏问题及解决办法
- 5个Android开发中比较常见的内存泄漏问题及解决办法