Hi all
I am attempting to enumerate all the panels with a specific tag in a layout and then center them with the following:
' Center all the lesson panels
For Each pnl As Panel In Activity
Dim PanelTag As String
PanelTag = pnl.Tag
If PanelTag.SubString2(0,5) = "Lesson" Then
pnl.Left = (Activity.Width - pnl.Width) / 2
pnl.Top = (Activity.Height - pnl.Height) / 2
End If
Next
However, the following error is occurring:
java.lang.ClassCastException: android.widget.ImageView cannot be cast to android.view.ViewGroup
Any ideas?
I am attempting to enumerate all the panels with a specific tag in a layout and then center them with the following:
' Center all the lesson panels
For Each pnl As Panel In Activity
Dim PanelTag As String
PanelTag = pnl.Tag
If PanelTag.SubString2(0,5) = "Lesson" Then
pnl.Left = (Activity.Width - pnl.Width) / 2
pnl.Top = (Activity.Height - pnl.Height) / 2
End If
Next
However, the following error is occurring:
java.lang.ClassCastException: android.widget.ImageView cannot be cast to android.view.ViewGroup
Any ideas?