Scrollpane issues

8 messages - 2577 views

When I started to create a full screen list using Scrollpane I found the following two problems:

First: The scroll bar doesn't appear even if there is a number of items in the list that are not displayed.

Here is an example from Kprice application where we have 8 items in the main list:

this snapshot before navigating to last visible item (here item3)

Snapshot of main list in Kaprice

inthis the scrollbar appears after navigating to last visible item (item3)

Snapshot of main list in Kaprice


The scroll appears after I navigate down to the last visible item (in snapshot item 3), it is very strange behavior, because the user at first look will not notice that there is other items not visible and he should scroll down to see them.

Second: the function of "focusloop" attribute is not working correctly.

for example in Kprice main list it is not working at all although that focusloop="true" is set in  m_s.xml file. In other projects the function of focusloop sometime work and some times work if we scroll down after the last item in the list but doesn't loop if we move up from the first item.

I don't know how you or the community didn't notice these bugs, taking into account that the full-screen list is the main component of any mobile application, and your framework is in version 2 !!

The first bug is fixed on SVN.

Or you can fix it by replacing in ScrollBar.java @ line 75 :

barLayoutData = new StaticLayoutData(null, 0, 0);

by

barLayoutData = new StaticLayoutData(null, -1, -1);

Else, we will investigate the focusLoop problem ... sorry for this problem and thanks for your report.

But after I fixed the scrollBar code as you suggested, the scrollbar is always shown even if there is no need to scroll (example: only two items in the list).

In "ScrollPane.java" I tried to set useMarkers=true, the follwoing problems are solved:

- The error in the function of focusLoop.

- At start: the first item in the list is not focused, and the focus is on nothing.

I want to ask: what is the function of "useMarkers" as it is not used be the user of "ScrollPane" class, in spite of it causes the previous problems.

 

Yes, in scrollpane, scrollbar is always visible or always hidden (if showScrollBar = false). But it doesn't appear according to the content size. Because in this case it would need a second layout process because scrollbar has a size and then visible area size change if the scrollbar is hidden or not. For optimization reasons we do not keep this solution.

Since 1.0.1 useMarkers is only an internal attribute. Scrollpane works through focus navigation. And to be sure to go to the top an bottom of scrollpane content, it automaticaly add two fake focusable widgets called Markers.

 

Still no solution for the proplem in the function of focusloop for a list inside scrollpane when useMarker= true.

http://www.kalmeo.org/forum/topic/650/scrollpane-in-or-after-container-issure/1