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: 930
  • B4AGallery v2.51.zip
    133.8 KB · Views: 642
  • gallery.jpg
    gallery.jpg
    94.2 KB · Views: 1,873
  • B4AGalleryView 2.53.zip
    20.5 KB · Views: 559
  • B4AGallery lib v2.80.zip
    26.8 KB · Views: 351
  • B4AGallery v2.90.zip
    238 KB · Views: 343
  • B4AGallery v3.0.zip
    57.3 KB · Views: 364
  • B4AGallery v3.10.zip
    134.3 KB · Views: 901
  • B4AGalleryView v3.55 Lib Fix.zip
    186.7 KB · Views: 918
Last edited:

ronovar

Active Member
Licensed User
Longtime User
Hi, Ratna Fang....this was issue that i have before....so this is what i did:

- i downloaded from first page coverflow example....delete code that i don't need (buttons press event) and put my links in this example...when compile choose ALL and install on your android device..then it need to run without error.

@lonleystar...i try code above but it scrolls only horizontaly...how to scroll verically? if you can attach simple project example as zip so that i can play with code..i try
Gallery.ScaleType = Gallery.ScaleType.Fit_XY but it scrolls horizontaly.
 

lonleystar

Well-Known Member
Licensed User
Longtime User
Hi, i tried it and work fine this is the way example:

B4X:
Gallery.AddImageFromWebAt(0,"https://lh4.googleusercontent.com/-e9NHZ5k5MSs/URqvMIBZjtI/AAAAAAAAAbs/1fV810rDNfQ/s1024/Yosemite%252520Tree.jpg")

or

Gallery.AddImageFromWeb("https://lh4.googleusercontent.com/-e9NHZ5k5MSs/URqvMIBZjtI/AAAAAAAAAbs/1fV810rDNfQ/s1024/Yosemite%252520Tree.jpg")
 

Marco Nissen

Active Member
Licensed User
Longtime User
Ok...i finnaly found a solution that works...i have made a mistake...when i compile and using b4a bridge i get every time clicked install only NEW code and then apk exits...so now i clicked install ALL code apk and apk works flawessly-


I just had the same issue. In the example file, there are some additional image files, which, if missing, cause a crash of the library.
Just make sure to include these files, and all will be good
 

Informatix

Expert
Licensed User
Longtime User
Hi just now i tested it and I've no this problem with the demo.

did u try it changing the scaletype, I use this below

Gallery.ScaleType = Gallery.ScaleType.Fit_Center and fit good see the pic below.

View attachment 25186
I placed this line:
Gallery.ScaleType = Gallery.ScaleType.Fit_Center
before and after Gallery.ShowFromMediaStore in the demo. In both cases, I had no change. I tried other values; same result. I cleared the cache before each attempt. Images are still stretched.

PS: the ScaleType setting works fine in your recent GridView lib.
 

bluedude

Well-Known Member
Licensed User
Longtime User
Interesting but unfortunately this thing crashes my app all the time. In simple projects with just one activity it seems to work but the minute i'm using actionbars etc. it never works to load images.

I'm getting a stackoverflow.

processMsg: L2ConnectedState
handleMessage: X
START u0 {flg=0x20000 cmp=com.thingstank.apps.myapp/.actslider} from pid 8969


Calling a method in the system process without a qualified user: android.app.ContextImpl.sendBroadcast:1244 android.content.ContextWrapper.sendBroadcast:365 com.motorola.motocare.util.TriggerHelper$TriggerBuilder.send:76 com.motorola.motocare.internal.frameworkevents.PauseResumeTrigger.handleFrameworkEvent:53 com.motorola.motocare.internal.frameworkevents.FwEventMonitor$FrameworkListener.processFrameworkEvent:114


** Activity (main) Pause, UserClosed = false **
Calling a method in the system process without a qualified user: android.app.ContextImpl.sendBroadcast:1244 android.content.ContextWrapper.sendBroadcast:365 com.motorola.motocare.util.TriggerHelper$TriggerBuilder.send:76 com.motorola.motocare.internal.frameworkevents.PauseResumeTrigger.handleFrameworkEvent:53 com.motorola.motocare.internal.frameworkevents.FwEventMonitor$FrameworkListener.processFrameworkEvent:114
** Activity (actslider) Create, isFirst = true **


handleMessage: E msg.what=151572


processMsg: ConnectedState
processMsg: L2ConnectedState
handleMessage: X
MemoryCache will use up to 24.0MB
** Activity (actslider) Resume **


Unable to decode stream: java.io.FileNotFoundException: /storage/emulated/0/Android/data/com.thingstank.apps.myapp/cache/.thumbs/-290755091: open failed: ENOENT (No such file or directory)
threadid=1: stack overflow on call to Ljava/util/Collections;.emptyList:L
method requires 4+20+0=24 bytes, fp is 0x41a25314 (20 left)
expanding stack end (0x41a25300 to 0x41a25000)


Shrank stack (to 0x41a25300, curFrame is 0x41a25380)
Exception thrown (Ljava/lang/StackOverflowError;) while throwing internal exception (Ljava/io/FileNotFoundException;)
Shutting down VM
threadid=1: thread exiting with uncaught exception (group=0x41b8ed40)
handleMessage: E msg.what=131155
processMsg: ConnectedState
processMsg: L2ConnectedState
handleMessage: X
java.lang.StackOverflowError


at java.lang.Throwable.<init>(Throwable.java:67)
at java.lang.Exception.<init>(Exception.java:47)
at java.io.IOException.<init>(IOException.java:44)
at java.io.FileNotFoundException.<init>(FileNotFoundException.java:42)
at android.content.res.AssetManager.openAsset(Native Method)
at android.content.res.AssetManager.open(AssetManager.java:316)
at android.content.res.AssetManager.open(AssetManager.java:290)
at it.giuseppe.salvi.library.photogallery.downloader.PhotoGalleryDownloader.getBitmapFromAssets(PhotoGalleryDownloader.java:241)
at it.giuseppe.salvi.library.photogallery.downloader.PhotoGalleryDownloader.getBitmapFromAssets(PhotoGalleryDownloader.java:243)
at it.giuseppe.salvi.library.photogallery.downloader.PhotoGalleryDownloader.getBitmapFromAssets(PhotoGalleryDownloader.java:243)
at it.giuseppe.salvi.library.photogallery.downloader.PhotoGalleryDownloader.getBitmapFromAssets(PhotoGalleryDownloader.java:243)
at it.giuseppe.salvi.library.photogallery.downloader.PhotoGalleryDownloader.getBitmapFromAssets(PhotoGalleryDownloader.java:243)


