In camera example ( by Erel ) i have this code:
in this way when i select a movie i have preview in my imageview1 object. And all work.
But if i have the same code in CustomListView, i have only black color ( i dont see nothing )
This is code:
Where i wrong ?
Thank you
Marco
B4X:
vv.Initialize("vv")
Page1.RootPanel.AddView(vv.View, ImageView1.Left, ImageView1.Top, _
ImageView1.Width, ImageView1.Height)
vv.View.Visible = False
timer1.Initialize("timer1", 500)
......
Sub Cam_Complete (Success As Boolean, Image As Bitmap, VideoPath As String)
If Success Then
If Image.IsInitialized Then
vv.View.Visible = False
ImageView1.Bitmap = Image
Else
vv.View.Visible = True
vv.LoadVideo(VideoPath, "")
End If
End If
End Sub
Private Sub Page1_Resize(Width As Int, Height As Int)
'resize the VideoView to the same size as the ImageView.
vv.View.SetLayoutAnimated(0, 1, ImageView1.Left, ImageView1.Top, _
ImageView1.Width, ImageView1.Height)
End Sub
in this way when i select a movie i have preview in my imageview1 object. And all work.
But if i have the same code in CustomListView, i have only black color ( i dont see nothing )
This is code:
B4X:
Sub CreateListItem(cs As CSBuilder, filmato As String, Width As Int, Height As Int) As Panel
Dim p As Panel
p.Initialize("")
p.SetLayoutAnimated(0, 1, 0, 0, Width, Height) 'set the size before the layout is loaded
p.LoadLayout("lay_clv_movie")
lbl_descrizione.AttributedText = cs
p.AddView(vv.View, ImageView1.Left, ImageView1.Top, _
ImageView1.Width, ImageView1.Height)
Return p
End Sub
Where i wrong ?
Thank you
Marco