Hey Team
Does anyone have a demo or know how to display an image from a web link?
I currently use the example below for slider images locally, but I'm looking for an option to link to the pictures online, something like this:
Edit: or maybe download the pics and show them locally
thanks in advance
Does anyone have a demo or know how to display an image from a web link?
I currently use the example below for slider images locally, but I'm looking for an option to link to the pictures online, something like this:
Loading…
www.example.com
Loading…
www.example.com
Edit: or maybe download the pics and show them locally
thanks in advance
B4X:
Sub ImageSlider1_GetImage (Index As Int) As ResumableSub
Dim pnl As B4XView = xui.CreatePanel("")
pnl.SetLayoutAnimated(0, 0, 0, ImageSlider1.WindowBase.Width, ImageSlider1.WindowBase.Height)
'change to smm.SetMedia for online images.
smm.SetMediaFromFile(pnl, File.DirAssets, $"test_${Index + 1}.jpg"$, "image/jpeg", CreateMap(smm.REQUEST_CALLBACK: Me))
Wait For (pnl) SMM_MediaReady (Success As Boolean, Media As SMMedia)
If Success Then
Return Media.Media.As(B4XBitmap)
Else
'return error image
End If
End Sub
Last edited: