B4i Library [Tool] Bal2Bil - B4A Layouts Converter

JonPM

Well-Known Member
Licensed User
Longtime User
Awesome tool. One thing I noticed is text color for buttons did not transfer to bil
 

fox96

Member
Licensed User
Longtime User
Hello Erel, changed the code to pass only the file .bal to create the .bil. So you can drag the file .bal without using the prompt.

B4X:
Log($"Bal2Bil version ${version}"$)
    bc.Initialize
'    If Args.Length <> 2 Then
'        Log("Usage: Bal2Bil <input file> <output file>")
'        ExitApplication2(1)
'    End If
    If Args.Length =0 Then
        Log("Usage: Bal2Bil <input file> <output file>")
        Log("Usage: Bal2Bil <input file>")
        ExitApplication2(1)
    End If

    Dim design As Map = bc.ConvertBalToJsonInMemory(Args(0), "")
    If design.IsInitialized = False Then
        Log("Error reading file.")
        ExitApplication2(1)
    End If
    LayoutHeader(design.Get("LayoutHeader"))
    HandleView(design.Get("Data"))
    Dim s As String
    If Args.Length=1 Then
        s=Args(0).SubString2(0,Args(0).Length-4) & ".bil"
        Else
        s=Args(1)
    End If
    bc.ConvertJsonToBalInMemory(design,s, "")
    Log("Completed successfully: " & s)
 

tufanv

Expert
Licensed User
Longtime User
Dear Erel,

Latest version is not passing the Background color of labels. Fyi.
 

ykucuk

Well-Known Member
Licensed User
Longtime User
Please test it with the attached jar.

You need to run it with:
B4X:
java -jar Bal2Bil.jar <input> <output>
Hello Erel,

B4i version is 3.60
B4A version is 6.80

I converted with last Bal2Bil.jar with successful. Unfortunately when i try open converted bil file with B4i designer i get error "system out of memory..." (i added to attachments)

Note:There is no any custom view in BAL file

Any help ?
 

Attachments

  • Screen Shot 2017-03-19 at 09.11.44.png
    19 KB · Views: 16

ykucuk

Well-Known Member
Licensed User
Longtime User
Hello erel,

Versiyon is 1.10. i added files to attachment.

Thank you for support
 

Attachments

  • B4X.zip
    166.5 KB · Views: 25
Last edited:

Roycefer

Well-Known Member
Licensed User
Longtime User
Erel,
What is your distribution policy on this tool? Is it permissible to include code from this in a for-profit app?
 

Maicon

Member
Licensed User
Longtime User
I have large applications that exceed more than 50 layouts, so copying and pasting in b4i is sometimes unfeasible
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…