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:


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


 

Attachments

  • 1691618316844.png
    72.3 KB · Views: 196

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





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

 
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



 
Upvote 0

emexes

Expert
Licensed User
Longtime User

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
Cookies are required to use this site. You must accept them to continue using the site. Learn more…