B4i Library [Tool] Bal2Bil - B4A Layouts Converter

Don't use this tool. More powerful and simpler feature is available inside the IDE: https://www.b4x.com/android/forum/threads/b4x-sharing-layouts-between-platforms.109296/#content

This is a small command line tool that converts B4A layout files (bal files) to B4i layout files.

It is written in B4J. The source code is attached.

The purpose of this tool is to help you with the conversion. Not all views and properties will be converted as there are views such as TabHost that are not available in B4i (and iOS).

Using this tool is simple. It expects two parameters: the input file (bal) and the output file (bil).
java -jar Bal2Bil.jar <input.bal> <output.bal>

SS-2017-01-01_14.20.14.png


Bal2Bil.zip - source code
Bal2Bil.jar - executable jar (not a library).
 

Attachments

  • Bal2Bil.jar
    185.7 KB · Views: 322
  • Bal2Bil.zip
    5.8 KB · Views: 247
Last edited:

inakigarm

Well-Known Member
Licensed User
Longtime User
Thanks !! Have to test but I've been waiting for this (ported an android app to b4i last week and most time lost was copying the UI, except for Spinner--> Picker)
 

inakigarm

Well-Known Member
Licensed User
Longtime User
Seems to work very well; only notice one question and don't know if it's possible changing this: conversion of Background color Button are not Ok (from gray in B4A to transparent in B4i)

Not so important after all ;-)
 
Last edited:

tufanv

Expert
Licensed User
Longtime User
I am getting " An error occured" error loading file
system outofmemory expection

after trying to open bil file with designer
 

ilan

Expert
Licensed User
Longtime User
i get an error when i try to use Bal2Bil

Bal2Bil.exe is not regonized as an internal or external comman, operable program or batch file.

i dont understand how to use it, when i compile project its crashing and does nothing only create the jar file and the jar file it self is not running when i doppelclick on it...
 
Last edited:

DoctorDebug

Member
Licensed User
Longtime User
This is a small command line tool that converts B4A layout files (bal files) to B4i layout files.

It is written in B4J (v2.80). The source code is attached.

The purpose of this tool is to help you with the conversion. Not all views and properties will be converted as there are views such as TabHost that are not available in B4i (and iOS).

Using this tool is simple. It expects two parameters: the input file (bal) and the output file (bil).

SS-2015-02-03_17.57.17.png


The current version is 0.9 and it is considered a beta version.

Thank you thank you thank you!
 

Dan Harding

Member
Licensed User
Longtime User
content width on scrollviews appear to always be 100 on the bil layout after conversion. Is there a reason for this or is it a defect?
 

Dan Harding

Member
Licensed User
Longtime User
Ok that makes sense. I really like this tool. It saves a lot of time when I develop in Android first and then iOS. Can I make an enhancement suggestion to match the content width with the width of the control? I believe this would match the behavior of the control on the Android device more correctly.

Thanks for the great tool.
 
Top