Scrollview vs listview and scroll last item detection

bluedude

Well-Known Member
Licensed User
Longtime User
Hi,

I'm facing problems with a shopping solution where I need to display images in a Listview.

I know I can use the scrollview but that has some limitations like: not fastscroll bar, no scrollend event.

I noticed many other Android apps. have listviews that also displays images in them (remote ones, not first loading to disk).

I need to know when a user scrolls to the end of a scrollview so that I can dynamically load new items.

I would rather use a listview with remote images but I don't want to download all images to the local device.

Any suggestions for a solution?
 

thedesolatesoul

Expert
Licensed User
Longtime User
One way would be to have a 'More' item added at the end of the listview and add more items after that.
However, the problem with that is then you cannot remove the 'More' item without destroying the listview and creating a new one.
I know other android apps can do this easier, but the B4A listview is rather simplified.
 
Upvote 0

bluedude

Well-Known Member
Licensed User
Longtime User
Scroll position

Yeah figured that out but the scroll position it returns does not give me a clue when I reached the end of the scrollbar. Tried to compare it with height of the scrollview but no luck, cannot make a match.

Other question, how would I show a quickaction (library) menu on the correct position in the scrollview? I could not get that right either. In a listview that works with GetViewAtPos.

These are my last 2 UI problems.

Cheers,
 
Upvote 0

corwin42

Expert
Licensed User
Longtime User
Other question, how would I show a quickaction (library) menu on the correct position in the scrollview? I could not get that right either. In a listview that works with GetViewAtPos.

Normally the objects you added to your scrollview panel raise the events for clicking them. So the "Sender" will be the object to pass to the quickaction Show() method.

If this doesn't help please tell us where and when you want to open the quickaction with a short source example.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…