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:

rkxo

Active Member
Licensed User
Longtime User
hi ,i get this error with v28 sdk when i scroll in android 9.
B4X:
java.lang.NoSuchFieldException: No field mState in class Landroid/widget/FastScrollerEx; (declaration of 'android.widget.FastScrollerEx' appears in /system/framework/framework.jar!classes2.dex)
my manifest config is this
<uses-sdk android:minSdkVersion="10" android:targetSdkVersion="28"/>

any idea?

thanks
 

Informatix

Expert
Licensed User
Longtime User
hi ,i get this error with v28 sdk when i scroll in android 9.
B4X:
java.lang.NoSuchFieldException: No field mState in class Landroid/widget/FastScrollerEx; (declaration of 'android.widget.FastScrollerEx' appears in /system/framework/framework.jar!classes2.dex)
my manifest config is this


any idea?

thanks
AFAIK, it's just a warning so you can ignore it. The code of ULV takes this into account and works as expected.
 

rleiman

Well-Known Member
Licensed User
Longtime User
Greetings Informatix,

Can you look up my details and send me a link for the latest release of your UltimateListView?

Thanks so much.
 

Informatix

Expert
Licensed User
Longtime User
I've just learned that my region is going to be the new epicenter in France of the Covid-19 outbreak. The hospital in my town (Aubagne) is calling for donations. To encourage donations, I propose to explain in this forum, on Saturday, April 11, how I do to protect an application against copying or modification (if you are a ProBundle donor, you already know how).

Pending my explanations and to prove my method, your challenge is to copy the Play Store version from one device to another, or to modify the application available on my server (for example, perform an addition instead of a multiplication when clicking on Test). In the end, the application must be fully functional.
You can use all the means at your disposal (decompiler, external debugger, rooted device, etc.). The source code is here.

To donate, just click on the button in my signature. You can see the current amount on my Paypal account:
paypal.jpg

On Saturday, April 11th, I will make a donation with the full contents of the account. Thank you in advance for your generosity.
 
Last edited:

Frankie Lagrange

Member
Licensed User
I empathise as I live in London which is the epicentre of the UK epidemic and I will be supporting their effort here because the front-line medical personnel are working in the most atrocious conditions (lack of protective gears, ventilators etc.).

Good luck with your fund raising and keep well.
 

AnandGupta

Expert
Licensed User
Longtime User
It is time we fight together. All countries are suffering.
Here in India, our PM has opened "Prime Minister's National Relief Fund". People are contributing whatever they can.
More in news,

We have to stand together and help each other in this testing time.

Regards,

Anand
 

Informatix

Expert
Licensed User
Longtime User
As promised, the protection method used for the challenge is explained here:
 

jose sanjuan

Member
Licensed User
Longtime User
I have it set to 29 And it doesn't work in android 9

<uses-sdk android:minSdkVersion="5" android:targetSdkVersion="29"/>

Path android.jar:

C:\android-sdk\platforms\android-29\android.jar
 

incendio

Well-Known Member
Licensed User
Longtime User
I have it set to 29 And it doesn't work in android 9

<uses-sdk android:minSdkVersion="5" android:targetSdkVersion="29"/>

Path android.jar:

C:\android-sdk\platforms\android-29\android.jar
My android.jar :

C:\Android\platforms\android-30

It work fine with me.
 

Informatix

Expert
Licensed User
Longtime User
I have it set to 29 And it doesn't work in android 9

<uses-sdk android:minSdkVersion="5" android:targetSdkVersion="29"/>

Path android.jar:

C:\android-sdk\platforms\android-29\android.jar
Maybe you're in this case:
If not, please post more details.
 

Sergey_New

Well-Known Member
Licensed User
Longtime User
Can you please tell me how to set up the Tree so that it can expand horizontally? The example shows three generations, but more is needed.
 

incendio

Well-Known Member
Licensed User
Longtime User
Hi Everyone,

I have been using this Lib for a long time, since xCustomListView doesn't exist, this is great library.

Have a problem & hope you can help me.

I have a simple list of items contains only label in a single column, see attachment.

When label delete clicked (it is a Material Icon), want to delete the item from the list

B4X:
Sub Class_Globals
   Private ulv As UltimateListView
End Sub

Private Sub lblDel_Click
    Private Id = ulv.FindIDInVisibleItems(Sender) As Int
    Private Pos = ulv.GetPositionForID(Id,True) As Int
    
    LogColor("Id  : " & Id,Colors.Green)
    LogColor("Pos : " & Pos,Colors.Yellow)
    LogColor("Id2 : " & ulv.GetItemID(Pos),Colors.Yellow)
    ulv.RemoveItemAt(Pos)
    ulv.RefreshContent       
    Return
End Sub

Problem is, no matter which item clicked, always last item removed.
Is there something wrong with my codes?
 

Attachments

  • SS.png
    SS.png
    5.1 KB · Views: 158

Lello1964

Well-Known Member
Licensed User
Longtime User
You must tag selected item in ULV_CellClick then deleted item.

ULV_CellClick:
Sub ULV_CellClick(RowID As Long, CellIndex As Byte, Position As Int, ClickedPanel As Panel)
    PosToDelete  =  RowID
End Sub

delete button:
Sub btn_Delete_Click
    ulv.RemoveItemAt(PosToDelete )
    ulv.RefreshContent
End Sub

* PosToDelete must be declared as int in Global
 

incendio

Well-Known Member
Licensed User
Longtime User
You must tag selected item in ULV_CellClick then deleted item.

ULV_CellClick:
Sub ULV_CellClick(RowID As Long, CellIndex As Byte, Position As Int, ClickedPanel As Panel)
    PosToDelete  =  RowID
End Sub

delete button:
Sub btn_Delete_Click
    ulv.RemoveItemAt(PosToDelete )
    ulv.RefreshContent
End Sub

* PosToDelete must be declared as int in Global
Thanks for your replied.

It is not a button, it's a label.
When a label have a click method, ulv_cellclick method doesn't triggered, so those codes won't work.
 

Dave O

Well-Known Member
Licensed User
Longtime User
When you view the selected ID in the logs, is it correct?

Also, why not use a button and set its text just as you set the text in the label?
 

incendio

Well-Known Member
Licensed User
Longtime User
When you view the selected ID in the logs, is it correct?

Also, why not use a button and set its text just as you set the text in the label?
The ID is correct.

I use a label in order to use Material Icon.
 
Top