I have a ScrollView for the main window of an app, and I have created a layout for the child items which is about 60dip high. When I init the app, I load a series of these layouts into panels, then add the panels to the ScrollView. In each case I have to explicitly set the top margin to be the appropriate height (for the Xth panel, (X-1) * 60dip) so that the panels appear to be in a list (this could be issue one in a long list of issues, so please be gentle).
When I tap on an item in the list, I would like to resize that panel - because I'd like to display more information. My intent is eventually to show and hide extra fields in the layout rather than trying to switch layouts for a particular panel. To that end I have the following handler:
Tapping the panel does correctly show the Toast (debugging) message, but the panel height does not appear to change at all. Even if it ended up "behind" the next panel in the scrollview, I'd expect to see the bottom-aligned labels disappear or move. No exception appears in the LogCat output.
Assistance appreciated (though I cannot post the full project code until much later today - about 8 hours from timestamp of this post).
When I tap on an item in the list, I would like to resize that panel - because I'd like to display more information. My intent is eventually to show and hide extra fields in the layout rather than trying to switch layouts for a particular panel. To that end I have the following handler:
B4X:
' Event handler for main activity panels
Sub Panel_Click (Sender as Object)
Dim P as Panel : P = Sender
ToastMessageShow("Resizing " & P.Tag)
If (P.Height = 60dip) Then
P.Height = 90dip
Else
P.Height = 60dip
End If
End Sub
Assistance appreciated (though I cannot post the full project code until much later today - about 8 hours from timestamp of this post).