Hi, All.
I have this code:
The SimpleExoPlayer ( player1) object unfortunately does not have the tag property, otherwise i could fetch the same with the following code:
Any idea how can i get the Get value of the SimpleExoPlayerView1 object ?
Thank you
I have this code:
B4X:
For ....
clv_video.Add(CreateList(m.Get("titolo_filmato"), m.Get("filmato"), m.Get("punteggio"), m.Get("costo"), m.Get("pagato") ,clv_video.AsView.Width, 300dip),"")
Next
Sub CreateList(titolo As String, filmato As String, punti As String, costo As String, pagato As Int, Width As Int, Height As Int) As Panel
Dim p As Panel
p.Initialize("")
#if B4A
p.SetLayout(0, 0, Width, Height)
#else if B4i
p.SetLayoutAnimated(0, 1, 0, 0, Width, Height) 'set the size before the layout is loaded
#End If
p.LoadLayout("lay_clv_video")
lbl_titolo.Text = $"${titolo}"$
lbl_punti.Text = $"Valore Video :${punti} punti"$
If costo <> 0 And pagato <> 1 Then
btn_acquista_video.Visible = True
pnl_pagamento.Visible = True
pnl_pagamento.Tag = "Pagamento"
Else
pnl_pagamento.Visible = False
pnl_pagamento.Tag = "NON Pagamento"
End If
Private player1 As SimpleExoPlayer
player1.Initialize("player")
videoplayer.Add(CreateMap("player":player1))
player1.Prepare(player1.CreateUriSource($"${Starter.variabile_video}${filmato}"$))
SimpleExoPlayerView1.UseController = True
SimpleExoPlayerView1.Tag = punti
SimpleExoPlayerView1.Player = player1
Return p
End Sub
Sub Player_Ready
Log("Ready")
End Sub
Sub Player_Error (Message As String)
Log("Error: " & Message)
End Sub
Sub Player_Complete
Log("complete")
End Sub
The SimpleExoPlayer ( player1) object unfortunately does not have the tag property, otherwise i could fetch the same with the following code:
B4X:
Sub Player_Ready
Log("Ready")
Dim b As SimpleExoPlayer
b = Sender
Log(b.tag)
End Sub
Any idea how can i get the Get value of the SimpleExoPlayerView1 object ?
Thank you