B4A Library [B4X] CLVExpandable - Allows expanding or collapsing xCustomListView items

Erel

Administrator
Staff member
Licensed User


This class replaces the custom CustomListView module (https://www.b4x.com/android/forum/threads/b4x-xui-expandable-list-based-on-xcustomlistview.86449/).
It works with the standard xCustomListView library.
It is compatible with B4A, B4i and B4J.

Instructions:

An expandable item layout should be made of two panels. The first one is the title and the second one is the item's body.
The title panel should include at least two items where the second item is a view with the arrow (you can easily change this by modifying the code).
The item layout background must be transparent.
It is also recommended to remove AutoScaleAll from the item layout.

The class is included in the attached examples.

CLVExpandable + lazy loading example: https://www.b4x.com/android/forum/threads/huawei-p20-and-expandableclv.115110/post-719519
 

Attachments

Last edited:

lerneBasic4Android

Member
Licensed User
Hi,

This is great new feature of CLV which I would love to use it in my project!

But I'm facing a general problem regarding the current implementation of CLVExpandable. It seems not to be compatible with the strategy Erel suggested for lazy loading in https://www.b4x.com/android/forum/t...ew-lazy-loading-virtualization.87930/#content.

For example in CreateValue() the title and item panels are used to calculate the collapsed height and the expanded height. But when using lazy loading the whole panel does not have any views yet. It creates both views in the moment when an items gets visible.

Did anyone found a solution to make this great expandable feature usable with lazy loading?

Thanks,
Thomas
 

sdleidel

Member
Licensed User
Hi Erel,
yes thats right,
but i would like load more then one layout/item...
Sample...
Item#1 : Load the Layout 2x
Item#3 : Load the Layout 4x...

Sascha
 
Top