cancel
Showing results for 
Search instead for 
Did you mean: 

Disable swipe acceleration for TouchGFX application

wired
Senior III

I'm using the STM32F469I-DISCO board with TouchGFX. In portrait mode, I set the swipe threshold to 400 because I want the user to swipe almost all the way across the screen to switch pages. When I swipe slowly, it seems to work. However, a fast swipe changes pages with a swipe distance of only 1/2" or so. Is there a way to not make this speed-dependent?

1 ACCEPTED SOLUTION

Accepted Solutions
wired
Senior III

So I filed a support request from ST, and they told me that the fast swipe feature is the default implementation. If you wish to make the swipeThreshold behave as it is documented in the API documentation, you must override the gesture handler in the screen that has the Swipe Container. See below for the added declaration. This is all that needs to be done - no function needs to be written. I suggested that they provide additional detail in the API for the swipeThreshold member so that people know it is only applicable for a slow swipe, and provide instructions an how to disable the fast swipe feature as shown below.

class Screen1View : public Screen1ViewBase
{
public:
    Screen1View();
    virtual ~Screen1View() {}
    virtual void setupScreen();
    virtual void tearDownScreen();
	
    virtual void handleGestureEvent(const GestureEvent& event) {}
    //event from Presenter
protected:
};
 

View solution in original post

1 REPLY 1
wired
Senior III

So I filed a support request from ST, and they told me that the fast swipe feature is the default implementation. If you wish to make the swipeThreshold behave as it is documented in the API documentation, you must override the gesture handler in the screen that has the Swipe Container. See below for the added declaration. This is all that needs to be done - no function needs to be written. I suggested that they provide additional detail in the API for the swipeThreshold member so that people know it is only applicable for a slow swipe, and provide instructions an how to disable the fast swipe feature as shown below.

class Screen1View : public Screen1ViewBase
{
public:
    Screen1View();
    virtual ~Screen1View() {}
    virtual void setupScreen();
    virtual void tearDownScreen();
	
    virtual void handleGestureEvent(const GestureEvent& event) {}
    //event from Presenter
protected:
};