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:

thedesolatesoul

Expert
Licensed User
Longtime User
An indian hacker (123.201.235.17) has accessed to one of my email boxes (despite a strong password) and grabbed all my email contacts. That means that all my donators are going to receive spams soon (the first wave has already been sent). I want to reassure everyone: I do not store sensitive information in this email box and Paypal does not provide me with sensitive informations about you.
Don't click on the link in this spam (coming from a spanish/south-american name). That probably leads nowhere, it is just there to check if the address is valid and return this information to the hacker.
Went straight to my spam folder.
 

AndroidUserCCS

Member
Licensed User
Longtime User
I donate today! I am thinking in use this library for a database application. I want to use it using a WCF Service.
 

AndroidUserCCS

Member
Licensed User
Longtime User
An indian hacker (123.201.235.17) has accessed to one of my email boxes (despite a strong password) and grabbed all my email contacts. That means that all my donators are going to receive spams soon (the first wave has already been sent). I want to reassure everyone: I do not store sensitive information in this email box and Paypal does not provide me with sensitive informations about you.
Don't click on the link in this spam (coming from a spanish/south-american name). That probably leads nowhere, it is just there to check if the address is valid and return this information to the hacker.

I check my two emails and dont receive spam, maybe soon.:sign0148:
 

uncle_giavelli

New Member
Licensed User
Longtime User
Drop the hotmail account. Over the past few months I've seen a lot of this type of problem from mostly yahoo but hotmail also. I admin our company's email. Google seems to show up less... love them or hate them.

I just donated. Thanks for the great solution.
 

Informatix

Expert
Licensed User
Longtime User
Drop the hotmail account. Over the past few months I've seen a lot of this type of problem from mostly yahoo but hotmail also. I admin our company's email. Google seems to show up less... love them or hate them.

Yes I strongly advise against using Hotmail, but unfortunately I have a long past with them and it's too much work to migrate everything to Gmail.
Microsoft didn't detect the intrusions on my account, so I had to prove them with the connection log (not easy to obtain). That means two things: the hacker entered without the password (backdoor?), or he got the password on a Microsoft server. He didn't use the secrete question and didn't change the password. Without my vigilance, he could continue without being worried. I feel very unsafe now if any hacker can read my emails as an open book. A legal procedure against Microsoft is not excluded.

I just donated. Thanks for the great solution.

Thanks :)
 

Informatix

Expert
Licensed User
Longtime User
Pull to refresh

Some users have asked me to add the "Pull to refresh" feature to UltimateListView. My answer was and is still no. Some of my reasons are explained here (in the Bad column): Android Patterns
But the main reason is that I don't want to overload my code with features that can be added easily by the user. A "P-to-R" is nothing more than an item at the top of the list that refreshes the list when it becomes fully visible.
For the little story: it took me weeks before I realized that there's a Pull to Refresh implemented in Pulse News, which I was using almost every day. This pattern is not intuitive at all. I think that a Refresh button should be added in all cases.
 

gadgetmonster

Active Member
Licensed User
Longtime User
Trouble with images in list

Hi,

I am using your ultimatelistview but have a problem showing images.

I retrieve records from a database (around 40) some of which have images. If I delete the apps cache using android application manager and then run the app, all looks fine. Correct images on correct rows. If I then add a new row with a picture and return back to the list, the pictures get jumbled up in the list. Some show correctly, some show the wrong image.

If I now clear the app's cache again in settings, and re run the app then the list shows the correct images again.

FYI I am using LoadImageAsync in the content filler.

Please help.
 

Informatix

Expert
Licensed User
Longtime User
Hi,

I am using your ultimatelistview but have a problem showing images.

I retrieve records from a database (around 40) some of which have images. If I delete the apps cache using android application manager and then run the app, all looks fine. Correct images on correct rows. If I then add a new row with a picture and return back to the list, the pictures get jumbled up in the list. Some show correctly, some show the wrong image.

If I now clear the app's cache again in settings, and re run the app then the list shows the correct images again.

FYI I am using LoadImageAsync in the content filler.

Please help.

That means you did not set correctly the ID for your images (this ID is their unique signature). Send me your code by email and I'll show you how to fix this issue.
 

gadgetmonster

Active Member
Licensed User
Longtime User
I have now added a new field to entry called ID which is set to a number within the loop that loads the data. For example:

B4X:
For i = 0 To dbCursor.RowCount - 1

dbCursor.Position = i
      
Dim entry As typEntry
      
entry.ID = i

...

entryList.Add(entry)

Next


Now in my content filler I use:

B4X:
Dim entry As typEntry
entry = entryList.Get(ItemID)

ULV.LoadImageAsync(ivPhoto, File.DirRootExternal & "/DJournal/images/" & entry.UUID & ".jpg", entry.id)

But I still get the same problem.
 

gadgetmonster

Active Member
Licensed User
Longtime User
I think the problem is as follows:

1. I have a list where images match rows fine.
2. I press a button to add a new item which goes off to another page
3. On this page I add a new entery with a new photo which is saved to the database
4. I return to my list page and the images are now out of alignment. When returning to my list page I call ULV.ClearContent before reloading the data and images back in.

Could this be the issue?
 

jmon

Well-Known Member
Licensed User
Longtime User
Hi,

I saw your answer in the thread I posted about the lv containing 25k items. Your library sounds interesting, and I might try it just for fun, as a hobby :) I got some questions though:

How does the expandable listview works? Is it animated?

Would I be able to do that:
1) click on an item in the listview
2) it expands a sublayout containing share buttons or other info
3) all of this animated, pushing down the other listview items and closing any other expanded item

Is it possible to insert an item in the list at a specific position? Would that be animated i.e. Pushing down other elements?



Sent from my GT-P7500 using Tapatalk HD
 

Informatix

Expert
Licensed User
Longtime User
How does the expandable listview works? Is it animated?

You have a function to declare the relationship between items (SetChildren) and two functions to expand or collapse the children items. You can have many nested levels.
You may animate your list. I provide an example showing that. But this is a limited feature because some animations can create problems, and I prefer stability.

Is it possible to insert an item in the list at a specific position?

Of course. It's a pretty basic feature for such a view.

Would that be animated i.e. Pushing down other elements?

In my example, you can see a progressive expansion of an expandable item.
 

MMORETTI964

Member
Licensed User
Longtime User
Selecting item

Hi, Frederic.
I would like to select a row of your list on a single tap, changing color to row permanently to see the items was selected.
There is a way in your library to change the selected color (a property, for example) or I need to change it by hand on every list in a program?

Thank you in advance.
Maurizio
 
Top