Detecting a page change on Swipe Container.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-03-02 02:04 PM
I am currently using a swipe container that goes between 3 pages by either swiping or using a next/back button on the bottom corners of the screen to change pages. The page indicators are overlapping with the next/back buttons when I do swiping so I was going to not use the built in page indicators and implement my own. The issue is on my next/back button presses, I change the page index and keep track of it so it is easy to update manually the page indicators but I have no way of detecting a swipe page change to update the page indicators. Is there a way to detect a page change on a swipe container?
- Labels:
-
TouchGFX
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-03-03 09:12 PM
Hello ALew.1,
Unfortunately, there's no built-in feature implemented in the widget itself to detect a swipe.
One solution is to make your own SwipeContainer by copy/pasting the available widget into gui/src/common and gui/include/common, and then modify/add the necessary code.
You can create callbacks that trigger some handler function in your view which tells you if you swiped or not. You can even directly retrieve the new page index from the callback.
The only downside is that everything will be done by code and you will not see your swipe container in the Designer.
/Alexandre
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-04-18 05:46 AM
Hello,
You can do Swipe gesture between screens without using Swipe widget.
Please refer to this thread.