at it.giuseppe.salvi.library.photogallery.downloader.PhotoGalleryDownloader.getBitmapFromAssets(PhotoGalleryDownloader.java:243)
at it.giuseppe.salvi.library.photogallery.downloader.PhotoGalleryDownloader.getBitmapFromAssets(PhotoGalleryDownloader.java:243)
at it.giuseppe.salvi.library.photogallery.downloader.PhotoGalleryDownloader.getBitmapFromAssets(PhotoGalleryDownloader.java:243)
at it.giuseppe.salvi.library.photogallery.downloader.PhotoGalleryDownloader.getBitmapFromAssets(PhotoGalleryDownloader.java:243)
at it.giuseppe.salvi.library.photogallery.downloader.PhotoGalleryDownloader.getBitmapFromAssets(PhotoGalleryDownloader.java:243)
at it.giuseppe.salvi.library.photogallery.downloader.PhotoGalleryDownloader.getBitmapFromAssets(PhotoGalleryDownloader.java:243)
at it.giuseppe.salvi.library.photogallery.downloader.PhotoGalleryDownloader.getBitmapFromAssets(PhotoGalleryDownloader.java:243)
at it.giuseppe.salvi.library.photogallery.downloader.PhotoGalleryDownloader.getBitmapFromAssets(PhotoGalleryDownloader.java:243)
at it.giuseppe.salvi.library.photogallery.downloader.PhotoGalleryDownloader.getBitmapFromAssets(PhotoGalleryDownloader.java:243)
at it.giuseppe.salvi.library.photogallery.downloader.PhotoGalleryDownloader.getBitmapFromAssets(PhotoGalleryDownloader.java:243)
at it.giuseppe.salvi.library.photogallery.downloader.PhotoGalleryDownloader.getBitmapFromAssets(PhotoGalleryDownloader.java:243)
at it.giuseppe.salvi.library.photogallery.downloader.PhotoGalleryDownloader.getBitmapFromAssets(PhotoGalleryDownloader.java:243)
at it.giuseppe.salvi.library.photogallery.downloader.PhotoGalleryDownloader.getBitmapFromAssets(PhotoGalleryDownloader.java:243)
at it.giuseppe.salvi.library.photogallery.downloader.PhotoGalleryDownloader.getBitmapFromAssets(PhotoGalleryDownloader.java:243)
at it.giuseppe.salvi.library.photogallery.downloader.PhotoGalleryDownloader.getBitmapFromAssets(PhotoGalleryDownloader.java:243)
at it.giuseppe.salvi.library.photogallery.downloader.PhotoGalleryDownloader.getBitmapFromAssets(PhotoGalleryDownloader.java:243)
at it.giuseppe.salvi.library.photogallery.downloader.PhotoGalleryDownloader.getBitmapFromAssets(PhotoGalleryDownloader.java:243)
at it.giuseppe.salvi.library.photogallery.downloader.PhotoGalleryDownloader.getBitmapFromAssets(PhotoGalleryDownloader.java:243)
at it.giuseppe.salvi.library.photogallery.downloader.PhotoGalleryDownloader.getBitmapFromAssets(PhotoGalleryDownloader.java:243)
at it.giuseppe.salvi.library.photogallery.downloader.PhotoGalleryDownloader.getBitmapFromAssets(PhotoGalleryDownloader.java:243)
at it.giuseppe.salvi.library.photogallery.downloader.PhotoGalleryDownloader.getBitmapFromAssets(PhotoGalleryDownloader.java:243)
at it.giuseppe.salvi.library.photogallery.downloader.PhotoGalleryDownloader.getBitmapFromAssets(PhotoGalleryDownloader.java:243)
at it.giuseppe.salvi.library.photogallery.downloader.PhotoGalleryDownloader.getBitmapFromAssets(PhotoGalleryDownlo
Message longer than Log limit (4000). Message was truncated.
FATAL EXCEPTION: main
Process: com.thingstank.apps.myapp, PID: 8969
java.lang.StackOverflowError
at java.lang.Throwable.<init>(Throwable.java:67)
at java.lang.Exception.<init>(Exception.java:47)
at java.io.IOException.<init>(IOException.java:44)
at java.io.FileNotFoundException.<init>(FileNotFoundException.java:42)
at android.content.res.AssetManager.openAsset(Native Method)
at android.content.res.AssetManager.open(AssetManager.java:316)
at android.content.res.AssetManager.open(AssetManager.java:290)
at it.giuseppe.salvi.library.photogallery.downloader.PhotoGalleryDownloader.getBitmapFromAssets(PhotoGalleryDownloader.java:241)
at it.giuseppe.salvi.library.photogallery.downloader.PhotoGalleryDownloader.getBitmapFromAssets(PhotoGalleryDownloader.java:243)
at it.giuseppe.salvi.library.photogallery.downloader.PhotoGalleryDownloader.getBitmapFromAssets(PhotoGalleryDownloader.java:243)
at it.giuseppe.salvi.library.photogallery.downloader.PhotoGalleryDownloader.getBitmapFromAssets(PhotoGalleryDownloader.java:243)


at it.giuseppe.salvi.library.photogallery.downloader.PhotoGalleryDownloader.getBitmapFromAssets(PhotoGalleryDownloader.java:243)
at it.giuseppe.salvi.library.photogallery.downloader.PhotoGalleryDownloader.getBitmapFromAssets(PhotoGalleryDownloader.java:243)
at it.giuseppe.salvi.library.photogallery.downloader.PhotoGalleryDownloader.getBitmapFromAssets(PhotoGalleryDownloader.java:243)
at it.giuseppe.salvi.library.photogallery.downloader.PhotoGalleryDownloader.getBitmapFromAssets(PhotoGalleryDownloader.java:243)
at it.giuseppe.salvi.library.photogallery.downloader.PhotoGalleryDownloader.getBitmapFromAssets(PhotoGalleryDownloader.java:243)
at it.giuseppe.salvi.library.photogallery.downloader.PhotoGalleryDownloader.getBitmapFromAssets(PhotoGalleryDownloader.java:243)
at it.giuseppe.salvi.library.photogallery.downloader.PhotoGalleryDownloader.getBitmapFromAssets(PhotoGalleryDownloader.java:243)
at it.giuseppe.salvi.library.photogallery.downloader.PhotoGalleryDownloader.getBitmapFromAssets(PhotoGalleryDownloader.java:243)
at it.giuseppe.salvi.library.photogallery.downloader.PhotoGalleryDownloader.getBitmapFromAssets(PhotoGalleryDownloader.java:243)
at it.giuseppe.salvi.library.photogallery.downloader.PhotoGalleryDownloader.getBitmapFromAssets(PhotoGalleryDownloader.java:243)
at it.giuseppe.salvi.library.photogallery.downloader.PhotoGalleryDownloader.getBitmapFromAssets(PhotoGalleryDownloader.java:243)
at it.giuseppe.salvi.library.photogallery.downloader.PhotoGalleryDownloader.getBitmapFromAssets(PhotoGalleryDownloader.java:243)
at it.giuseppe.salvi.library.photogallery.downloader.PhotoGalleryDownloader.getBitmapFromAssets(PhotoGalleryDownloader.java:243)
at it.giuseppe.salvi.library.photogallery.downloader.PhotoGalleryDownloader.getBitmapFromAssets(PhotoGalleryDownloader.java:243)
at it.giuseppe.salvi.library.photogallery.downloader.PhotoGalleryDownloader.getBitmapFromAssets(PhotoGalleryDownloader.java:243)
at it.giuseppe.salvi.library.photogallery.downloader.PhotoGalleryDownloader.getBitmapFromAssets(PhotoGalleryDownloader.java:243)
at it.giuseppe.salvi.library.photogallery.downloader.PhotoGalleryDownloader.getBitmapFromAssets(PhotoGalleryDownloader.java:243)
at it.giuseppe.salvi.library.photogallery.downloader.PhotoGalleryDownloader.getBitmapFromAssets(PhotoGalleryDownloader.java:243)
at it.giuseppe.salvi.library.photogallery.downloader.PhotoGalleryDownloader.getBitmapFromAssets(PhotoGalleryDownloader.java:243)
at it.giuseppe.salvi.library.photogallery.downloader.PhotoGalleryDownloader.getBitmapFromAssets(PhotoGalleryDownloader.java:243)
at it.giuseppe.salvi.library.photogallery.downloader.PhotoGalleryDownloader.getBitmapFromAssets(PhotoGalleryDownloader.java:243)
at it.giuseppe.salvi.library.photogallery.downloader.PhotoGalleryDownloader.getBitmapFromAssets(PhotoGalleryDownloader.java:243)
at it.giuseppe.salvi.library.photogallery.downloader.PhotoGalleryDownloader.getBitmapFromAssets(PhotoGalleryDownloader.java:243)
at it.giuseppe.salvi.library.photog
GC_FOR_ALLOC freed 4862K, 30% free 12178K/17244K, paused 20ms, total 20ms
Force finishing activity com.thingstank.apps.myapp/.actslider
Force finishing activity com.thingstank.apps.myapp/.main
Calling a method in the system process without a qualified user: android.app.ContextImpl.sendBroadcast:1244 android.content.ContextWrapper.sendBroadcast:365 com.motorola.motocare.util.TriggerHelper$TriggerBuilder.send:76 com.motorola.motocare.internal.frameworkevents.PauseResumeTrigger.handleFrameworkEvent:53 com.motorola.motocare.internal.frameworkevents.FwEventMonitor$FrameworkListener.processFrameworkEvent:114
triggers: (rate: 322:8981) (compose: 0:108) (post: 3:902) (render: 101:2148) (16:89707 frames) (17:335885)
layers: (3:14) (DimLayer: 0:210)* (DimLayer: 0:12)* (FocusedStackFrame: 1:4113)* (StatusBar: 1:30620) (NavigationBar: 0:23790) (com.android.systemui.ImageWallpaper: 0:3137)* (DimLayer: 0:82)* (DimLayer: 0:199)* (it.giuseppe.salvi.galleryview/it.giuseppe.salvi.galleryview.main: 0:43)* (Starting com.thingstank.apps.myapp: 0:41)* (com.thingstank.apps.myapp/com.thingstank.apps.myapp.main: 0:58)* (com.thingstank.apps.myapp/com.thingstank.apps.myapp.actsplash: 0:27)* (com.thingstank.apps.myapp/com.thingstank.apps.myapp.main: 0:33) (com.thingstank.apps.myapp/com.thingstank.apps.myapp.actslider: 17:18)*
Start proc com.google.android.gms.drive for service com.google.android.gms/.drive.api.ApiService: pid=9459 uid=10032 gids={50032, 3003, 1007, 1028, 1015, 3002, 3001, 3007, 2001, 3006}
 

bluedude

Well-Known Member
Licensed User
Longtime User
Hi lonleystar,

Also tested this with the grid, same problems. I have tested many times to see if some other libraries bite eachother but could not get it working. It have a feeling it has something to do with maybe the Stdactionbar library or so.

Photopager doesn't have the same problem, that one works.
 

Mrjoey

Active Member
Licensed User
Longtime User
hi mr Lonleystar can u include this option please? CacheInMemory As Boolean
since my app is almost heavy and i need to save some memory , it will be good to me if this option is mentioned in the next update , thank u :)
 

