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:

johndb

Active Member
Licensed User
Longtime User
Thanks for the replies
Can I ask a couple of questions before I purchase
1. If I want TAB pages do I use the standard B4A Tabs or does ULV have a Tab pages method.
2.Can I display a Master record (like an Invoice Header) followed by detail Line Items, then Master and detail again etc. Obviously the detail has a different layout and size (depth) than the Master. Would that be like your Sections Demo - if so can you have multiple lines in the 1st (header) Line (Countries in your example)
3. Can they scroll both vertically and horizontally

Apologizes if these question have been answered in the previous 47 pages - I started to go thru them but so much was detail and irrelevant to me
1. ULV does not have an integrated TAB feature.
2. You can have different layouts for different list entries.
3. Only vertically
 

incendio

Well-Known Member
Licensed User
Longtime User
ULV has no idea of the data displayed in each item. It does not prevent you from creating a pivot table but it won't do it automatically.
Does latest ULV has capability to drill down the row ?

Sorry to ask, not follow the progress of ULV, my latest version was 4.02, which I think don't have a drill down feature, or does it?

Btw, I am very satisfied with ULV, do you have a plan to port it to ABMaterial?
 

Informatix

Expert
Licensed User
Longtime User
When people ask me for support, they often send me code pasted in the email. Most of the time, this code is difficult to read because the indentation is lost, there is no syntax highlighting and some parts are missing. Besides, I can't try this code. SO PLEASE, STOP SENDING ME PASTED CODE. Send me your project instead, or a simplified project that reproduces the error. I can sign a non-disclosure agreement if you wish, but stop sending me only a few lines (it's not uncommon that the problem lies in the remaining code).
 

armasoft

New Member
Licensed User
I'm in the process of installing ULV, but have a couple of problems. The installation guide says:

2) Unzip the ULV package, and unzip all the files in the “Libraries” folder and its subfolders - done, but why are there zip files within a zip file?
3) Copy all JAR files and XML documents to the folder of additional libraries of B4A. - Do I just copy all files to the 'additional libraries' folder, or do I need to maintain the directory structure?

Apologies if this should be obvious, but I'm new to B4A and have no idea how things work as yet.
 

Informatix

Expert
Licensed User
Longtime User
I'm in the process of installing ULV, but have a couple of problems. The installation guide says:

2) Unzip the ULV package, and unzip all the files in the “Libraries” folder and its subfolders - done, but why are there zip files within a zip file?
3) Copy all JAR files and XML documents to the folder of additional libraries of B4A. - Do I just copy all files to the 'additional libraries' folder, or do I need to maintain the directory structure?

Apologies if this should be obvious, but I'm new to B4A and have no idea how things work as yet.
1) Support is only provided by email.
2) The main archive of ULV, the one that you downloaded, contains other libraries required by the examples and these libraries are as they can be found in the forum, in their original zip archive.
3) In the lib folder, files are ignored if you place them in a subfolder. So don't create subfolders.
In brief, you just have to unzip all zip containing a .jar and a .xml in the additional lib folder of B4A.
 

Duncan H Williamson

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

I purchased copy of ultimatelist view a while ago, I have to say it looks great!! and performs really well !!
I have a need to create a tree and load the data from a sqlite data table
do you have any examples of utilising the tree this way ?

Regards

Duncan
 

npsonic

Active Member
Licensed User
Do you accept cryptocurrencies? ETH, BTC, ... ?
 

Informatix

Expert
Licensed User
Longtime User
Reminder: Support is only provided by email.
There's an example of Tree and many examples using a SQlite DB in the provided examples, but not an example of Tree using a DB. That being said, ULV does not care about the source of data so merging both cases is very easy.
 

imbault

Well-Known Member
Licensed User
Longtime User
Hi Fred,

I think there is a small bug in ULV: V4.4

If you load a layout, then create a HSV just below a TextField, the textfield is disable....
Like this :

descsample_txt will be disabled...

