Faced with this problem. Tried to resolve by setting different scroll flags (Scrollable, Draggable, SmothScrolling) but nothing helps. Can anyone suggest how to fix issue?
Check out the LWUIT demo in the Grid mode (just go into the scrolling demo and press the Grid command). Works fine as far as I know on all devices.
If you have a valid use case that doesn't work please provide proper details.
i don't know what we did, but it's working now. Trying to scroll it to the bottom with this code:
setScrollY(getScrollDimension().getHeight() - getVisibleBounds().getSize().getHeight());
But sometimes there is gap with size like one element height. But this is different topic.
You generally shouldn't call setScrollY() unless you are sure you know what you are doing.
Thanks for the reply.
I'm trying to scroll ContainerList to the bottom without focusing it. If I'm trying to use Model.setSelectedIndex() it requests focus to the list.
That's because container list uses focus to indicate selection.
You can derive container list and invoke scrollComponentToVisible(getComponentAt(getComponentCount() - 1));
Your use of this web site or any of its content or software indicates your agreement to be bound by these Terms of Participation.
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.