Wish Requesting again ? for layout file in text form

AnandGupta

Expert
Licensed User
Longtime User
It is not a wish but sincere request.

@Erel Please Please, make the layout file .bal a text file (json / xml / txt / whatever you wish)

I am developing in C# in VS now at my office for a company product. I found that the layout (form) file ,designer.cs is a text file. It has all the views with location, size etc. in plain text format.
I needed to develop a form which I already have in another programing language. I made a translator code which converted this to C# designer.cs file.
It saved me many man hours is getting same look and feel with same color, size etc. And if there is any error, VS gives option to directly edit the .designer.cs file in text form and fix it.

Member here have made some tools to convert .bal to text and vice versa.
But I want @Erel to give the layout as a text file by default, which I feel is possible as the final layout for Android in xml.
This way we can directly manipulate the layout file in a text editor if needed.

Requesting again ?
 

Spavlyuk

Active Member
Licensed User
I don't think B4A creates xml files from layout files. BalConverter was made by Erel for this purpose.
You can modify it a bit to work with a custom build action so the json or bal files are automatically generated each run, depending on your needs.
 

Lucas Siqueira

Active Member
Licensed User
Longtime User
or create unique layout, .bxl


where b4a, b4i and b4j use the same layout file, today when I have a change I have to go to the 2 IDEs (b4a and b4i) and include the new component and even when I have to modify several screens, it ends up being a lot of work to use copy and paste (although it helps)
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
I don't think B4A creates xml files from layout files. BalConverter was made by Erel for this purpose.
You can modify it a bit to work with a custom build action so the json or bal files are automatically generated each run, depending on your needs.
This is an accurate answer. There is no relation between B4X layout files and Android XML layouts. And you can quite easily convert the layout to json using this tool: [B4X] BalConverter - Convert the layouts files to JSON (and vice versa)
 

AnandGupta

Expert
Licensed User
Longtime User
This is an accurate answer. There is no relation between B4X layout files and Android XML layouts. And you can quite easily convert the layout to json using this tool: [B4X] BalConverter - Convert the layouts files to JSON (and vice versa)
Actually I want to avoid doing it myself each time "And you can quite easily convert the layout to json"
If the layout is in json by default we do not need to do any changes.

Still I will request to make it json by default, and convert to binary at time of compilation.
We will not mind any delay for it.
Please ?
 

Lucas Siqueira

Active Member
Licensed User
Longtime User

AnandGupta

Expert
Licensed User
Longtime User
Except the .bal file, every thing is in text in B4A and that make lot easier for us to compare and concise codes between projects.
If .bal also becomes text (json) we are winner here.
 

Theera

Well-Known Member
Licensed User
Longtime User
It is not a wish but sincere request.

@Erel Please Please, make the layout file .bal a text file (json / xml / txt / whatever you wish)

I am developing in C# in VS now at my office for a company product. I found that the layout (form) file ,designer.cs is a text file. It has all the views with location, size etc. in plain text format.
I needed to develop a form which I already have in another programing language. I made a translator code which converted this to C# designer.cs file.
It saved me many man hours is getting same look and feel with same color, size etc. And if there is any error, VS gives option to directly edit the .designer.cs file in text form and fix it.

Member here have made some tools to convert .bal to text and vice versa.
But I want @Erel to give the layout as a text file by default, which I feel is possible as the final layout for Android in xml.
This way we can directly manipulate the layout file in a text editor if needed.

Requesting again ?
 

AnandGupta

Expert
Licensed User
Longtime User
Actually I want to avoid doing it myself each time "And you can quite easily convert the layout to json"
If the layout is in json by default we do not need to do any changes.
 
Top