Android Question B4XDrawer and xCustomListView and with B4XTable .

jimmyF

Active Member
Licensed User
Longtime User
I am trying to implement the B4XDrawer in a B4XTable app but I cannot successfully use the xCustomListView with the drawer.
I have tried including the CustomListView.bas (xCustomListView ver.1.71) into the project but when I try to use it with the drawer I get an error in B4XDrawer telling me:

java.lang.RuntimeException: Object should first be initialized (B4XView).

or, in my EditTable class:

java.lang.RuntimeException: java.lang.RuntimeException: Field clv was declared with the wrong type.

It looks as if I need to revert back to the standard Listview, which works.

I would prefer to use the xCustomListView.

Any help would be appreciated.

Thanks,
-j
 

jimmyF

Active Member
Licensed User
Longtime User
Thanks Klaus,

I can make it work with the built-in CustomListView in B4A (Latest version).
But my understanding is that the internal one is not a B4X view.

If I choose xCustomListView in the Library tab, the app fails even when using the same code as with the internal CustomListView .

If I insert the CustomListView.bas (xCustomListView ver.1.71) in the IDE, the app fails.
But I use this .bas file in another app where I load a layout in code and it works just fine.

I am so confused as to which CustomListView I should be using.

And I don't know which one is the B4X CustomListView that can be used in cross-platform apps.

-j
 
Upvote 0

klaus

Expert
Licensed User
Longtime User
You should use the internal xCustomListView which is the latest one and forget CustomListView.bas which is no more updated.
xCustomListView is an evolution of CustomListView.bas, Erel compiled it into libraries and added those to the internal libraries.
xCustomListView is cross platform like CustomListView.bas!
CustomListView.bas is a B4X CustomView module, you can use the same code module in the three products.
You can compile a B4X CustomView module into a library. But, you must compile one library for each product.
That's what Erel did.
 
Upvote 0

jimmyF

Active Member
Licensed User
Longtime User
CustomListViewLibraries.PNG


So which one should I be using?
 
Upvote 0

jimmyF

Active Member
Licensed User
Longtime User
Thank you so much Klaus!

It all makes sense now. And it works! :)

-j
 
Upvote 0
Top