iOS Question B4XPages - B4A & B4i App Layout

luke2012

Well-Known Member
Licensed User
Longtime User
Hi all,
I am testing the implementation of an (extended) layout within a B4XPages project in B4A and B4i version for an important B4XPages project.

TEST
See the attached images "b4xpages_bal" and "b4xpages_bil".
Within B4A all ui elements added to the layout are displayed correctly.
Within B4i version only a part of buttons and fields are displayed and all the rest does not appear (scrolling down the page).
To be more specific, all ui objects added to the layout after the "wvCardDesc" field in red ("b4xpages_bil") in the B4i version are not displayed, scrolling down in their place shows a white area.

HOW I IMPLEMENTED IT
I followed the instructions of the guide "B4X Booklets" (by @Erel) and I did this:

1) I created a new layout (.bil) within B4i with same name of B4A version
2) Using B4A & B4i designer I copied all the ui elements from B4A to B4i
3) I copied all the related designer script

Note:
- The added UI elements are: Label, WebView and ImageView (all elements compatible between the two platforms).
- The related B4X code is (the same) shared between B4A and B4i versione of the app.

HOT TO SOLVE?
Until now I have not yet understood what is the thing that triggers this problem in the B4i version.
Has this ever happened to you? Do you have any suggestions please?

Thanks in advance for your help.
Luca.
 

Attachments

  • b4xpages_bal.png
    b4xpages_bal.png
    73 KB · Views: 207
  • b4xpages_bil.png
    b4xpages_bil.png
    70.8 KB · Views: 200
  • layout_files.zip
    5.2 KB · Views: 194

luke2012

Well-Known Member
Licensed User
Longtime User
Hi all,
I am testing the implementation of an (extended) layout within a B4XPages project in B4A and B4i version for an important B4XPages project.

TEST
See the attached images "b4xpages_bal" and "b4xpages_bil".
Within B4A all ui elements added to the layout are displayed correctly.
Within B4i version only a part of buttons and fields are displayed and all the rest does not appear (scrolling down the page).
To be more specific, all ui objects added to the layout after the "wvCardDesc" field in red ("b4xpages_bil") in the B4i version are not displayed, scrolling down in their place shows a white area.

HOW I IMPLEMENTED IT
I followed the instructions of the guide "B4X Booklets" (by @Erel) and I did this:

1) I created a new layout (.bil) within B4i with same name of B4A version
2) Using B4A & B4i designer I copied all the ui elements from B4A to B4i
3) I copied all the related designer script

Note:
- The added UI elements are: Label, WebView and ImageView (all elements compatible between the two platforms).
- The related B4X code is (the same) shared between B4A and B4i versione of the app.

HOT TO SOLVE?
Until now I have not yet understood what is the thing that triggers this problem in the B4i version.
Has this ever happened to you? Do you have any suggestions please?

Thanks in advance for your help.
Luca.

Hi,
Can you attach the 2 layout files to this thread.
Hi Andrew. Yes (see layout files).
 
Upvote 0

klaus

Expert
Licensed User
Longtime User
It would be easier for us to help you if you posted your project so we can see what exactly you did and how.
Where and how do you load the layouts?
To zip a B4XPages project use this line in code on top of the B4XMainPage module.
'Ctrl + click to export as zip: ide://run?File=%B4X%\Zipper.jar&Args=\%PROJECT_NAME%.zip
 
Upvote 0

luke2012

Well-Known Member
Licensed User
Longtime User
It would be easier for us to help you if you posted your project so we can see what exactly you did and how.
Where and how do you load the layouts?
To zip a B4XPages project use this line in code on top of the B4XMainPage module.
'Ctrl + click to export as zip: ide://run?File=%B4X%\Zipper.jar&Args=\%PROJECT_NAME%.zip

Hi Klaus. Thanks for your reply.

1) "Where and how do you load the layouts?"
See "CreateItem ()" within the code of my post:

2) "To zip a B4XPages project use this line in code on top of the B4XMainPage module."
Thanks 4 the info but unfortunately I cannot upload this specific project because it is a project that was commissioned by a client of mine (and he is the owner of this project) and I do not have the authorization to make it publicly available on the internet.
So, can I send it to you privately as a password protected zip (obviously not to be disseminated)?

Or are there other solutions?
 
Last edited:
Upvote 0

luke2012

Well-Known Member
Licensed User
Longtime User
The problem is with the anchors on the wvCard Desc.

View attachment 121110

Change the Vertical anchor to top only and all will be well.

I'll try it as soon as possible (because right now the app server is down and I can't) but the problem in this case, I think, isn't the "wvCardDesc" WebView for two reasons:

1) I have the exact same setting for the vertical anchor also on the B4A version and everything works correctly (the layout objects are all visible).

2) The problem here is that the buttons & fields belove the "wvCardDesc" isn't visibile running the app within iPhone (see #1 / TEST / Within B4i...)
 
Upvote 0

luke2012

Well-Known Member
Licensed User
Longtime User
I suspect that the problem is the Resizing, this happens in B4i but not in B4A.

In fact, for the B4i version of the app I have to call the creation of the panel and its loading of the layout (.bil file) within the _resize event of the page otherwise the panel was not sized correctly and the page was truncated (yes they saw only part of the fields).
This happen only within B4i version not within B4A version (I didn't know this difference, I thought viewing the B4XPages pages behaved the same way).

B4X:
Sub B4XPage_Resize (Width As Int, Height As Int)
    #if B4i
          LoadCard (AppGlobals.CardFullContent)
    #End If
End Sub
 
Upvote 0
Top