Android Question B4XView create via Designer

Discussion in 'Android Questions' started by ilan, May 3, 2019.

  1. ilan

    ilan Expert Licensed User

    the great thing with xui that we can share the code for all b4x platforms. but what i am missing a lot is the possibility to add a b4xview via designer. for simple project i am creating the design via designer and it would be nice if we could do it with xui views so we can create 1 layout and share it with all platforms.

    there could be an option when we click on DESIGNER to have another Designer option like:

    xuidesigner.png

    and it will include only xui views that we can share with all platforms. simple views like panel, label, button, checkbox, radiobutton, textview,...

    maybe there is already a possibility to add b4x views via designer, is there?

    thanx
     
  2. DawningTruth

    DawningTruth Active Member Licensed User

    Following. I like this idea :).
     
  3. sorex

    sorex Expert Licensed User

  4. ilan

    ilan Expert Licensed User

    the xuiviewslibrary is indeed customvies but i am missing simple views like label, button, radiobutton, checkbox, ...

    and it should be related to the running os automatically. like in ios the checkbox is a switch, etc..

    so the idea is to have a seperate designer for xui views and create the same designer file that will run on all b4x platforms.
     
  5. Erel

    Erel Administrator Staff Member Licensed User

    This is already possible.

    All views are B4XViews. You should use the designer to create the layout. The only thing that you need to do is to change the generated type to B4XView:
    Code:
    Private Button1 As B4XView 'change As Button to As B4XView
    Watch the XUI video tutorial for more information: https://www.b4x.com/etp.html?vimeography_gallery=1&vimeography_video=256289568
     
  6. ilan

    ilan Expert Licensed User

    Wow this is really cool. So when you say all views you mean all standart ciews or all views that are available in the designer?

    Ps why not allow generate the view from designer to ide as b4xview?
     
  7. Erel

    Erel Administrator Staff Member Licensed User

    Watch the video tutorial. It explains everything.

    This will be added at some point with more features that will make it easier to share layouts.
     
    inakigarm and klaus like this.
  8. sorex

    sorex Expert Licensed User

    ok, I now know what you mean, Ilan.

    in my opinion if you really want to have your app look identical on any platform you need to (re)create things yourself.

    for example the switch on B4A used to be a square box with a led like light in it. on B4i it is that pill with circle in it.

    I would go for the pill with can be done as a rounded panel including a circular label for the bullet and an extra label if you want to have that green/red coloring.
    or you could create 2 images based on svg versions of the pilll but then you lose movement animations unless you seperate the sliding part of it.

    Relying on the OS specific ones will alwas give you issues to have identical looks.
    Not to mention that some are missing views that the other one has.
     
  9. Erel

    Erel Administrator Staff Member Licensed User

    Check the very nice B4XSwitch from XUI Views.

    [​IMG]
     
    mendiburen and ilan like this.
  10. sorex

    sorex Expert Licensed User

    right, looks perfect for menu/settings usage on any OS.
     
  11. Jorge M A

    Jorge M A Active Member Licensed User

    In the meantime, how about something like this? :rolleyes:

    Untitled.png
     
  12. DawningTruth

    DawningTruth Active Member Licensed User

    I use that is my default. Good to know it will be usable when I eventually port to B4i.
     
  13. Star-Dust

    Star-Dust Expert Licensed User

    Jorge M A likes this.
  14. Jorge M A

    Jorge M A Active Member Licensed User

    WOW! Thank You! I Will Check It!
     
  15. Erel

    Erel Administrator Staff Member Licensed User

  16. Star-Dust

    Star-Dust Expert Licensed User

    The views are wrapped not only to save a step, but to have XUI view in the design.
    They also add many rotation and drag and animation methods that are not available on B4Xview.

    It is worth reading all the answers to get a complete view of the topic
     
    Jorge M A likes this.
  17. DawningTruth

    DawningTruth Active Member Licensed User

    Does this have a performance impact?
     
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