ronovar

Active Member
Licensed User
Longtime User
Hi, lonleystar...can you please give me example code how to use Two instances of Gallery and Gallery2?

I try to use 2 instances gallery witch is on panel0 and gallery2 witch is on panel6

When i start apk panel0 with gallery is showed and all covers and text matched form my server (Batman Label - Batmal Cover, Rio Label - Rio Cover...)

But when i click on Panel6 it is show correct images from another server (series label - series cover...)

Then i click on panel0 to show again gallery and then all is mismatched (Batman Label - Series Cover etc...) so how to use indenpended two galleries that loads correct cover when switching over gallery and gallery2

Thanks.
 

bluedude

Well-Known Member
Licensed User
Longtime User
I'm using two instances of the gallery view on one layout and activity but they always show me both the same image even if I use different URL's to load.

Tried to create two seperate caches but the last URL I load will always show in both galleries.

Can you solve it?

Cheers.
 

lonleystar

Well-Known Member
Licensed User
Longtime User
I'm using two instances of the gallery view on one layout and activity but they always show me both the same image even if I use different URL's to load.

Tried to create two seperate caches but the last URL I load will always show in both galleries.

Can you solve it?

Cheers.
Hi, yes I know but of course I'll solve it soon give me a little time.

Thanks in advance
 

Mrjoey

Active Member
Licensed User
Longtime User
hey mr lonleystar , can u leave the old engine but just fix the scaletype? , cz the current engine fits my needs , or if u already started it , i can pay for it , thanks.
 
Top