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:

    verylonglist.jpg


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

    layouts.jpg


  • 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):

    performance.png


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

    tables.jpg


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

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

    celledit.jpg


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

    animationclap.png


  • It can stack items from the bottom:

    stackfrombottom.png


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

    dragndrop.png


  • You can synchronize lists with different item heights:

    grid.jpg
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

DOWNLOAD HERE:
 
Last edited:

Angel Garcia

Member
Licensed User
Hi,
This looks like a great lib!, i want to donate to get this library, but a have a few questions,
it is possible to create with this library a Table with N rows and N columns, and set different color to a certain cells?
Please let me know
Thanks
 

Informatix

Expert
Licensed User
Longtime User
Hi,
This looks like a great lib!, i want to donate to get this library, but a have a few questions,
it is possible to create with this library a Table with N rows and N columns, and set different color to a certain cells?
Please let me know
Thanks
Its main purpose is to be a listview but you can easily turn it into a table if you wish, with scrolling in two directions. It has a native support for individual cells inside rows.
 

Informatix

Expert
Licensed User
Longtime User
NEW VERSION AVAILABLE

This new version adds the support of keys (sent by a keyboard, a trackball, a directional pad, a remote control...) and the examples are updated to be compatible with Android 6+.

Changelog v4.50:
- I added the Key, KeyDown and KeyUp events;
- I added the GetPositionSelectedWithKeys function;
- I added the KeyState class;
- I added a Keys demo;
- I fixed a bug in ClsExplorerForULV for long clicks;
- I set targetSdkVersion to 26 for all examples and added the runtime permissions where required.
 

yiankos1

Well-Known Member
Licensed User
Longtime User
Hello @Informatix,
Can you update ulv in order passing id other format than long? For example my user_id is format "SsqnXg6v1JeBC3FOxAdECB3cOS33"
B4X:
ULV1.AddItem(layout,id)
 
Last edited:

jimmyF

Active Member
Licensed User
Longtime User
Hi,
Are we required to make an additional donation to receive the update?
Thanks
 

jimmyF

Active Member
Licensed User
Longtime User
Ok, thanks, got it! :)
 

walterf25

Expert
Licensed User
Longtime User
NEW VERSION AVAILABLE

This new version adds the support of keys (sent by a keyboard, a trackball, a directional pad, a remote control...) and the examples are updated to be compatible with Android 6+.

Changelog v4.50:
- I added the Key, KeyDown and KeyUp events;
- I added the GetPositionSelectedWithKeys function;
- I added the KeyState class;
- I added a Keys demo;
- I fixed a bug in ClsExplorerForULV for long clicks;
- I set targetSdkVersion to 26 for all examples and added the runtime permissions where required.
How do i get the new version?

Walter
 

Informatix

Expert
Licensed User
Longtime User
Hello @Informatix,
Can you update ulv in order passing id other format than long? For example my user_id is format "SsqnXg6v1JeBC3FOxAdECB3cOS33"
B4X:
ULV1.AddItem(layout,id)
I don't plan to change the ID type.
You can store the string ID in a list (that you read with Get(Position) when you need the ID) or a map (or anything from the DataCollection lib, which offers faster data containers). But most of the time, this ID comes from a DB; if you use the rowID field, you don't have to bother with this string ID while the list is being used. When you need it, read it from the DB with the rowID value in the WHERE clause.
 

Informatix

Expert
Licensed User
Longtime User
I don't plan to change the ID type.
You can store the string ID in a list (that you read with Get(Position) when you need the ID) or a map (or anything from the DataCollection lib, which offers faster data containers). But most of the time, this ID comes from a DB; if you use the rowID field, you don't have to bother with this string ID while the list is being used. When you need it, read it from the DB with the rowID value in the WHERE clause.
A thing to know about rowID: if your table contains already an integer field declared as the primary key, the rowID field is not created and "rowID" becomes an alias of your id field.
 

cesarcm

Member
Licensed User
Longtime User
Is there any way to format ULV with a vertical line as like some attached timelines?

Thanks
Cesar
 

Attachments

  • TimelineView1.png
    TimelineView1.png
    144.5 KB · Views: 290
  • TimelineView2.png
    TimelineView2.png
    48.1 KB · Views: 286
  • TimelineView0.jpg
    TimelineView0.jpg
    45.7 KB · Views: 288
  • TimelineView3.jpg
    TimelineView3.jpg
    112.6 KB · Views: 279
  • TimelineView4.png
    TimelineView4.png
    125.1 KB · Views: 272
  • TimelineView5.png
    TimelineView5.png
    23.8 KB · Views: 274

Informatix

Expert
Licensed User
Longtime User
Is there any way to format ULV with a vertical line as like some attached timelines?

Thanks
Cesar
Yes, set DividerHeight to 0 and place an ImageView in each item, as tall as the item panel, that you fill with the appropriate part of the image forming the vertical line (so the first item will show the beginning of the line, the second item and all intermediary items will show a continuous line, until the last item showing the last part of your line).
 
Top