in GUI Development by

I haven Outline with a horizontal slide touch handler which allows swiping left to right between 3 screens.

Is it possible to read if the animation is still running if the swipe was a 'flick' rather than continuous touch?



1 Answer

0 votes

Hello Phil,

Concerning your question, you can evaluate the variable Sliding. If it is true, the Slide Touch Handler performs the animation. The relation to the 'flick' and continuous touch in your question is however not clear for me. Do you want to detect whether the user intends to scroll the content or select one of its items? If yes, then you have several options:

Option 1: If the Slide Touch Handler lies in front of the Outline (and all views managed by the Outline), you can configure the Slide Touch Handler to resign if the user touches it for some period. You configure this by using the properties RetargetCondition and RetargetDelay. Concrete, activate the Option LongPress in RetargetCondition and in RetargetDelay specify the time how long the user has to press the finger in order to force the Slide Touch Handler to redirect the actual interaction to another Touch Handler lying behind it.

Option 2: Reverse the process. Put the Slide Touch Handler behind the Outline view. In front of the Outline view (or in the items managed by the Outline) use another Touch Handler (e.g. the Simple Touch Handler). These are used to detect the normal touches. These overlay consequently the Slide Touch Handler. In order to allow the Slide Touch Handler to process touch events, you configure the Touch Handlers in the foreground to resign if the user starts to perform some slide gesture. Again, as explained above, you configure the properties RetargetCondition and now RetargetOffset. Now, however, you do this for the Touch Handlers lying IN FRONT of the Slide Touch Handler. Concrete, configure the property RetargetCondition with the both options WipeLeft and WipeRight. In the property RetargetOffset you specify the displacement the handler should interpret as a swipe gesture and then redirects the actual interaction to another Touch Handler lying in the background. In our case it would be the Slide Touch Handler.

For more details concerning the mentioned Retarget properties see: Combine several Touch Handlers together.

Does it help you?

Best regards

Paul Banach


Hi Paul,

What I am trying to do is either disable or ignore another observer if the slide animation is still running.

I have it working for while the finger is in contact, but not for the 'flick' when the animation continues but the contact has ended.

Hi Phil,

I understand. In such case evaluating the variable Sliding should provide the necessary information. Does it work?

Best regards

Paul Banach


Yes, thanks Paul, that works great.

Embedded Wizard Website | Privacy Policy | Imprint