B4i Library [Tool] Bal2Bil - B4A Layouts Converter

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

  1. Erel

    Erel Administrator Staff Member Licensed User

    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>

    [​IMG]

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

    Attached Files:

    Last edited: May 21, 2018
    moster67, naifnas, JordiCP and 20 others like this.
  2. ivanomonti

    ivanomonti Well-Known Member Licensed User

  3. Shay

    Shay Well-Known Member Licensed User

    Nice, will save time
     
  4. inakigarm

    inakigarm Well-Known Member Licensed 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)
     
  5. inakigarm

    inakigarm Well-Known Member Licensed 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: Feb 3, 2015
  6. little3399

    little3399 Active Member Licensed User

  7. inakigarm

    inakigarm Well-Known Member Licensed User

    I've used command line mode...
     
  8. Erel

    Erel Administrator Staff Member Licensed User

  9. ilan

    ilan Expert Licensed User

    does it also do bil to bal??
     
  10. Erel

    Erel Administrator Staff Member Licensed User

    No.
     
  11. tufanv

    tufanv Expert Licensed User

    I am getting " An error occured" error loading file
    system outofmemory expection

    after trying to open bil file with designer
     
  12. tufanv

    tufanv Expert Licensed User

    ok I was loding the worng bal file. TY
     
  13. ilan

    ilan Expert Licensed 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: Apr 19, 2015
  14. Erel

    Erel Administrator Staff Member Licensed User

    Which error do you get?
     
  15. ilan

    ilan Expert Licensed User

    it did work at the end, i have download again the zip file and extract and then it worked.

    sorry
     
  16. DoctorDebug

    DoctorDebug Member Licensed User

    Thank you thank you thank you!
     
  17. klarsys

    klarsys Active Member Licensed User

    This tool doesn't take relative paths, requires absolute paths.
     
  18. Dan Harding

    Dan Harding Member Licensed 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?
     
  19. Erel

    Erel Administrator Staff Member Licensed User

    The reason is that iOS ScrollView scrolls in both directions (horizontal and vertical) and Android ScrollView only scrolls vertically. Only the content height or content width (for HorizontalScrollView) are set
     
  20. Dan Harding

    Dan Harding Member Licensed 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.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice