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:

fredo

Well-Known Member
Licensed User
Longtime User
I have recently purchased the library and was immediately really excited by the examples. By using the enclosed documentation is was able to build fast complex scrollviews within an hour or so. Images from the device or from the web are easy to integrate.

I am smitten. ULV is a really useful module package at a very reasonable price.
 

Inman

Well-Known Member
Licensed User
Longtime User
Nice to see some positive reviews. I have a question.

In one of my apps, there is a vertical scrollview. It contains about 50 panels. Each panel has 5 labels and 2 imageviews. Since the content changes each time, as it is populated by downloading from a server, the whole UI is generated via code only and not with designer. On my Galaxy Note running Android 4.0.4, it takes a while to load this whole layout. In fact even the spinning wheel of ProgressDialogShow, with the message "Please wait", stays stand still for about 2 seconds.

I am not sure how different your method of implementation of UltimateListView is, from the B4A's native ListView. But I was wondering, if I switch to your library and replace the ScrollView with UltimateListView, is it possible the loading time would decrease?
 

Informatix

Expert
Licensed User
Longtime User
But I was wondering, if I switch to your library and replace the ScrollView with UltimateListView, is it possible the loading time would decrease?

Absolutely YES.

Before ULV, I was using my CheckList class, but I had three issues with it:
- out of memory when the list was full of bitmaps
- loading time when the list was loaded with hundreds of items
- item layouts too static for my needs

I created the ULV to solve all of these issues.

To give you an idea, this is the average loading time of one of my lists displaying 600 rows of 4 cells (with a Huawei Honor, single core 1,4 Ghz) between List.Initialize and List.DisplayItems: 350ms.
 

Inman

Well-Known Member
Licensed User
Longtime User
Absolutely YES.

Before ULV, I was using my CheckList class, but I had three issues with it:
- out of memory when the list was full of bitmaps
- loading time when the list was loaded with hundreds of items
- item layouts too static for my needs

I created the ULV to solve all of these issues.

To give you an idea, this is the average loading time of one of my lists displaying 600 rows of 4 cells (with a Huawei Honor, single core 1,4 Ghz) between List.Initialize and List.DisplayItems: 350ms.

Sounds great. I will buy it before the end of this month.
 

GabrielM

Member
Licensed User
Longtime User
Hi Informatix,

Just donate for ULV today. Can't wait to get it :sign0098:

Thank you, your coding much appreciated.

Best regards,
Gabi.
 

fredo

Well-Known Member
Licensed User
Longtime User
I added an example to the ULV package to show that all layouts can change in real-time (the height of each item is modified accordingly):

Hi Frédéric,

I just love the ULV, in particular the variable version.
With the documentation and examples I basically had an easy start.

But nonetheless, I am not quite clear how to implement the "AddLayout (..)" with variable height for multiple views on a panel.

E.g. I want in the ULV "Demo_Gallery" in "Item_LayoutCreator (..)" make the lblText2.Height depending on the content.

B4X:
Sub Item_LayoutCreator(LayoutName As String) As View
   'The Item layout is a classic ListView layout: an ImageView on the left and two Labels beside.
   Dim pnl As Panel
   Dim gd As GradientDrawable
   Dim Couleurs(2) As Int
   Couleurs(0) = Colors.DarkGray
   Couleurs(1) = Colors.Black
   gd.Initialize("TOP_BOTTOM", Couleurs)
   pnl.Initialize("Item")
   pnl.Background = gd

   Dim ivImage As ImageView
   ivImage.Initialize("")
   ivImage.Gravity = Gravity.NO_GRAVITY
   pnl.AddView(ivImage, 0, 0, 70dip, 70dip)   ' Fixed height OK

   Dim lblText1 As Label
   lblText1.Initialize("")
   lblText1.TextColor = Colors.White
   lblText1.TextSize = 15
   lblText1.Typeface = Typeface.DEFAULT_BOLD
   lblText1.Gravity = Gravity.TOP
   pnl.AddView(lblText1, 80dip, 5dip, 100%x - 90dip, 25dip) ' Fixed height OK

   Dim lblText2 As Label
   lblText2.Initialize("")
   lblText2.TextColor = Colors.LightGray
   lblText2.TextSize = 13
   lblText2.Typeface = Typeface.DEFAULT
   lblText2.Gravity = Gravity.TOP
   pnl.AddView(lblText2, 80dip, 29dip, 100%x - 90dip,  << variable height here >>>)

   '   Dim r As Reflector
   '   r.Target = lblText2
   '   r.RunMethod2("setMaxLines", 2, "java.lang.int")
   '   r.RunMethod2("setHorizontallyScrolling", False, "java.lang.boolean") 
   '   r.RunMethod2("setEllipsize", "START", "android.text.TextUtils$TruncateAt")

   Return pnl
