B4A Library [Library] B4aGridView v3.80

Douglas Farias

Expert
Licensed User
Longtime User
thx man i go send u a donation later this works *-*
 
Last edited:

Douglas Farias

Expert
Licensed User
Longtime User
here the version 3.3 dont work, dont show the grid with images
i m using the 3.2 working fine and fast
but sometimes give memory error and the click at grid is slow *-*
 

lonleystar

Well-Known Member
Licensed User
Longtime User
here the version 3.3 dont work, dont show the grid with images
i m using the 3.2 working fine and fast
but sometimes give memory error and the click at grid is slow *-*

Hi thanks to report I'll check it now.
 

Juan Pedro Arce

Member
Licensed User
Longtime User
Hello,

I would like to display an sqlite query into a GridView. Is there a sample on how this can be done?

Thanks in advance,
 

Juan Pedro Arce

Member
Licensed User
Longtime User

lonleystar

Well-Known Member
Licensed User
Longtime User

Douglas Farias

Expert
Licensed User
Longtime User
B4X:
    GridView.Initialize2("GridView",  fp)
    painelscroll.AddView(GridView,1%x,7%y, 98%x, 15%y)


error on this line
painelscroll.AddView(GridView,1%x,7%y, 98%x, 15%y)

i have only changed v3.2 to v3.4
 

Douglas Farias

Expert
Licensed User
Longtime User
Update:

i have changed to initialize normal no 2 and now dont crash the app but dont show the images at grid too =(
GridView.Initialize("GridView")
painelscroll.AddView(GridView,1%x,7%y, 98%x, 15%y)
 

lonleystar

Well-Known Member
Licensed User
Longtime User

Hi, it work also on GingerBread emulator 2.3.3.
 

Douglas Farias

Expert
Licensed User
Longtime User
yes fp as string, but no problem i have removed initialize2 to initialize normal and this problem is solved, but now the other problem is

Gridview v 3.2




gridview v3.3 and 3.4



the grid dont show the images *-* and i dont make any change, only put your lib and compile again
 
Last edited:

lonleystar

Well-Known Member
Licensed User
Longtime User
p


Please can u send the code so i can test it also via email salvigiuseppe@libero.it .
 

Douglas Farias

Expert
Licensed User
Longtime User
i cant send sory but the activity create is this
B4X:
    'INICIA O PRIMEIRO GRID DEPOIS DE CARREGAR O LAYOUT
    GridView.Initialize("GridView")
    painelscroll.AddView(GridView,1%x,7%y, 98%x, 15%y)
    GridView.ItemWidth=100%x
    GridView.ItemHeight=100%y
    GridView.HorizontalSpacing = 4dip
    GridView.VerticalSpacing = 4dip
    GridView.NumColumns = 4
    GridView.FadeInTime = 300
    GridView.SetBorderColor = Colors.White
    GridView.SetCornerRadius = 20
    GridView.SetBorderWidth = 2
    GridView.CacheOnDisk = True
    GridView.SetNoEffect = True
    GridView.SetImageOnLoading = "no_photo.png"



and the images are added form a loop

GridView.ShowFromWeb(s,False)

B4X:
    Dim Amount As Int = NotSent.Get("Amount") 'PEGA QUANTIDADE DE FOTOS VINDAS
    Dim s(Amount) As String
    Dim UrlS, id As String
    Dim i As Int
    Dim Thumbnail1 As List = NotSent.Get("Thumbnails")
    For Each colThumbnails As Map In Thumbnail1
        UrlS  = colThumbnails.Get("Url")
        id = colThumbnails.Get("PhotoID")
        s(i) = UrlS
        i = i + 1
        kv.putsimple("imgnurl"&i,UrlS.Replace("Thumbnails" , "Resamplings")) 'SALVA LOCAL IMG URL NÃO ENVIADAS
        kv.putsimple("imgnid"&i, id) 'SALVA LOCAL O ID DA FOTO
        Next
        GridView.ShowFromWeb(s,False) 'BAIXA NO GRIDVIEW IMAGENS
    End If

i m use this, this works fine at your v3.2 lib v3.3 and v3.4 dont show images *-*
dont have any log with erros etc, only dont show the images
 

lonleystar

Well-Known Member
Licensed User
Longtime User
Hi, if u dont get any error that's mean it work great. Something is wrong in this code:
B4X:
Dim Amount As Int = NotSent.Get("Amount") 'PEGA QUANTIDADE DE FOTOS VINDAS
    Dim s(Amount) As String
    Dim UrlS, id As String
    Dim i As Int
    Dim Thumbnail1 As List = NotSent.Get("Thumbnails")
    For Each colThumbnails As Map In Thumbnail1
        UrlS  = colThumbnails.Get("Url")
        id = colThumbnails.Get("PhotoID")
        s(i) = UrlS
        i = i + 1
        kv.putsimple("imgnurl"&i,UrlS.Replace("Thumbnails" , "Resamplings")) 'SALVA LOCAL IMG URL NÃO ENVIADAS
        kv.putsimple("imgnid"&i, id) 'SALVA LOCAL O ID DA FOTO
        Next
        GridView.ShowFromWeb(s,False) 'BAIXA NO GRIDVIEW IMAGENS
    End If
 

Douglas Farias

Expert
Licensed User
Longtime User
nop the code is working fine
i have try now
GridView.AddImage(File.DirAssets, "1.jpg")

dont show the image too, your lib v3.2 works no problem very strange this.
my device is moto g
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…