Android Question CustomListView Visible Items and Scroll

EduardoElias

Well-Known Member
Licensed User
Longtime User
I am using many CustomListView with Labels. These CustomListViews are inserted on a Dashboard that organize them like cards. This is a Tablet application

However some CustomListView have more items that can show up, so it is needed to scroll to see the rest.

How can I know if a CustomListView have more items than can show ?

And How can I programatically scroll down one item per time, and them come back to start of the list?

The idea is while this CustomListView are displayed I go thru the one with more list and based on a timer scholl one row per time and when reach the last one it goes back to the first one.

So it will show what is not visible rolling the list.

Thank !
 

Peter Simpson

Expert
Licensed User
Longtime User
Limit, so I presume that you are display over 2k items. Have you thought about only downloading and displaying about 500 items/rows at any one time then loading the net five hundred lines when you scroll down or get close to the bottom of the first 500 etc. I take it that you are using a database, what database are you using, SQLite, MySQL, MSSQL?

Wait a minute, you said customlistview like cards, can you please post a screen shot, that will help a lot.
 
Upvote 0

EduardoElias

Well-Known Member
Licensed User
Longtime User
Sorry I might not clear.

I have 5 cols and 2 rows of CustomListView.

Each CustomListView will handle few rows, just a few, like 1, 2 etc The size it has in the screen let it show around 10 rows.

HOWEVER there are few cases where 12 or few more rows are needed.

It is not lots of items, just a few, but they are not visible.

I keep this CustomListView for some time before a refresh (a timer is fired, every 30 seconds)

While this does not happen, I want to scroll down the CustomListView that has items that are not visible, for that I will have another timer ticking frequently. It will go thru all the CustomListView and see if there is Items (rows) that are not visible and then Scroll Down one Row per time.

The problem here is:

How to know if there is a Row at the end that is not visible
How to scroll one row per time, considering that the Rows have different heights
How to scroll back to the first Row, to start the process again.
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Upvote 0
Top