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:

itgirl

Active Member
Licensed User
Longtime User
Someone reported that UltimateListView does not work well with the AHSwipeToRefresh library. Indeed, AHSwipeToRefresh tries to intercept the touch events of the associated view to handle the swipe gesture and UltimateListView does the same with its internal ListView, so the result is a bit unpredictable when you mix both libraries. That being said, ULV does not need AHSwipeToRefresh (and its extra 650 Kb of code) as it can reproduce easily the same behavior with its native functions and events. An example is available on request.

so can we really reproduce the same behavior without the extra 650KB an example would be great,
also when you first open the ULV and scroll down very fast before the items get populated i get an Error saying that there's no layout, im not sure if any one knows what im talking about but , it happened like 3 times and im trying to reproduce the error and catch the debug msgs. but i cant seem to get it again :(
 

itgirl

Active Member
Licensed User
Longtime User
B4X:
** Activity (main) Pause, UserClosed = false **


Ignoring event: ulv_scrolled


Ignoring event: ulv_scrolled
** Activity (main) Resume **


java.lang.RuntimeException: Object should first be initialized (View).


Did you forget to call Activity.LoadLayout?
    at anywheresoftware.b4a.AbsObjectWrapper.getObject(AbsObjectWrapper.java:46)
    at anywheresoftware.b4a.objects.ViewWrapper.setBackground(ViewWrapper.java:91)
    at myapp.example.me.main._ulv_cleaner(main.java:2126)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:515)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:175)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:163)
    at anywheresoftware.b4a.BA.raiseEvent(BA.java:159)
    at flm.b4a.ultimatelistview.UltimateListViewWrapper$2.onMovedToScrapHeap(SourceFile:209)
    at android.widget.AbsListView$RecycleBin.addScrapView(AbsListView.java:8304)
    at android.widget.AbsListView.trackMotionScroll(AbsListView.java:6615)
    at android.widget.AbsListView.scrollIfNeeded(AbsListView.java:3942)
    at android.widget.AbsListView.onTouchMove(AbsListView.java:4785)
    at android.widget.AbsListView.onTouchEvent(AbsListView.java:4613)


    at flm.b4a.ultimatelistview.UltimateListView.onTouchEvent(SourceFile:338)
    at android.view.View.dispatchTouchEvent(View.java:8107)
    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2405)
    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2129)
    at flm.b4a.ultimatelistview.UltimateListView.dispatchTouchEvent(SourceFile:501)
    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2411)
    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2144)
    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2411)
    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2144)
    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2411)
    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2144)
    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2411)
    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2144)
    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2411)
    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2144)
    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2411)
    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2144)
    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2411)
    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2144)
    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2411)
    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2144)
    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2411)
    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2144)
    at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:2280)
    at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1615)
    at android.app.Activity.dispatchTouchEvent(Activity.java:2544)
    at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:2228)
    at android.view.View.dispatchPointerEvent(View.java:8315)
    at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:4597)
    at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:4465)
    at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4023)
    at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4077)
    at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4046)
    at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:4157)
    at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4054)
    at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:4214)
    at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4023)
    at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4077)
    at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4046)
    at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4054)
    at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4046)
    at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4054)
    at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4023)
    at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:6404)
    at andr
Message longer than Log limit (4000). Message was truncated.
java.lang.RuntimeException: Object should first be initialized (View).
Did you forget to call Activity.LoadLayout?
** Activity (main) Pause, UserClosed = false **


Fatal signal 11 (SIGSEGV) at 0x00000038 (code=1), thread 31026 (myapp.example.me)


i was able to reprodue the error it happens when you scroll fast and some views dont get initialized or something im not sure
 

Informatix

Expert
Licensed User
Longtime User
B4X:
** Activity (main) Pause, UserClosed = false **


Ignoring event: ulv_scrolled


Ignoring event: ulv_scrolled
** Activity (main) Resume **


java.lang.RuntimeException: Object should first be initialized (View).