End Sub

I understand the basic concept of ULV and know the function of "su.MeasureMultilineTextHeight(...)" in "Demo_Variable" for a single Layout so far.

My problem right now is to get the "AddLayouts" and "_LayoutCreator" togther, to get multiple Views with variable height on one ULV-panel together.

Any hint in the right direction would be appreciated.

Regards,
fredo
 

Informatix

Expert
Licensed User
Longtime User
Hi Frédéric,

I just love the ULV, in particular the variable version.
With the documentation and examples I basically had an easy start.

But nonetheless, I am not quite clear how to implement the "AddLayout (..)" with variable height for multiple views on a panel.

E.g. I want in the ULV "Demo_Gallery" in "Item_LayoutCreator (..)" make the lblText2.Height depending on the content.


I understand the basic concept of ULV and know the function of "su.MeasureMultilineTextHeight(...)" in "Demo_Variable" for a single Layout so far.

My problem right now is to get the "AddLayouts" and "_LayoutCreator" togther, to get multiple Views with variable height on one ULV-panel together.

Any hint in the right direction would be appreciated.

Regards,
fredo

Support is done only by email. I will send you the answer ASAP.
 

Mahares

Expert
Licensed User
Longtime User
Support is done only by email. I will send you the answer ASAP
1. I think you are making a big mistake by not answering in this forum, because you are not showing your potential buyers what it can do. What are you afraid of? If one sees the answer and does not have the paid version of ULV, they cannot steal the answer anyway, but can make a calculated decision as to whether it is worth buying or not.
2. I use the clsChkList (it is great) in combination with Erel's TABLE class. I use them to display a SELECT query of 70000 records from 2 joined SQLite tables . The clsChkList selects the one to many table records by checking them all (250 records) and the TABLE class displays the 70000 records of the second table. Both tables have a common field (column). It takes 75 seconds for the records to appear in the grid. Would the ULV help me speed that up? If so, I will definitely purchase it.
Merci
 

Informatix

Expert
Licensed User
Longtime User
1. I think you are making a big mistake by not answering in this forum, because you are not showing your potential buyers what it can do.

My intent is not to hide something; it's just more convenient for me and my users. By email, I can exchange files with them and the exchange can last as long as needed. Moreover, since some of the users use my product in a commercial project, they can talk freely of their app with me.

2. I use the clsChkList (it is great) in combination with Erel's TABLE class. I use them to display a SELECT query of 70000 records from 2 joined SQLite tables . The clsChkList selects the one to many table records by checking them all (250 records) and the TABLE class displays the 70000 records of the second table. Both tables have a common field (column). It takes 75 seconds for the records to appear in the grid. Would the ULV help me speed that up? If so, I will definitely purchase it.
Merci
Yes, the ULV will speed that up without any hesitation. The number of items doesn't really matter. BUT since data are loaded in real time, you would probably have to prepare your data before displaying the list (not sure, it depends on the complexity of your joined tables and the speed to retrieve each record). That may take a few seconds (a lot less than 75, and you can do it in the background if you wish; you can also save the result in a cache to reuse it later). I'll explain that to you after your first steps with the product.
 

HappyNurse

New Member
Licensed User
Longtime User
And another donation...

Thanks for creating this beautiful listview!
I just donated €25,- to you.

Marc
 

lalonja

New Member
Licensed User
Longtime User
Another donation

Hi,

I just donated EUR 25, how can I get the Ultimate listview?

thank you :sign0098:
 

airblaster

Active Member
Licensed User
Longtime User
Hi Informatix,

your library looks interesting.
Just wondering if you could post any code examples of how to use the library?
This would make it easier to understand the basics of the library.
 

Informatix

Expert
Licensed User
Longtime User
Hi Informatix,

your library looks interesting.
Just wondering if you could post any code examples of how to use the library?
This would make it easier to understand the basics of the library.

I prefer to not expose code here, but I can explain how it works basically:
1) you declare the different appearances (called layouts) of items;
2) you build a virtual list (all items are empty; it is needed to know the number of items and the layout of each one);
3) when requested in real time, you fill the item with views and content.

The library uses a more complex algorithm than the one in the Table class and builds its list in a more efficient way, but the main idea behind is similar.
 

airblaster

Active Member
Licensed User
Longtime User
Hi Informatix,

thanks for the outlining of the workflow.

One more question:
What are the licensing terms for ULV?
 
Top