B4J Question [abmmaterial]how to set the headingthemename and bodythemename?

liulifeng77

Active Member
Licensed User
Longtime User
hi,
here is my code:
B4X:
Dim chartcontainer As ABMContainer
chartcontainer.InitializeCollapsable(page,"chartcontainer","","","",True)

Ide show:
This container is collapsable. Use CollapsableHeader/CollapsableBody!
but how to set it?(container theme?)
anyone can give me a example?
thanks!
 

Mashiane

Expert
Licensed User
Longtime User
A container theme has these properties

1. BackColor
2. BackColorIntensity
3. TitleColor
4. TitleColorIntensity and
5. Zdepth i.e shadow.

Then you can use the ABM.COLOR_<constants> and ABM.INTENSITY_<contants> to define the theme.

As an example, to define the theme, one could use the following code in ABMShared.

B4X:
MyTheme.AddContainerTheme("cont")
MyTheme.Container("cont").titlecolor = ABM.COLOR_BLACK
MyTheme.Container("cont").titlecolorintensity = ABM.INTENSITY_NORMAL

This link, http://prd.one-two.com:51042/demo/HelperContainerPage/abmaterial-container.html also talks about it. Depending on what you want to do, you can define the grid for your container and then theme each row / cell individually.

All the best..
 
Upvote 0

Harris

Expert
Licensed User
Longtime User
I guess this question requires an expanded topic in "ABMaterial for Dummies" about Theming various components.

Depending on the component you are trying to theme - different properties may / can apply...

Next to getting the grid layout set to your liking - the color, font size and other aspects of your layout are important - and sometimes confusing (yet easy) since various properties apply to different components.

I shall see what I can try to come up with for a simple example in the tutorial.

Thanks for the feedback - progressing the nitti gritty about how to use ABMaterial effectively - for all interested.

NOTE: these type of questions are most important in helping me determine what example sections are required for a complete "ABM for Dummies" tutorial.

Thanks
 
Upvote 0
Top