1. You should only use %x / %y inside the Page_Resized event.
2. Values without scale are meaningless.
Hi Erel,
first of all thanks for your appreciated reply.
I always state that it is my first B4XPages project (and therefore I am not a B4XPages guru) but the point is that actually, within my B4XPages project, the page ui (and related layout script) is all handled within layout files (.bal and .bil) not within "Page_Resized" event.
From a layout perspective the shared B4X code that I wrote run as expected on B4A but not within B4i: B4A panel height is 3300 and within B4i panel height is 662.
[CODE lang="b4x" highlight="9,23,32"]'PREVIOUS B4XPages page (call .LoadCard)
Sub clvCardList_ItemClick (Index As Int, Value As Object)
Private ItemVal As CardValue = Value
Private CardNID As Int = ItemVal.nid
Wait For (AppGlobals.GetCardFullContent (CardNID, AppGlobals.user, AppGlobals.psw)) Complete (MissingCardContent As Map)
B4XPages.ShowPage("card")
CardPage.LoadCard (AppGlobals.CardFullContent)
End Sub
'CURRENT B4XPages page
Public Sub LoadCard (CardFullContent As Map)
clvCardFull.Clear 'CustomListView
'Create Card item and populate it with all the card fields
Private CardFullVal As CardFullValue
CardFullVal.Address = CardFullContent.Get(AppGlobals.FIELD_CARD_ADDRESS)
HtmlAddress = CardFullVal.Address
CardFullVal.Title = CardFullContent.Get(AppGlobals.FIELD_CARD_TITLE)
'.....
Private pnl As B4XView = CreateItem (CardFullVal)
clvCardFull.Add(pnl, CardFullVal)
clvCardFull.sv.ScrollViewOffsetY = 0
End Sub
Private Sub CreateItem () As B4XView
Private pnl As B4XView = xui.CreatePanel("")
pnl.SetLayoutAnimated (0,0,0,100%x, 100%y)
pnl.LoadLayout("CardFull_itemlayout")
pnl.Height = btnNavigate.Top + 70dip
Log ("btnNavigate.Top = " & btnNavigate.Top)
Log ("pnl.Height = " & pnl.Height)
'.....
End Sub[/CODE]