B4A Library [Library] B4aGallery v3.55

B4AGalleryView
Author:
Giuseppe Salvi
Version: 3.55


A thanks is always appreciated.
 

Attachments

  • B4AGallery.zip
    45.9 KB · Views: 1,037
  • B4AGallery v2.51.zip
    133.8 KB · Views: 745
  • gallery.jpg
    gallery.jpg
    94.2 KB · Views: 1,955
  • B4AGalleryView 2.53.zip
    20.5 KB · Views: 651
  • B4AGallery lib v2.80.zip
    26.8 KB · Views: 447
  • B4AGallery v2.90.zip
    238 KB · Views: 421
  • B4AGallery v3.0.zip
    57.3 KB · Views: 434
  • B4AGallery v3.10.zip
    134.3 KB · Views: 995
  • B4AGalleryView v3.55 Lib Fix.zip
    186.7 KB · Views: 1,023
Last edited:

NJDude

Expert
Licensed User
Longtime User
Ok, the problem is that you have this on the demo:
B4X:
Coverflow.AddImage(File.DirRootExternal,"ANY IMAGE HERE")
It should be:
B4X:
Coverflow.AddImage(File.DirRootExternal,"<IMAGE_FOLDER>/IMAGE_NAME")
 
Last edited:

Theera

Well-Known Member
Licensed User
Longtime User
Hi lonleystar,

Is there B4AGalleryView's rotate picture ? Thank you for this library.
 

BowTieNeck

Member
Licensed User
Longtime User
I'm using NJDude's AlternateSample and I've changed the PopulateGallery line to be

Gallery.PopulateGallery(File.DirRootExternal, File.DirAssets)

because I've added 15 jpegs via the Files tab.

I'm getting NullPointerException. Any idea why?
 

NJDude

Expert
Licensed User
Longtime User
I'm using NJDude's AlternateSample and I've changed the PopulateGallery line to be

Gallery.PopulateGallery(File.DirRootExternal, File.DirAssets)

because I've added 15 jpegs via the Files tab.

I'm getting NullPointerException. Any idea why?
The second parameter is a path to a file name not a directory, you are doing it wrong.
 

BowTieNeck

Member
Licensed User
Longtime User
The second parameter is a path to a file name not a directory, you are doing it wrong.
Thanks. I put the folder name there because in the popup help box that appears while you're typing it says "Your FolderName Here" for the second parameter.
Anyway I've changed it now so the second parameter is a filename and it's still not working. I'm loading one jpeg that's 950kb. Perhaps it's too big. I'll have another look tomorrow.
 

lonleystar

Well-Known Member
Licensed User
Longtime User
Hi All, B4AGallery is updated to v2.80.

What's new:

PopulateGalleryFromAssets like coverflow

AddImage and AddImageAt like coverflow

GetImageListFromAssets like coverflow

ShowText like coverflow

TextColor like coverflow

TextSize like coverflow

RemoveAt

ClearCache fixed

isFromAssets example below

Any bug and suggestion plese report.
 
Last edited:

grafsoft

Well-Known Member
Licensed User
Longtime User
Hi,
I have upgraded to 2.80 and not the demo programs do not run at all.
Dim Gallery As B4AGalleryView creates an error.
The library is loaded.
What can I do?
 

lonleystar

Well-Known Member
Licensed User
Longtime User
Hi grafsoft, now U've to use Dim Gallery As PhotoGallery instead of B4AGalleryView have a look below



B4X:
Sub Globals
    Dim Gallery As PhotoGallery 
End Sub

Sub Activity_Create(FirstTime As Boolean)

    Activity.AddMenuItem("Populate From SdCard","b")
    Activity.AddMenuItem("Populate From Assets","c")
    Activity.AddMenuItem("Clear Cache","d")
    Gallery.Initialize("Gallery")
    Gallery.CreateCache = "Pippo.Pluto.Paperino"
    Activity.AddView(Gallery, 0, 0, 100%x, 100%y)
    Gallery.TextSize = 12
    Gallery.TextColor = Colors.Yellow
    Gallery.ShowText = True
    Gallery.ItemWidth = 300
    Gallery.ItemHeight = 400
    Gallery.Spacing = 10dip
End Sub

Sub b_Click
    Gallery.PopulateGallery(File.DirRootExternal, "Images2")
    Gallery.Selection = 33
    Activity.Title = "G.Salvi - Items = " & Gallery.Length & " -  Width = " & Gallery.ItemWidth&" | Height = "&Gallery.ItemHeight
End Sub

Sub c_Click
    Gallery.PopulateGalleryFromAssets("Immagini") 
    Activity.Title = "G.Salvi - Items = " & Gallery.Length & " -  Width = " & Gallery.ItemWidth&" | Height = "&Gallery.ItemHeight
End Sub
Sub d_Click
    Gallery.ClearCache
    Activity.Title = "G.Salvi - Items = " & Gallery.Length & " -  Width = " & Gallery.ItemWidth&" | Height = "&Gallery.ItemHeight
End Sub

Sub Activity_Resume
End Sub

Sub Activity_Pause(UserClosed As Boolean)
End Sub
Sub Gallery_ItemSelected(Position As Int, Value As Object)
    Activity.Title = "G.S - Items = " & Gallery.Length & " | Position = " & Position & _
    " |  Width = " & Gallery.ItemWidth&" | Height = "&Gallery.ItemHeight
End Sub
Sub Gallery_ItemClick(Position As Int, Value As Object)
If Gallery.isFromAssets = True Then
    Gallery.SetBackgroundImage(Value)
Else
  Gallery.SetBackgroundImage(LoadBitmap("", Value))
End If
End Sub

Sub Gallery_ItemLongClick(Position As Int, Value As Object)
    ExitApplication
End Sub
 
Last edited:

lonleystar

Well-Known Member
Licensed User
Longtime User
Hi guys, the new update 3.0 brings many improvements and stability of the library.

What's new:

- ScaleType
- SetOval
- SetBorderColor
- SetBorderWidth
- SetNoEffect



ScaleType - is used to fit the image inside the oval Example:
Gallery.ScaleType = Gallery.ScaleType.Fit_Center

SetCornerRadius - as no effects when SetOval = true



- Removed isFromAssets - have a look at the demo

- fix: When populating the Gallery from sdcard and add an image from assets and vice versa.

- fix: Now you can not only upload images from a folder in assets but also directly from the assets.

- fix: When an image is corrupt, will display an X icon, but you can choose another icon instead of (ic_error.png), and put it in your Files folder's project with the same name.

- you can choose another icon when populating the Gallery instead of (empty_photo.png) with the same name.

and many other fix

The zip include the new demo and the lib 3.0

Any comment or thanks will be appreciated. below is some attach.

Gallery_01.jpg

Gallery_02.jpg

Gallery_03.jpg

Gallery_04.jpg
 

lonleystar

Well-Known Member
Licensed User
Longtime User
Hi Guys, B4AGallery is update 3.10 what's new:

ShowFromAssets instead of PopulateGalleryFromAssets
ShowFromMediaStore instead of PopulateGalleryFromMediaStore
ShowFromSdCard instead of PopulateGalleryFromSDCard

New:

ShowFromWeb
AddImageFromWeb
AddImageFromWebAt
GetArrayList
GoToThumbnail
SetArrayList


minor bug fixed.

the zip include 2 examples and the lib 3.10

P.S.

for one example U need the B4APhotoPager library.


Any comment or thanks, will be appreciated.
 
Top