B4X:
    Activity.LoadLayout("Resultats")   
    Activity.Title="RESULTATS"

    Dim VertPos As Int
   
    'descsample_txt is the last textfield
   
    VertPos= descsample_txt.Top +descsample_txt.Height -50dip
   

   
    VertPos= VertPos + 5dip

    HSV.Initialize(100%x)
    Activity.AddView(HSV, 0dip, VertPos, 100%x, 100%y )
   
    Try
        Dim jHSV As JavaObject = HSV
        jHSV.RunMethod("setOverScrollMode", Array As Object(2)) '2 = OVER_SCROLL_NEVER
    Catch
        'Not allowed by the OS
        Log("Cannot disable the over-scroll")
    End Try

       
    pnlHeader.Initialize("")
    Dim LeftPos As Int =0dip
    For i = 0 To Widths.Length -1
        Dim cd As ColorDrawable
        cd.Initialize(Colors.RGB(255,170,0), 0dip)
       
        cd.Initialize(Main.SGS_GREY_COLOR, 0dip)
       
        Dim tFace As Typeface
        tFace = Typeface.CreateNew(Typeface.SANS_SERIF, Typeface.STYLE_BOLD)

        lblH(i).Initialize("titre")
        lblH(i).Color = Colors.Transparent
        lblH(i).Background = cd
        lblH(i).TextColor = Colors.White
        lblH(i).Typeface= tFace
        lblH(i).TextSize = 18


        lblH(i).Gravity = Gravity.CENTER_HORIZONTAL + Gravity.CENTER_VERTICAL
        Select i
            Case 0:
            lblH(i).Text = "N°"
            lblH(i).Tag = "numero"
            Case 1:
            lblH(i).Text = "Analyse"
            lblH(i).Tag = "analyse"
            Case 2:
            lblH(i).Text = "Resultat"
            lblH(i).tag = "resultat"
            Case 3:
            lblH(i).Text = "Type/Unité"
            lblH(i).tag = "Unite"
        End Select
       
        lblH(i).Tag = i
        pnlHeader.AddView(lblH(i), LeftPos + Bit.ShiftRight(DividerWidth, 1), 0, Widths(i) - DividerWidth, HeaderHeight)
        LeftPos = LeftPos + Widths(i)
    Next
   
   
    HSV.Panel.AddView(pnlHeader, 0, HeaderHeight, nTotWidth , 50dip)


    'Initializes an ULV_FixedCol and enables its fast scroller
    ULV_FixedCol.Initialize(0, 0, "", "ULV_FixedCol")
    ULV_FixedCol.SetStyle(ULV_FixedCol.STYLE_HOLO_LIGHT)
    ULV_FixedCol.DividerHeight = 0
    ULV_FixedCol.FastScroller(False)
   
    ULV_FixedCol.AddRowLayout("VIEW_FIXED", "Fixed_RowLayoutCreator", "Fixed_RowContentFiller", 60dip, 1, Array As Int(100dip), DividerWidth , Colors.gray, True)
   
    ULV_FixedCol.BulkAddItems(ListResults.Size, "VIEW_FIXED", 0)
   

   
    Dim MenuHeader =0dip As Int
   

    ULV.Initialize(0, 0, "", "ULV")
    ULV.DividerHeight = 0
    ULV.FastScroller(True)
    ULV.SetStyle(ULV.STYLE_HOLO_LIGHT)
   
    'Creates a layout for the header
    ULV.AddLayout("TABLE_HEADER", "Header_LayoutCreator", "Header_ContentFiller", HeaderHeight, False)

   
    ULV.AddRowLayout("TABLE_ROW", "Cell_RowLayoutCreator", "Cell_RowContentFiller", 60dip,4, Widths, DividerWidth, Colors.Black, True)

   
   
    VertPos = VertPos + HeaderHeight + 50dip

    HSV.Panel.AddView(ULV, 0dip, HeaderHeight+ pnlHeader.Height, nTotWidth   , 100%y - VertPos )
 

Informatix

Expert
Licensed User
Longtime User
Hi Fred,

I think there is a small bug in ULV: V4.4

If you load a layout, then create a HSV just below a TextField, the textfield is disable....
Like this :

descsample_txt will be disabled...

