First... sorry, you're right: the exact terms are important. The exact phrase is: "I notice that I cant add a customview in a panel inside other customview - in this specific situation, I'm trying to add a GifPLayer (B4AGifViewer Library) to a ULV (UltimateListView) panel".
About your answer
@Erel ... I really didn't realized some things (sorry, please help!):
- What's "mBase" ?
- DesignerCreateView - where?I really didn't understand, sorry.
Dim GifViewer1 As GifViewer = PnlMessage.GetView(4).Tag
This is correct - it's what I'm doing. I did some tests changing the index in GetView and got that first error. But the error message that I'm getting for any customview inside a ULV panel is:
java.lang.NullPointerException: Attempt to invoke virtual method 'void com.tillekesoft.b4agifview.GifView.setGifPath(java.lang.String)' on a null object reference
The Code:
Sub ImgMsgSent_Filler(ItemID As Long,LayoutName As String,LayoutPanel As Panel,Position As Int)
Dim ImgLeftChat As ImageView = LayoutPanel.GetView(0)
Dim PnlMessage As Panel = LayoutPanel.GetView(1)
...
Dim GifPlayer2 As GifPlayer = PnlMessage.GetView(4)
...
GifPlayer2.SetGifPath("/storage/emulated/0/Android/data/com.comten.nexphone/files/targetfile.gif")
...
The line of the error is the last above.
The designer:
View attachment 68524
GifPlayer is correctly referenced...
That is exactly my problem... I think that
@Erel solution could fix the problem for all the times when I need to add a customview inside an ULV panel, but I really didn't understand how to do... Please
@Erel ... help!
Thanks
@Informatix ... I'll test the animatedGifView...