Android Tutorial [B4X] [XUI] Expandable list based on xCustomListView

Status
Not open for further replies.
Edit: Better to use CLVExpandable class: https://www.b4x.com/android/forum/t...g-or-collapsing-xcustomlistview-items.106148/

Compatible with B4A, B4J and B4i.

expander-gif.57508
SS-2017-11-23_18.09.40.png
SS-2017-11-23_18.10.25.png



This example uses a slightly modified version of xCustomListView to create an expandable list.

Each item in the list is made of two panels. One for the title with the arrow and the other is the expanded panel.
Note that the expanded items height can be different for different items.

Dependencies:
B4A: XUI, StringUtils, JavaObject
B4J: XUI, JavaObject
B4i: XUI

Tips:
- The order of items in the Item layout is important. pnlTitle should be the first item and the ImageView should be the second child:
SS-2017-11-23_18.14.23.png



- The latest version is included in the B4A project. It is based on xCustomListView v1.65.
The first line in the class:
B4X:
'xCustomListView v1.65 - modified version to support expandable items

The class is compatible with all three platforms.
 
Last edited:

ihabsharaf

Member
Licensed User
Longtime User
i try to use this code

B4X:
Dim r As Reflector
   r.Target = Cvr
   r.RunMethod2("setVerticalScrollBarEnabled", False, "java.lang.boolean")
but not work with customelistview

what the method for disable scroll bar in customelistview
 

hibrid0

Active Member
Licensed User
Longtime User
Hi, how can I get the events inside the item?
I generate member button click event, but get the same click on all buttons.
 
Status
Not open for further replies.
Top