B4J Library [class] CLVDragger - drag to reorder items


Staff member
Licensed User

- Call dragger.AddDragButtons to add the drag button.
- Call dragger.RemoveDragButtons to remove the buttons.
- Call dragger.Resize when the parent resizes.

See the attached example.

For now it is a B4J only class.

Depends on jXUI v1.91+ and xCustumListView v1.70+


Eme Fibonacci

Well-Known Member
Licensed User
I Can see something like this on my android 8.

Of course, this can be checked in settings > System> Languages & Input> Language> Language Preferences.

Maybe android version may have others functions:

In android 8 this type of vision is always movable.
There is a title bar and a "more" button on the top right side.
At bottom of list there is a "Add another item" button.

Just a suggestion.


Active Member
Licensed User
How would it be possible to enhance the drag action so that it does not stop when the dragged item reaches the top of the CLV window when there are still some items above it?

In other words, there's a CLV with 50 items say, and 10 are displayed at a time. You start dragging item 50 and when it reaches item 40, ie the top of the CLV window, the dragging action stops, even though the item is still pressed. One way to keep the dragging going is to continuously wiggle the finger on the item, but it's not very satisfying from a user viewpoint.

How could we modify the code so that the dragging carries on until the finger is lifted?

Thank you.

Bill Milleker

New Member
Licensed User
When there are only a few items, I'm seeing a problem when the CustomListView resizes.

In the example code, set the loop to add only 6 items. When the window is resized, each item's width shrinks to accommodate a non-existent scroll bar.

When an item is dragged and dropped, it expands to full width.