B4A Library [Lib] UltimateListView

I've been working on this project for a long time and I'm very proud to release the version 4 today.

The UltimateListView is, as its pompous name says, THE ListView.

  • It can handle very long lists. This is a screenshot of a list with 245813 items, all different:


  • It can mix different layouts (and they can be changed dynamically). You can use it as an expandable ListView:


  • It has a low memory footprint and is very fast (this report comes from the Performance demo where the list has to display 128901 distinct words read from a database and the used device is a Huawei Honor single core 1.4 Ghz):


  • It can scroll in both directions thanks to its swipe detector:


  • The swipe detector can also be used to implement a swipe-to-dismiss or a swipe-to-reveal:

  • You can easily add editors to your table to change its content:


  • You can animate the items when they are added, removed, replaced or when the list is scrolled (with your own custom animation):


  • It can stack items from the bottom:


  • It supports drag & drop operations (internal & external):


  • You can synchronize lists with different item heights:

The examples will show you how to implement a Pull-to-Refresh, create sticky headers or combine several lists to make a wheel. One of the examples is an improved version of my File Explorer class.

All texts and images can be loaded asynchronously (from Internet, from a database or from a local folder), so you can scroll even if the data are not fully loaded.

The list has its own state manager.

Since September 2018, ULV is available for free. You can still donate for it if you wish.
To send the money, just click on the Donate button below (the amount to enter is in euros):

Note that UltimateListView is not a wrapper around the work of someone else. It is 100% my own code and it is based upon the standard Java ListView of Android.

The UltimateListView does not work with Android versions < 2. It cannot work with B4J or B4i.

Current version: 4.50

Last edited:

Dave O

Well-Known Member
Licensed User
Longtime User
FYI, buttons can do Material icons just like labels do - set the typeface to Material, then set the (Material) character in the designer or in your code.

More to the point, I use ULV in most of my apps, so I'm happy to investigate further if you can upload a minimal project with that bug. :)

Dave O

Well-Known Member
Licensed User
Longtime User
Probably the problem is in the part where you fill in the ULV. Maybe you don't create a new Label (Dim) inside a loop for filling.

One easy thing to miss with ULV is in the ContentFiller sub - you need to give explicit values to every field in the item, every time.

Otherwise, when that item slot gets reused by another item that uses the same layout, values from the old item will still be there. That's caught me a few times.


Well-Known Member
Licensed User
Longtime User
Here is the sample project for that problem.


  • Test.zip
    12.4 KB · Views: 174
Last edited:

Dave O

Well-Known Member
Licensed User
Longtime User
Here is the sample project for that problem.
Thanks, found the problem. Your ContentFiller (Tbl_Content) is using the Position of the item in the list as your DB cursor. You should be using the RowID (in your case, RowID - 1) instead.

In your example, the three items have IDs of 1, 2, and 3. If you delete the middle item, the listview now correctly contains rows with ID 1 and 3, but when you go to the DB to get that data, you're setting the DB cursor to be the Position in the listview instead of the ID.

If you change this line, it works correctly:

dbCursor.Position = RowId - 1

BTW, this particular line only works because the IDs start at 1, but you get the idea. :)


Well-Known Member
Licensed User
Longtime User
Hello @Informatix,
Just a question, does your UtimateListView library can be used in an App using the B4XPages framework?

Thanks a lot