Android Tutorial [B4X] Creating a cross platform custom view packed as b4xlib


Staff member
Licensed User
The attached b4xlib library is a cross platform list of colors:

It is a XUI custom view. The custom view is based on two layout files. One for xCustomListView and another one for the items layout.
There is also a text file with the colors values.
As layout files files are platform specific we need to create a layout file for each platform.

Notes & tips:

- The source code is included inside the b4xlib file (it is a zip file).
- Layout files of other platforms will not be added to the project.
- It is not possible to load layouts from DesignerCreateView without calling Sleep(0) before.
- ListTemplate layout was actually taken from XUI Views.
- A more powerful color picker implemented as a dialog is included in XUI Views. - The B4A project I've used to implement the view.
ColorsList.b4xlib - The library with the files. Open it as a zip file to see.
Usage Example - B4J project that uses this view.