Thanks a lot for the help. In my case, i load the panels as in the code below
B4X:
For i=0 To 9
Dim Panel1 As Panel
Dim pnlAllTrips As Panel
Dim lblMonth As Label
Dim lblYear As Label
Dim lblReturn As Label
Dim lblAmnt As Label
Panel1.Initialize("")
Panel1.LoadLayout("alltrips")
Panel1.Color = Colors.Transparent
ScrollView1.Panel.AddView(Panel1,10dip,px,100%x-20dip,60dip)
If i=0 Then
Panel1.Width=90%x
Else If i=1 Then
....
Using your approach i have been unable to get the panel width so that i can modify it accordingly. How can i add the width property?
Mine was just an example, to say that you can create a class in which you can handle the animation, with SetLayoutAnimated, timers and events like those I wrote in the example.
You could pass the item panel you created by code (Panel1 in your code above) to the Inititialize routine of the class (without the need to create a panel inside the class, then).
Mine was just an example, to say that you can create a class in which you can handle the animation, with SetLayoutAnimated, timers and events like those I wrote in the example.
You could pass the item panel you created by code (Panel1 in your code above) to the Inititialize routine of the class (without the need to create a panel inside the class, then).
You could (should) also use xCustomListView, create a class for the animation and pass the xCustomListView items (panels) to your class.
You can also use a single class instance instead of one for each item.