B4A Library [Library] B4aGallery v3.55

Mrjoey

Active Member
Licensed User
Longtime User
hey , i know that u are downsampling the bitmaps to save some memory , but they are really bad quality when it comes to tablet , is there a way to control the quality , and remain the memory happy? thank u
 

ronovar

Active Member
Licensed User
Longtime User
Hi.

Is there a way of setting custom text below image? For example i have json data that reads images from my server so i would like to set below image my custom text that is read from my server mysql base using json data.

And if you can post the code to position text below image for example -20dip%y from image bottom.

Thanks.
 

Mrjoey

Active Member
Licensed User
Longtime User
Hi Mrjoey, in to the gallery it display just the thumb saved in a cache with the size U give but when u wont to show the entire pict it take the original, so it quality depend from the original pic.
how to give a size to the cache , i created a cache using b4agallery.createcache = "some folder" , but nothing changed , the quality remained low , i did not understand completely ur point.
 

ronovar

Active Member
Licensed User
Longtime User
Hi, lonleystar...i have successfully implement your excellent coverflow(tested on 4000pictures) and is working flawlessly...without any performance loss..all si working birlliant. So for my apk that i im currently developing can you please add to this b4a gallery covers feauture that have for example 5 images in row with text below image, that we have covers on screen and when user get to last cover it scrolls down...here i sthe picture what i mean.

I have tried with Horizontal ScrollView but it is performance sloowly...and after scroling around 100pcitures i im getting in B4A logcat this message:
Downsampling image due to lack of memory.

I have S2HD16 dual core android box with 1gb ram but your excellent library works withut problem.

If you can add this feauture that we have covers grid and when user get to the image with up down left right image is highlighted.

Thanks.
 

Attachments

  • IMAG0083.jpg
    476 KB · Views: 199

ronovar

Active Member
Licensed User
Longtime User
Yes, gridview but with highlight item when user press on remote left/right/up/down and scrolling down to next items when user get to last bottom item(for example gridview have 15 items and when user select 15item and press down or right it scrolles to next 15items).

Can You Please Add this feauture to excellent B4AGallery?

Thanks.
 

ronovar

Active Member
Licensed User
Longtime User
ok...this will be excellent plugin...so if you can addimagefromurl and when last item is selected then scroll down. And if is possible to put text below every image (i im builidng home movei collection so i would like to have below cover of movie movie name etc. label below bitmapfrom url).

Many Thanks.
 

Ratna Fang

Member
Licensed User
Longtime User

hi lonlelystar,

i tried to implement the example like this:
B4X:
Sub Globals
    'These global variables will be redeclared each time the activity is created.
    'These variables can only be accessed from this module.
    Dim Gallery As PhotoGallery
    Dim fromWeb() As String, posSelected As Int
   
   
    Dim gTrack As AnalyticsTracker
End Sub

Sub Activity_Create(FirstTime As Boolean)
    'Do not forget to load the layout file created with the visual designer. For example:
    'Activity.LoadLayout("Layout1")
   
   
    'setup gallery
    Gallery.Initialize("Gallery")
    Activity.AddView(Gallery, 0, Main.PhHeight, 100%x, 90%y-Main.PhHeight)
    'Gallery.ClearCache 'dibersihkan dulu memory
    Gallery.CreateCache="Cacche New"
   
    Gallery.TextSize = 16
    Gallery.TextColor = Colors.Yellow
    Gallery.ShowText = False
    Gallery.ItemWidth = 300
    Gallery.ItemHeight = 200
    Gallery.Spacing = 50
   
    '*************************************
   
    Gallery.ScaleType = Gallery.ScaleType.Center_Crop
    Gallery.SetNoEffect = False
    Gallery.SetBorderColor=Colors.Yellow
    Gallery.SetCornerRadius = 10
    Gallery.SetBorderWidth = 2
    Gallery.SetOval = False
   
    'loop buat bikin array
    Dim Kepala As String
    Log(Main.Halaman)
   
    For i=1 To Main.Halaman
        If i<10 Then Kepala="00"
        If i>=10 AND i<100 Then Kepala="0"
        If i>100 Then Kepala=""
       
        Gallery.AddImageFromWebAt(i-1, Main.LokasiURLIklan & Kepala & i & ".JPG")
    Next
   
   
    If posSelected > Gallery.Length Then
        posSelected = Gallery.Length-1
    End If
   
    Gallery.Selection = posSelected
End Sub

but i always get error like this:
B4X:
java.lang.StackOverflowError

any suggestion about how to use this lib correctly?
the string is correct. perhaps i miss something?
 

Ratna Fang

Member
Licensed User
Longtime User
confirmed. the address is correct. i checked the log, copy and paste in web browser URL, it works.
but if i use it in this code, it's failed.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…