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:

b4auser1

Well-Known Member
Licensed User
Longtime User
Is it planned to implement a simple method to bind ULV to database table with built-in editing, like MS Access provides ?
 

Informatix

Expert
Licensed User
Longtime User
How to implement grid design with vertical divider lines ?
I mean something like Flexible table provides
As I don't know the forum nickname of my donors, I'm not able to know whether you're an ULV user or not. If yes, then you should look at the provided examples. If no, the answer is "you can use a special layout called a row layout, which have vertical dividers".
 
Last edited:

Informatix

Expert
Licensed User
Longtime User
Is it planned to implement a simple method to bind ULV to database table with built-in editing, like MS Access provides ?
MS Access is a product that I hate! So don't ask me anything related to it. ;)
Among the examples of ULV, you will find the Editor example that shows how to read and save your data to/from a database. I tried a few months ago to do something more "automatic" but I failed to do something really convenient that works in all cases.
 
Last edited:

LucaMs

Expert
Licensed User
Longtime User
I think it is an excellent job!

I am also convinced that Erel will write that I have to change the thread for what I'm about to write.

€ 25 for a library of programming support (I would not call it donation but price :)). If we compare them to the prices of entire apps, it's a steep price, 10/20 times the cost of an app (not counting the free apps!).

So, as I've written many times, seem to me absurd prices of those apps.
Programmers have certainly wont hurt users.

Finally, the relationship between the price of this excellent library and excellent B4A is wrong too !?!?

This is an economic argument, then it should be moved, I know, but it seems to me that this is the only library in cost and so "a lot."
 

Informatix

Expert
Licensed User
Longtime User
€ 25 for a library of programming support (I would not call it donation but price :)). If we compare them to the prices of entire apps, it's a steep price, 10/20 times the cost of an app (not counting the free apps!).

I think that the prices on Google Play are utterly absurd but you and me won't change the rules of this market. If you publish a product with the "right" price, you will sell nothing because people are used to these stupid low prices. They will probably blame you for your high price because they don't realize that two people spending many months on a project need to earn at least 50000-60000 euros (in France, Germany, USA, etc.) with their product to earn their life. Unfortunately, this is a goal very difficult to reach. And I don't even talk of piracy. For some games, more than 50% of installed products are cracked versions according to reports made by game companies.

Finally, the relationship between the price of this excellent library and excellent B4A is wrong too !?!?

I set the minimum donation amount (it's not really a price because people can, and sometimes do, donate more than this amount) of UltimateListView independantly of the B4A price and Google market prices. I didn't think at the beginning that my ULV would be such a success, but I'm glad that I didn't set the price too low because I spent more time to provide support than to write the library itself. I'm still wondering if I will increase the price or not in the next weeks, just to reduce the number of new users and to have a better ratio time spent/money earned.
 

b4auser1

Well-Known Member
Licensed User
Longtime User
As I don't know the forum nickname of my donors, I'm not able to know whether you're an ULV user or not. If yes, then you should look at the provided examples. If no, the answer is "you can use a special layout called a row layout, which have vertical dividers".

Thank you very much,
I found examples with ULV.AddRowLayout, which allows to define dividers.
I will take a look at Editor example as well.
 

Richard Peck

Member
Licensed User
Longtime User
I don't understand the question. Could you give more details?
If your question is: can I change the contents of each item after displaying the list?, the answer is: of course. You can even change their full appearance, including their height.

I need to change the bitmap image after I've a
I don't understand the question. Could you give more details?
If your question is: can I change the contents of each item after displaying the list?, the answer is: of course. You can even change their full appearance, including their height.

How can I order a copy of UltimateListView ?
 

merlin2049er

Well-Known Member
Licensed User
Longtime User
I've put my ulv on a panel that is part of tab host. Ulv loads up fine and all, but when switching back to that tab with ulv I run into problems because it can't find the db fields when building the list on the fly again.

Should I be building that ulv every time the tab is selected on the tab changed event?
 

Informatix

Expert
Licensed User
Longtime User
I've put my ulv on a panel that is part of tab host. Ulv loads up fine and all, but when switching back to that tab with ulv I run into problems because it can't find the db fields when building the list on the fly again.

Should I be building that ulv every time the tab is selected on the tab changed event?
No. The list should be built only once and nothing should be done when you change tab. I can't say anything more without seeing your code.
 

merlin2049er

Well-Known Member
Licensed User
Longtime User
Ok, I'll post my code tonight. But it works!

I moved the bulk insert & query from the activity create to it's own sub routine. I call it once from the activity create, and then again on tab change (tab = 0).

If I created the list from the query once from the activity create, when I tabbed back to that ulv, I'd get can't find such and such .db field.

The other thing I need to figure out is where I should be using my record id (from my table) in the ulv? Does that go into the row creator or filler?
 

Informatix

Expert
Licensed User
Longtime User
Ok, I'll post my code tonight. But it works!

Send it by email, not on this forum.

The other thing I need to figure out is where I should be using my record id (from my table) in the ulv? Does that go into the row creator or filler?

The creator is there to create your layouts. The filler, to fill your layouts with contents, so the answer is pretty obvious: the filler sub.
 

theos

Member
Licensed User
Longtime User
Hello,
from what I read the library is very cool. I think it should be ok for an app I'm going to build but I am unable to read the manual and would like to ask you some question in advance:
1) is it possible have an horizontal scrolling mode (like horizontalscrollview)?
2) is possible to use it like a treewiew with nested nodes (like http://www.b4x.com/android/forum/threads/19011/#content )?
3) is it possible to use it like a (horizontal) thumbnail viewer?
thank you
 