B4X:
    Activity.LoadLayout("Resultats")  
    Activity.Title="RESULTATS"

    Dim VertPos As Int
  
    'descsample_txt is the last textfield
  
    VertPos= descsample_txt.Top +descsample_txt.Height -50dip
  

  
    VertPos= VertPos + 5dip

    HSV.Initialize(100%x)
    Activity.AddView(HSV, 0dip, VertPos, 100%x, 100%y )
  
    Try
        Dim jHSV As JavaObject = HSV
        jHSV.RunMethod("setOverScrollMode", Array As Object(2)) '2 = OVER_SCROLL_NEVER
    Catch
        'Not allowed by the OS
        Log("Cannot disable the over-scroll")
    End Try

      
    pnlHeader.Initialize("")
    Dim LeftPos As Int =0dip
    For i = 0 To Widths.Length -1
        Dim cd As ColorDrawable
        cd.Initialize(Colors.RGB(255,170,0), 0dip)
      
        cd.Initialize(Main.SGS_GREY_COLOR, 0dip)
      
        Dim tFace As Typeface
        tFace = Typeface.CreateNew(Typeface.SANS_SERIF, Typeface.STYLE_BOLD)

        lblH(i).Initialize("titre")
        lblH(i).Color = Colors.Transparent
        lblH(i).Background = cd
        lblH(i).TextColor = Colors.White
        lblH(i).Typeface= tFace
        lblH(i).TextSize = 18


        lblH(i).Gravity = Gravity.CENTER_HORIZONTAL + Gravity.CENTER_VERTICAL
        Select i
            Case 0:
            lblH(i).Text = "N°"
            lblH(i).Tag = "numero"
            Case 1:
            lblH(i).Text = "Analyse"
            lblH(i).Tag = "analyse"
            Case 2:
            lblH(i).Text = "Resultat"
            lblH(i).tag = "resultat"
            Case 3:
            lblH(i).Text = "Type/Unité"
            lblH(i).tag = "Unite"
        End Select
      
        lblH(i).Tag = i
        pnlHeader.AddView(lblH(i), LeftPos + Bit.ShiftRight(DividerWidth, 1), 0, Widths(i) - DividerWidth, HeaderHeight)
        LeftPos = LeftPos + Widths(i)
    Next
  
  
    HSV.Panel.AddView(pnlHeader, 0, HeaderHeight, nTotWidth , 50dip)


    'Initializes an ULV_FixedCol and enables its fast scroller
    ULV_FixedCol.Initialize(0, 0, "", "ULV_FixedCol")
    ULV_FixedCol.SetStyle(ULV_FixedCol.STYLE_HOLO_LIGHT)
    ULV_FixedCol.DividerHeight = 0
    ULV_FixedCol.FastScroller(False)
  
    ULV_FixedCol.AddRowLayout("VIEW_FIXED", "Fixed_RowLayoutCreator", "Fixed_RowContentFiller", 60dip, 1, Array As Int(100dip), DividerWidth , Colors.gray, True)
  
    ULV_FixedCol.BulkAddItems(ListResults.Size, "VIEW_FIXED", 0)
  

  
    Dim MenuHeader =0dip As Int
  

    ULV.Initialize(0, 0, "", "ULV")
    ULV.DividerHeight = 0
    ULV.FastScroller(True)
    ULV.SetStyle(ULV.STYLE_HOLO_LIGHT)
  
    'Creates a layout for the header
    ULV.AddLayout("TABLE_HEADER", "Header_LayoutCreator", "Header_ContentFiller", HeaderHeight, False)

  
    ULV.AddRowLayout("TABLE_ROW", "Cell_RowLayoutCreator", "Cell_RowContentFiller", 60dip,4, Widths, DividerWidth, Colors.Black, True)

  
  
    VertPos = VertPos + HeaderHeight + 50dip

    HSV.Panel.AddView(ULV, 0dip, HeaderHeight+ pnlHeader.Height, nTotWidth   , 100%y - VertPos )
Sorry but I don't see the relationship with ULV. If your textfield is disabled, that cannot be because of ULV or HSV, only because of your code. ULV and HSV have no control over the other views of your activity (and they don't attempt to). Are you sure that you enabled the TextView in the designer?
 

imbault

Well-Known Member
Licensed User
Longtime User
Sorry but I don't see the relationship with ULV. If your textfield is disabled, that cannot be because of ULV or HSV, only because of your code. ULV and HSV have no control over the other views of your activity (and they don't attempt to). Are you sure that you enabled the TextView in the designer?

Sorry Fred, but the textfield is enabled, but after instanciating HSV, it is disabled, and by the way if I add more space between this textfield and HSV, it's fine like this:

B4X:
'VertPos= descsample_txt.Top +descsample_txt.Height -50dip
' More Space :
VertPos= descsample_txt.Top +descsample_txt.Height -20dip
 

Informatix

Expert
Licensed User
Longtime User
Sorry Fred, but the textfield is enabled, but after instanciating HSV, it is disabled, and by the way if I add more space between this textfield and HSV, it's fine like this:

B4X:
'VertPos= descsample_txt.Top +descsample_txt.Height -50dip
' More Space :
VertPos= descsample_txt.Top +descsample_txt.Height -20dip
So you probably covered the textfield with the HSV in your layout.
 
Top