Android Question CustomListView library has no lonclick event

kohle

Active Member
Licensed User
Longtime User
In B4i the iCustomListview library has a longclick event , in b4a there is no.

My customlistview library is 1.5, I dont know if it comes with b4a or if I copied.
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
There are two different implementations of CustomListView.
The older one is named CustomListView and the newer is xCustomListView. The class in both cases is named CustomListView.

For new projects it is recommended to use xCustomListView. It is cross platform and has many features not available in the older implementation.

xCustomListView: https://www.b4x.com/android/forum/t...-cross-platform-customlistview.84501/#content

There is no built-in LongClick event in xCustomListView though it should be very simple to add. See how the Click event is handled and add LongClick.
You can also implement it outside of the class by adding it to the panel that you create.
 
Upvote 0

kohle

Active Member
Licensed User
Longtime User
I have to make changes for an existing project, I see that switching to the new xcustomlistview is some work and no option now.
I will use the new class for new projects.
Thanks for the infos.
 
Upvote 0

Serge Bertet

Active Member
Licensed User
Hi,
There is no built-in LongClick event in xCustomListView though it should be very simple to add
should be very simple but not for beginners
Tryed :
CLV_ItemLongClick with pnl.Initialize("CLV_Item") and p.Initialize("CLV")
but no result

Serge
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…