How do I prevent scrolling in vertical direction when swiping tabs

81 views
Skip to first unread message

conco...@gmail.com

unread,
Oct 27, 2014, 9:18:21 AM10/27/14
to codenameone...@googlegroups.com
If you are experiencing an issue please mention the full platform your issue applies to:
IDE: NetBeans/Eclipse/IDEA
Desktop OS
Simulator
Device

Hi Chen,

Please i will like to disable scrolling in the vertical direction when swiping from one tab to another.When swiping is complete, enable scrolling in the vertical direction of a container with a BoxLayout.X_AXIS. The reason is because it produce some weird movements.

Message has been deleted

Diamond

unread,
Oct 27, 2014, 1:27:57 PM10/27/14
to codenameone...@googlegroups.com, conco...@gmail.com
findTabs(f).setSwipeActivated(false); will disable horizontal scrolling for tabs.

You will add to each containers inside the Tab the following method to disable vertical scrolling:

findMyContainerNo1.setScrollableY(false); 
findMyContainerNo2.setScrollableY(false); 
findMyContainerNo1............etc.

Shai Almog

unread,
Oct 27, 2014, 9:33:46 PM10/27/14
to codenameone...@googlegroups.com, conco...@gmail.com
Its problematic to know when a gesture starts whether its intended as a scroll down or a side swipe.
Devices are very sensitive and you never get exact motion from users so if your UI includes Y scrollability and you still want to have a side swipe capability this is pretty much inevitable.
Reply all
Reply to author
Forward
Message has been deleted
0 new messages