kangmasjani
Member
Exoplayer in xCustomListView:
'This event will be called once, before the page becomes visible.
Private Sub B4XPage_Created (Root1 As B4XView)
Root = Root1
Root.LoadLayout("L_Test")
For Each No As Int In conlectionsMap.Keys ' <===total line only 7 videos
Dim titles As String = conlectionsMap.Get(No)
Dim pan As B4XView = xui.CreatePanel("")
pan.SetLayoutAnimated(0, 0, 0, 100%x,100%y)
pan.LoadLayout("L_ExoplayerViews")
'Dim SimpleExoPlayerView1 As SimpleExoPlayerView <=== in Sub Global
Dim engin As SimpleExoPlayer
engin.Initialize("Player1")
engin.Prepare(engin.CreateUriSource( uris&"/"&titles ) )
SimpleExoPlayerView1.Player = engin
SimpleExoPlayerView1.Tag = engin
SimpleExoPlayerView1.UseController = True
xCLV.Add(pan, No )
Log($"No: ${No}, Judul: ${titles"$)
Next
End Sub