When you create a custom view with B4A v5.8 (menu Project > Add new module > Class module > CustomView), this "view" is not really a view, so you get an error when you do things like:
Dim MyView As clsMyCustomView = MyPanel.GetView(0)
Dim MyView As clsMyCustomView = MyPanel.GetView(0)