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

expander-gif.57508


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

Better implementation of Expand: https://www.b4x.com/android/forum/t...if-expanded-part-is-hidden.125532/post-783871
 

Attachments

  • B4J_ExpandableList.zip
    5.3 KB · Views: 1,174
  • B4i_ExpandableList.zip
    5.7 KB · Views: 814
  • B4A_ExpandableList.zip
    11.2 KB · Views: 2,194
Last edited:

b4x-de

Active Member
Licensed User
Longtime 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

Active Member
Licensed User
Longtime 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
 

esya

New Member
expander-gif.57508


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

Better implementation of Expand: https://www.b4x.com/android/forum/t...if-expanded-part-is-hidden.125532/post-783871
how to remove the color?
 
Top