Did you forget to call Activity.LoadLayout?
    at anywheresoftware.b4a.AbsObjectWrapper.getObject(AbsObjectWrapper.java:46)
    at anywheresoftware.b4a.objects.ViewWrapper.setBackground(ViewWrapper.java:91)
    at myapp.example.me.main._ulv_cleaner(main.java:2126)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:515)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:175)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:163)
    at anywheresoftware.b4a.BA.raiseEvent(BA.java:159)
    at flm.b4a.ultimatelistview.UltimateListViewWrapper$2.onMovedToScrapHeap(SourceFile:209)
    at android.widget.AbsListView$RecycleBin.addScrapView(AbsListView.java:8304)
    at android.widget.AbsListView.trackMotionScroll(AbsListView.java:6615)
    at android.widget.AbsListView.scrollIfNeeded(AbsListView.java:3942)
    at android.widget.AbsListView.onTouchMove(AbsListView.java:4785)
    at android.widget.AbsListView.onTouchEvent(AbsListView.java:4613)


    at flm.b4a.ultimatelistview.UltimateListView.onTouchEvent(SourceFile:338)
    at android.view.View.dispatchTouchEvent(View.java:8107)
    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2405)
    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2129)
    at flm.b4a.ultimatelistview.UltimateListView.dispatchTouchEvent(SourceFile:501)
    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2411)
    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2144)
    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2411)
    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2144)
    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2411)
    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2144)
    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2411)
    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2144)
    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2411)
    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2144)
    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2411)
    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2144)
    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2411)
    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2144)
    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2411)
    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2144)
    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2411)
    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2144)
    at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:2280)
    at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1615)
    at android.app.Activity.dispatchTouchEvent(Activity.java:2544)
    at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:2228)
    at android.view.View.dispatchPointerEvent(View.java:8315)
    at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:4597)
    at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:4465)
    at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4023)
    at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4077)
    at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4046)
    at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:4157)
    at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4054)
    at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:4214)
    at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4023)
    at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4077)
    at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4046)
    at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4054)
    at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4046)
    at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4054)
    at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4023)
    at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:6404)
    at andr
Message longer than Log limit (4000). Message was truncated.
java.lang.RuntimeException: Object should first be initialized (View).
Did you forget to call Activity.LoadLayout?
** Activity (main) Pause, UserClosed = false **


Fatal signal 11 (SIGSEGV) at 0x00000038 (code=1), thread 31026 (myapp.example.me)


i was able to reprodue the error it happens when you scroll fast and some views dont get initialized or something im not sure
You can scroll as fast as you want. This is not related. I see in your log that you pause then resume the app while the list is scrolled. Could you explain what you did exactly? And I see that you call the cleaner event. Are you sure that you clean the right data? If you comment out this event, does the app work better?
 

aldomoscarda

Member
Licensed User
Longtime User
[Quote = "Informatix post: 138740, miembro de: 22203"]. Gracias [/ quote]
I just donated 25 euros to UltimaListview. You can send me the license key?
 

Informatix

Expert
Licensed User
Longtime User
I'm currently on vacation until the middle of August. I won't be able to support UltimateListView or send the download link during this time.
I will post a new version when I come back that includes a workaround for a bug found recently (I cannot fix it directly as it is in the Google's code). It affects selections when the list contents is changed and does not keep the same number of items. It produces an Out of bounds exception. More details here and here.
 

ddahan

Member
Licensed User
Longtime User
Hi
I've sent 25Euros donation. Please send me the license when possible.
Have a great vacation.
David.
 

Marlon Tayag

Member
Licensed User
Longtime User
B4X:
Dear Sir,

Can you please help I'm trying to create an expandable listview or expandable section that uses 2 hierarchy made up of category and its sub category using sqllite database.
Ex:

Appetizer
     Chicken Wrap
     Calamares
     Eggs
Desserts
    Ice Cream
    Cake

I'm really having trouble in doing it. Can you please help me by giving me an example. Thanks
 

gregbug

Member
Licensed User
Longtime User
Hi
I've sent 25Euros donation. Please send me the license when possible.
Have a great vacation.

thanks,
Gianluca.
 

Gabriel Loria Salmeron

Member
Licensed User
Longtime User
Hi Informatix, God bless you.

Is there a way to use the ULV like a combobox, like VB.Net for example?

Excuse me if this was asking before or if this is out of topic.

Gabriel Loría
 

Informatix

Expert
Licensed User
Longtime User
I just sent a bulk email with a link to the new version. Check your inbox (then your spam folder if you find nothing). I usually have problems when I send this quantity of emails so I'm pretty sure that some of you will get two times the message or nothing (I use my ordinary mailbox to send them, not a dedicated one). Don't hesitate to send me an email to request your link if you don't receive it (please indicate your name or your company name in the email so I can identify you because some of you use many email addresses). Thanks again to all of you!
 

Informatix

Expert
Licensed User
Longtime User
B4X:
Dear Sir,

Can you please help I'm trying to create an expandable listview or expandable section that uses 2 hierarchy made up of category and its sub category using sqllite database.
Ex:

Appetizer
     Chicken Wrap
     Calamares
     Eggs
Desserts
    Ice Cream
    Cake

I'm really having trouble in doing it. Can you please help me by giving me an example. Thanks
Are you a donor of ULV? Could you give me your name please? I can't identify you.
I prefer to be contacted by email for the ULV support.
 

Informatix

Expert
Licensed User
Longtime User
Hi
I've sent 25Euros donation. Please send me the license when possible. Thanks.
Thank you, but as I said many times before, I trust only the email sent by Paypal so it's useless to send a message in the forum to announce a donation (I say that to avoid filling this thread with only this kind of message and because it's a waste of time for the sender BUT I'm very pleased by the donation and there's no offense ;)).
 
Top