Skip to main content
WhyIsThisSo
Associate III
October 8, 2022
Question

Swipe Container Detecting Swipe

  • October 8, 2022
  • 2 replies
  • 1504 views

Is there a way of detecting a swipe has been performed using the swipe container?

I see others have used some callbacks but these posts are a few years old.

I would think this would be a "default" out of the box functionality, after all it is a SWIPE container?

Do anyone have some sample project code they could post

cc:@Martin KJELDSEN​ 

This topic has been closed for replies.

2 replies

Martin KJELDSEN
Principal III
October 12, 2022

Hi,

You could overwrite the handleX event handlers which are called by the framework. handleDragEvent and handleClickEvent, do something with that information and then process the event as usual in your container

/Martin

manto.1
Associate III
September 12, 2023

@Martin KJELDSEN 

I want to override dragEvent of an swipeContainer but dont know how to.  If i override 

virtual void handleDragEvent(const DragEvent& event);

in "screen.hpp" then swipe doesn't work so smooth as before. I guess it is because I probably overriden Screens dragEvent. I would like to see some code example of how to override a an virtual function of an memmber of screen like swipe container. 

 

I need this becuase I want to detect swipe in vertical direction, so that i can expend the slideMenu from top.