Informatix

Expert
Licensed User
Longtime User
Hello,
from what I read the library is very cool. I think it should be ok for an app I'm going to build but I am unable to read the manual and would like to ask you some question in advance:
1) is it possible have an horizontal scrolling mode (like horizontalscrollview)?
2) is possible to use it like a treewiew with nested nodes (like http://www.b4x.com/android/forum/threads/19011/#content )?
3) is it possible to use it like a (horizontal) thumbnail viewer?
thank you
1) Yes. But there's no optimization for the horizontal contents (so if you place 500 bitmaps in the same row, you will probably get an Out of Memory error).
2) Yes. One of the examples shows that.
3) Yes, but you are limited by the memory (cf. 1).
 

b4auser1

Well-Known Member
Licensed User
Longtime User
I use code (not Designer) to create Layout for ULV.
B4X:
Public Sub ULV_DBQ_RowLayoutCreator(LayoutName As String, CellPanel As Panel, CellIndex As Byte)
  
    Dim lblText As Label
    lblText.Initialize("")
    lblText.Color = Colors.Transparent
    lblText.TextColor = Colors.Black
    lblText.TextSize = 16
    lblText.Typeface = Typeface.DEFAULT
    lblText.Gravity = Gravity.CENTER_VERTICAL
   
    CellPanel.AddView(lblText, 10dip, 5dip, CellPanel.Width - 20dip, CellPanel.Height - 10dip)

    'Scale.ScaleViewDS(CellPanel) '- works wrong :(
    'Scale.ScaleViewDS(lblText) '- works wrong :(
       
End Sub
Scale.ScaleViewDS is from AutoScale Code Module

How to autoscale views in the layout for ULV ?
 

Informatix

Expert
Licensed User
Longtime User
I use code (not Designer) to create Layout for ULV.
B4X:
Public Sub ULV_DBQ_RowLayoutCreator(LayoutName As String, CellPanel As Panel, CellIndex As Byte)
 
    Dim lblText As Label
    lblText.Initialize("")
    lblText.Color = Colors.Transparent
    lblText.TextColor = Colors.Black
    lblText.TextSize = 16
    lblText.Typeface = Typeface.DEFAULT
    lblText.Gravity = Gravity.CENTER_VERTICAL
  
    CellPanel.AddView(lblText, 10dip, 5dip, CellPanel.Width - 20dip, CellPanel.Height - 10dip)

    'Scale.ScaleViewDS(CellPanel) '- works wrong :(
    'Scale.ScaleViewDS(lblText) '- works wrong :(
      
End Sub
Scale.ScaleViewDS is from AutoScale Code Module

How to autoscale views in the layout for ULV ?
I never use the Autoscale feature of the designer and I never even tried the AutoScale code module so I have no idea of what could be wrong or what you could do. What error did you get?
The code of the AutoScale code module seems fairly simple. As I see, it resizes the font and view bounds, so I see no reason of incompatibility (and as I always demonstrated until now, there's nothing special with the views that you place in a ULV; they are created and used exactly as in the other view containers; the panel provided by the Creator or Filler sub is the only special view as it is a panel not resizable by B4A but the view to resize here is the label not the panel).
 
Top