Tensile scrolling and how to get rid of it

11 views
Skip to first unread message

nikola....@leadit.rs

unread,
Mar 6, 2019, 9:23:13 AM3/6/19
to CodenameOne Discussions
Hi all,

In the application we're developing, we wanted to remove tensile scrolling. As per some examples I managed to find online, we added next few constants to our theme with these values:
  1. alwaysTensileBool - false
  2. scrollVisibleBool - false
  3. tensileDragBool - false
Also, in the main class generated by CodenameOne, we added this code, so it would turn off scroll bar visibility and tensile drag just in case:

UIManager.getInstance().setLookAndFeel(new DefaultLookAndFeel(UIManager.getInstance()) {
@Override
public void bind(Component cmp) {
super.bind(cmp);
if (cmp instanceof Container) {
cmp.setScrollVisible(false);
cmp.setTensileDragEnabled(false);
}
}
});

Even after these changes, we still have some kind of a tensile scroll from time to time. Sometimes, when we reach the bottom of the screen, and try to scroll past it, the whole content acts like the tensile scroll is turned on, and goes back on its place after we click on the screen or do some other action.

Is there something we're missing, some constant or some code part we forgot to add?
There was a similar question, which will I link below, but we already added those constants that were suggested in the solution for it.
Link is:

If you are experiencing an issue please mention the full platform your issue applies to:
IDE: NetBeans/Eclipse/IDEA
Desktop OS
Simulator
Device

Shai Almog

unread,
Mar 6, 2019, 9:52:05 PM3/6/19
to CodenameOne Discussions
Hi,
I would suggest that you don't touch tensile scrolling. 99% of developers leave it as the default which means you would be venturing to an area we just don't test.
I'm guessing you saw that with a native widget like the web browser which handles its own scrolling. Placing it in the scrollable pane is probably why you have problems to begin with.
Reply all
Reply to author
Forward
0 new messages