B4J Question [ABMaterial] Delegating the creation of complex Rows (TopBar) and Theming

Cableguy

Expert
Licensed User
Longtime User
Hi ABM Gurus

Here I am again with a "bizarre" question...

In my app I have a Module (class) that is responsible for the creation of an entire row consisting of 1 image, 1 inputsearch and 3 buttons, all this inside 2 containers...
So, I declare my components and everything else that I will need to create my view in the class "Class_Globals" sub and initiate them in... you guessed it, the "Initialize" sub, passing a few parameters... I the "Create" the Row in a "CreateTopBar" sub and return the main Container to the calling sub.
My call looks something like this:

B4X:
    myTopBar.Initialize(AppPage,"TopBar","../web/images/topbarlogo60.gif","TopBar")
    AppPage.Cell(1,1).AddComponent(myTopBar.CreateTopBar)

Every thing works as expected, except for 2 things...
for now I am using theming inside the ABMShared, but I would like to do it inside my class...
Creating a "BuildTheme" sub is not the issue, the issue is where or when should I call it in order for it to be made par of the theme?
Secondly, I have a container inside one cell of another container...
So I have "Container" as the main container and "SubContainer" as the second container...
I can easily apply theming to the main "Container" using like "Container.cell(1,3).Usetheme("Container") but I can't seem to be able to do it to the secondary container, using the same approach: SubContainer.cell(1,2).UseTheme("SubContainer")
Nothing gets applied! (Since I am not sure if its a bug, I haven't opened a ticket yet on the FeedBack app)
 
Top