Scrollview and loadlayout

bluedude

Well-Known Member
Licensed User
Longtime User
Hi,

I have been thinking about a settings page and for me it would be best if every single scrollview item could dynamically load a different or same layout file.

So it could contain layouts for different kind of settings to mimic the Android settings page.

The current limitation of lists, you cannot add items on a certain position, and scrollview make it hard to do a standard Android settings page.

Is there a way to do this already in Scrollview by dynamically loading layouts per scrollview item.
 

bluedude

Well-Known Member
Licensed User
Longtime User
Yep, I understand that.

However, some I will use twice maybe. That means I load them in several scrollview items but I still want to track the clicks. So the panels are a kind of an array with views in it.

And preferable I want to design these in layouts.
 
Upvote 0

GeordieJenner

Member
Licensed User
Longtime User
what was the final outcome of this. say bluedude has three views, 'view1', 'view2' and 'view3'. he loads the scrollviewer as follows, and for the sake of argument, used Generate Members to define all of the views for clicks:
Dim p1, p2, p3, p4 As Panel
p1.Initialize("p1")
p2.Initialize("p2")
p3.Initialize("p3")
p4.Initialize("p4")

p1.LoadLayout("view1")
svAppointments.Panel.AddView(p1,0,10,1080,60)
p2.LoadLayout("view2")
svAppointments.Panel.AddView(p2,0,20,1080,60)
p3.LoadLayout("view1")
svAppointments.Panel.AddView(p3,0,30,1080,60)
p4.LoadLayout("view3")
svAppointments.Panel.AddView(p4,0,40,1080,60)

how will bluedude know whether label1_Click was p1 or p3?
 
Upvote 0
Top