Sub Camera1_PictureTaken (Data() As Byte)
Dim filename As String = "cp.jpg"
Dim dir As String = File.DirInternal
camEx.SavePictureToFile(Data, dir, filename)
End Sub
Private Sub ShowImage
Dim filename As String = "cp.jpg"
Dim dir As String = File.DirInternal
Dim uri As String = xui.FileUri(File.DirInternal, filename)
If File.Exists(dir, filename) Then
MediaManager.Initialize
SetZoomImageViewMedia(pnlImage, uri, Colors.White)
End If
End Sub
Private Sub SetZoomImageViewMedia(Panel As B4XView, Url As String, BackgroundColor As Int)
MediaManager.SetMediaWithExtra(Panel, Url, "", CreateMap(MediaManager.REQUEST_CALLBACK: Me, MediaManager.REQUEST_ZOOMIMAGEVIEW: True, _
MediaManager.REQUEST_BACKGROUND: BackgroundColor))
Wait For (Panel) SMM_MediaReady (Success As Boolean, Media As SMMedia)
If Success Then
Dim zv As ZoomImageView = Panel.GetView(0).Tag
zv.pnlBackground.Color = BackgroundColor
zv.mBase.Color = BackgroundColor
End If
End Sub