语言

Menu
Sites
Language
Detecting Collision among UI controls while using UI Animations.

Hi,

I am working with animations for UI Controls.

In my application several of such UI controls are dispersed on the screen and are undergoing position transitions.

I need to detect when their bounds overlap and hence take corresponding action.

Problem is when the UI controls are at in static state i am able to do so by calling getbounds() method.

But,i am not able to do so while they are in transition state.

Any,idea to detect UI controls positions while they are undergoing UI animation?

REgards,

编辑者为: Brock Boland 17 3月, 2014 原因: Paragraph tags added automatically from tizen_format_fix module.

响应

2 回复
wil smith
Animation path is determined by the UI framework, looks impossible to detect the collision.
Danny YS Whang
I don't think there is a way to do this, there is no callback during animation, and getting the control's state is not valid during the animation (as you've observed). The formal way to do something similar would be to create animations using VisualElement and VisualElementAnimation, instead. Here, you can get a callback at each tick, and you can get properties from a presentation instance. Hope this helps a bit.