您的位置:首页 > 移动开发 > Android开发

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.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: