V2.20

This is a important change to V2.10.
After experimenting with converting B4X layout file to Generic Text File to HTML, I realized that
I was wrong in leaving out the Main/Activity view. 

It holds two pieces of commonly customized layout information - baseColor and title.

Therefore, I modified the generic text layout to convey this info.

It looks like this example (note absence of name and all the default elements of platform specific Mains):
'________________________________________
type=Main
eventName=MainForm
	
width=600
height=600
	
baseColor=0xFFAFF9BD
	
title="Test Translation to HTML"

The width and height info is taken from the variant information.
These are ignored when creating B4X layout files, since the designer knows the variants and can use anchors.
However in my experiment with HTML I used these for computing position and shape when anchors are specified.

I have updated the previous posts to reflect this change. You need to download V2.20 in post #1 and update your Additional folder.
The example in #1 is also updated to use the new writeJsonFile parameter in .Initialize.

I attach a proof-of-concept example of translating a B4J Designer layout to an HTML file.
The attached example draws heavily on the excellent MiniHTML library created by @Aeric

You can download the html example and review its code to see how it is done.
To run the example the MiniHTML library needs to be downloaded and copied to your Additional folder.

Screen shot

Attach zip file


