Hi all i have this code:
and work without problem.
I would like to use the CreateRoundRectBitmap ( https://www.b4x.com/android/forum/pages/results/?query=CreateRoundRectBitmap ), if I upload files locally from the device everything works.
But how to use the same to upload images via the internet ??
Any idea ?
Thank you
Marco
B4X:
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
Activity.LoadLayout("1")
Dim fotogrande() As String = Array As String("esempio-fotoa70.jpg","esempiofotoiphone6.jpg","fotosamsunga10.jpg","fotosamsung5.jpg")
Starter.mappa_foto.Initialize
For i = 0 To 3
clv_grande.Add(CreateListItemGrande( "TEST GRANDE", "https://www.xxx.com//test/"&fotogrande(i),clv_grande.AsView.Width, clv_grande.AsView.Height - 10dip, i, ""),"")
#if B4i
Downloader.Download(foto)
#else if B4A
CallSubDelayed2(ImageDownloader, "Download", Starter.mappa_foto)
#End If
End Sub
Sub CreateListItemGrande(Text As String, immagine As String, Width As Int, Height As Int, riga As Int, passa_id As String ) 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_interno")
'Immagina Carico dal Sito B4A / B4i
#if B4i
foto.Put(img_foto, Starter.variabile1&name_image)
#else if B4A
Starter.mappa_foto.Put(ImageView1, immagine)
#End If
Return p
End Sub
and work without problem.
I would like to use the CreateRoundRectBitmap ( https://www.b4x.com/android/forum/pages/results/?query=CreateRoundRectBitmap ), if I upload files locally from the device everything works.
B4X:
Sub CreateListItemGrande(Text As String, immagine As String, Width As Int, Height As Int, riga As Int, passa_id As String ) 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_interno")
Dim img As B4XBitmap = xui.LoadBitmap(File.DirAssets, immagine)
ImageView1.SetBitmap(CreateRoundBitmap(img, ImageView1.Width))
Return p
End Sub
But how to use the same to upload images via the internet ??
Any idea ?
Thank you
Marco