B4A Library [Lib] UltimateListView

Informatix

Expert
Licensed User
Longtime User
In this case, I let the system decide (each device has its own settings to detect a scroll). However, you can use the Touch event and do the computation between the current Y and the previous Y. You can block the scroll by returning True.
 

Rusty

Well-Known Member
Licensed User
Longtime User
Nice move donating to the doctors!

To all those who are interested: this library is very functional; Informatix' support is excellent; the documentation is very well done and the examples are superb!

I wish all paid for libraries were as well documented and supported.
Rusty
 

Rusty

Well-Known Member
Licensed User
Longtime User
In this case, I let the system decide (each device has its own settings to detect a scroll). However, you can use the Touch event and do the computation between the current Y and the previous Y. You can block the scroll by returning True.
Ok, i put the calculation in the UlistView_ItemTouch(Position As Int, Action As Int, X As Int, Y As Int, TouchedPanel As Panel) event.
when I return TRUE, the compiler complains about the sub not having a return value type.
Should I be returning True from within the itemtouch event?
Rusty
 

TheMightySwe

Active Member
Licensed User
Longtime User
Hi, is it possible to drag and drop between two UltimateListViews?

(I know you probably can, but i just want to be sure)

// TMS

AH screw it, it looks great, Just made the donation.

89123214UN388791L
 
Last edited:

Informatix

Expert
Licensed User
Longtime User
It's the Touch event of the list:
Sub ULV_Touch(Action As Int, X As Int, Y As Int, MotionEvent As Object) As Boolean
Use Space+Tab after Sub in the IDE to see all events for ULV.
 

Informatix

Expert
Licensed User
Longtime User
Hi, is it possible to drag and drop between two UltimateListViews?

(I know you probably can, but i just want to be sure)

// TMS

AH screw it, it looks great, Just made the donation.

89123214UN388791L
Yes, that works between two ULV. When the item is dropped on the second ULV, you have to insert a new item in this ULV. The problem is to know exactly what's the insertion position.

Thank you for your donation.
 

TheMightySwe

Active Member
Licensed User
Longtime User
Yes, that works between two ULV. When the item is dropped on the second ULV, you have to insert a new item in this ULV. The problem is to know exactly what's the insertion position.

Thank you for your donation.


That is not a problem, I just insert it at the bottom.
 

aaronk

Well-Known Member
Licensed User
Longtime User
Just wondering is the ULV supported on Android 5.0 Lollipop ?
I seem to keep getting the following error, but I don't get this error when running the same code on Android 4.4.4. KitKat:

B4X:
java.lang.NullPointerException: Attempt to invoke virtual method 'void android.graphics.drawable.Drawable.setAlpha(int)' on a null object reference
    at flm.b4a.scrollview2d.EdgeEffect.draw(EdgeEffect.java:320)
    at flm.b4a.scrollview2d.TwoDScrollView.draw(TwoDScrollView.java:1967)
    at android.view.View.draw(View.java:15022)
    at android.view.ViewGroup.drawChild(ViewGroup.java:3404)
    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3198)
    at android.view.View.draw(View.java:15117)
    at android.view.View.draw(View.java:15022)
    at android.view.ViewGroup.drawChild(ViewGroup.java:3404)
    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3198)
    at android.view.View.draw(View.java:15017)
    at android.view.ViewGroup.drawChild(ViewGroup.java:3404)
    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3198)
    at android.view.View.draw(View.java:15017)
    at android.view.ViewGroup.drawChild(ViewGroup.java:3404)
    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3198)
    at android.view.View.draw(View.java:15117)
    at android.widget.FrameLayout.draw(FrameLayout.java:592)
    at com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:2595)
    at android.view.ViewRootImpl.drawSoftware(ViewRootImpl.java:2606)
    at android.view.ViewRootImpl.draw(ViewRootImpl.java:2519)
    at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2337)
    at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1968)
    at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1054)
    at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5779)
    at android.view.Choreographer$CallbackRecord.run(Choreographer.java:767)
    at android.view.Choreographer.doCallbacks(Choreographer.java:580)
    at android.view.Choreographer.doFrame(Choreographer.java:550)
    at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:753)
    at android.os.Handler.handleCallback(Handler.java:739)
    at android.os.Handler.dispatchMessage(Handler.java:95)
    at android.os.Looper.loop(Looper.java:135)
    at android.app.ActivityThread.main(ActivityThread.java:5221)
    at java.lang.reflect.Method.invoke(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:372)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)

On Android 5.0 Lollipop, if I scroll down the list it comes up with the above error in the B4A IDE Log, but the app closes and says Unfortunately app has stoped, without telling me in my code where the error is.

I am guessing it's within the ULV code where the error is?

Any ideas on how to fix it so it doesn't crash the app ?
 

Informatix

Expert
Licensed User
Longtime User
I received your email so there's no need to post also here. Reminder for everyone: I provide support only from monday to friday for ULV, so every email received at the end of the week won't get an answer before monday.

Your error message concerns ScrollView2D, so you are probably using a very old version of ULV, when ULV was a class written in B4A and based on ScrollView2D. You should update it. I sent you the link to the last version (4.01) at the beginning of this month.
I tested ULV with Lollypop and it is compatible at 99.99% (the only issue is the same as with the L preview: the fastscroller state cannot be read, which is a minor inconvenience).

Concerning the special version of Scrollview2D delivered with the former versions of ULV, it won't get updated. To use a compatible version, get the version 1.1 available in the B4A forum.
 
Last edited:

Informatix

Expert
Licensed User
Longtime User
An user reported a strange issue with Turkish language and ULV. It seems that Android fails to convert some letters (e.g. i) to uppercase and that produces an issue with layouts. An easy fix is to convert yourself all your layout names in uppercase.
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
This issue is related to the Turkish 'I' character being converted to a character other than 'i'. The solution is to never use String.ToLowerCase() or String.ToUpperCase().

Instead use String.ToLowerCase(BA.cul) or ToUpperCase(BA.cul).

Note that is not related to Android. It will happen in any language or environment.
 

Informatix

Expert
Licensed User
Longtime User
In my Java code, I use toUpperCase(BA.cul) most of the time, except in some functions. That will be fixed in a future version.
 

Informatix

Expert
Licensed User
Longtime User
How to use the RippleEffect library with ULV:

Add the initialization code at the end of the LayoutCreator sub, e.g.:
B4X:
Dim rv As RippleView
rv.Initialize(CellPanel, Colors.Blue, 200, False)

And treat the RippleView as an extra panel in the ContentFiller sub, e.g.:
B4X:
Dim pnlRipple As Panel = CellPanel.GetView(0)
Dim lbl As Label = pnlRipple.GetView(0)
 

cimperia

Active Member
Licensed User
Longtime User
A quick word to show my appreciation. I got the ULV library a week or so ago. It's very fast, well documented and very rich in functionality.
Furthermore Frederic's responsiveness is second to none: I've contacted him with a few issues I was having and the answer was always fast and the problem sorted.

Claudio
 

shashkiranr

Active Member
Licensed User
Longtime User
Hi Fred,

Getting a Null pointer exception when i add the following lines in my layoutcreator sub

B4X:
Dim rv As RippleView
        rv.Initialize(LayoutPanel, Colors.Blue, 200, False)

Regards,
SK
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…