B4i Library [Tool] Bal2Bil - B4A Layouts Converter

Discussion in 'iOS Libraries' started by Erel, Feb 3, 2015.

  1. JonPM

    JonPM Well-Known Member Licensed User

    Awesome tool. One thing I noticed is text color for buttons did not transfer to bil
     
  2. abhishek007p

    abhishek007p Active Member Licensed User

    what about iOS to Android layout converter, i need it.
     
    Hypnos likes this.
  3. ilan

    ilan Expert Licensed User

    1+
     
  4. fox96

    fox96 Member Licensed 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.

    Code:
    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)
     
  5. Pendrush

    Pendrush Active Member Licensed User

    It look like doesn't work with B4A v6.50 layout files.
     
  6. Erel

    Erel Administrator Staff Member Licensed User

    Please test it with the attached jar.

    You need to run it with:
    Code:
    java -jar Bal2Bil.jar <input> <output>
     

    Attached Files:

    Pendrush likes this.
  7. Pendrush

    Pendrush Active Member Licensed User

    Thank you. Work as expected.
     
    Erel likes this.
  8. tufanv

    tufanv Well-Known Member Licensed User

    Dear Erel,

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

    ykucuk Active Member Licensed User

    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 ?
     

    Attached Files:

  10. Erel

    Erel Administrator Staff Member Licensed User

    Are you sure that you are using the latest version (1.10) ?
     
  11. ykucuk

    ykucuk Active Member Licensed User

    Hello erel,

    Versiyon is 1.10. i added files to attachment.

    Thank you for support
     

    Attached Files:

    • B4X.zip
      File size:
      166.5 KB
      Views:
      4
    Last edited: Mar 19, 2017
  12. Erel

    Erel Administrator Staff Member Licensed User

    The problem is that this layout file was created with an old version of B4A. You will need to open it with a newer version and save it. You will then be able to convert it.
     
Loading...