Horizontal ScrollView Example

Smee

Well-Known Member
Licensed User
Longtime User
Does anyone have a Horizontal ScrollView example available?

TIA
 

Smee

Well-Known Member
Licensed User
Longtime User
Thanks Klaus,

I was thinking of using a full panel and the horizontal scrollview. so that panels could have a layout or a bitmap loaded to them and just smooth scroll through each panel. maybe something like a fullsize picture gallery

Would there be any limit to the number of items that could be scrolled?

Regards

joe
 
Upvote 0

klaus

Expert
Licensed User
Longtime User
It depends on what kind of scrolling you expect.
With the Scrollview views you have no control on the scrolling process, you don't control when it stops.
For your example of a full screen image veiwer i'm not convinced that the ScrollView is the best solution for the reason above.
For a full screen image viewer I think that sliding panels would be better because after having initiated the scrolling, the panel scrolls to the next known position, the next image, and would not stop anywhere in between as with the ScrollViews.

Have a look at the two examples below with a vertical ScrollView, the same can be done with a HorizontalScrollView. In these examples the images are ImageViews in a single Panel, the internal ScrillView.Panel.
http://www.b4x.com/forum/basic4andr...ials/6612-scrollview-example-2.html#post38619
http://www.b4x.com/forum/basic4andr...85-add-imageview-half-manually.html#post43655

The number of images you could scroll is the memory limt, and with big images this will become a problem.
With sliding panels you could do it with just two or three panels and
loading the images only when needed.
Did you have a look at BetterSlidingPanels ? You could do something similar with the Touch event instead of Buttons.

Best regards.
 
Upvote 0

Smee

Well-Known Member
Licensed User
Longtime User
Many Thanks for the very detailed reply Klaus.

I will go through all of that.

Thanks Again

Joe
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…