B4i Library Photo Browser Library

Hey Everybody,

I am pleased to publish a library that will allow you to show an image/photo browser.

All you have to do in your code is to use the photo browser object, pass it the list of urls(can be local or remote) and call the Show method, passing in your NavControl object. The photo browser takes care of downloading the images, caching, swipe to view next/previous, zooming etc. It also has a built-in action button that lets you share the images.

As much as I'd like to take credit for this, the real credit should to Michael Waterfall, the author of the wonderful MWPhotoBrowser library. I just sweated over creating the B4i wrapper :)

I'm copying a link to the library zip as it's a little over the limit (800kb) to attach here. The two library archives(.a files) and the header file(.h file) you need to copy to your local mac builder's Libs directory. If you're using hosted builder, you will not be able to use it unless B4i overlord(Erel) takes the library source from me and decides to add it to base.

You also need to copy the .xml file to your B4i installations libraries directory.

A sample project is also attached here.

The library as it stands is fairly basic. It doesn't currently support any callbacks(events) but I will look into adding some as and when required.

Link:

https://drive.google.com/file/d/0ByDFbtVDbyXZeEM4SkdiYXkzVlU/view?usp=sharing

Have fun!

Harris.
 

Attachments

  • PhotoViewer.zip
    2.8 KB · Views: 118

Haris Hafeez

Active Member
Licensed User
Longtime User
So if I understand your requirement, you want the user to be able to move a photo from one album to another. At the moment, this library doesn't support this feature. It was designed to facilitate photo viewing. I will try to look at possible solutions but not promising anything at this time though!
 

Gijsen

Member
Licensed User
Longtime User
When using the lib in debug, I still get the errors from post #3, although I used the new file.
Is there a version that works in both release & debug mode ?

Other that this small issue, the library looks awesome, great work !
(I wouldn't mind paying something for these components. Maybe Erel can make a small b4x component store ? :) )
 

Gijsen

Member
Licensed User
Longtime User
Would it be possible to change the picture 1 "of" 2 text to picture 1 "van" 2 ?
Since the module is loaded from Erel's build server changing the initial files won't help.
 

nwhitfield

Active Member
Licensed User
Longtime User
This is great; thanks very much. The underlying library has various options, including disabling sharing and a grid view as well. Would it be hard to update the wrapper to expose those?
 
Top