iOS Question Fighting with the Designer

Blueforcer

Well-Known Member
Licensed User
Longtime User
Im just porting my B4A app to iOS and im really struggling to get my layout right.
Im doing it like in B4A but the behaviour is completely different.

In Layoutdesigner when playing the script. it looks good.
Also in the B4I-Bridge:
1691618596291.png


But actual running on the device the ListView (Wich is a B4XCustomlistview) doesnt move as it should. What im doing wrong here?
1691618660604.png


1691618465732.png
 

Attachments

  • 1691618316844.png
    1691618316844.png
    72.3 KB · Views: 44

Blueforcer

Well-Known Member
Licensed User
Longtime User
Still doesnt work.
I disabled "Handle resize event" in the designer

B4X:
Sub B4XPage_Resize (Width As Int, Height As Int)
    LiveView.Height = 8 * (100%x/32) -1
    ListView.AsView.Top=LiveView.Top+LiveView.Height
End Sub

IMG_0116.PNG




if i set CustomListView.AsView.Top=0 the listview is still much too low.. i really dont get the point..
Where is position 0 ?! And why its not on top. For my understanding with Top=0 the Listview should hide the Liveview and the header completely

IMG_0117.PNG
 
Last edited:
Upvote 0

Blueforcer

Well-Known Member
Licensed User
Longtime User
Ok one step further. It has something to do with the B4XCustomListview.
If i swap it with a panel, it works as expected, even without the resize event

1691679442918.png


IMG_0118.PNG
 
Upvote 0

emexes

Expert
Licensed User
Im just porting my B4A app to iOS and im really struggling to get my layout right.
Im doing it like in B4A but the behaviour is completely different.
But actual running on the device the ListView (Wich is a B4XCustomlistview) doesnt move as it should. What im doing wrong here?

It doesn't look to me like you're doing it wrong, and yet... the results indicate otherwise.

This is clutching at straws, but what I would try is:

B4X:
TempHeight = 8 * (100%x / 32) - 1
TempBottom = LiveView.Top + TempHeight
LiveView.Height = TempHeight
ListView.SetTopAndBottom(TempBottom, AppLabel1.Top)

so that you're not relying on the change to the LiveView object being instantly carried through to its output properties.
 
Last edited:
Upvote 0
Top