Android Code Snippet Image Viewer

Hi All,

Please find attached my Image Viewer, which I would like to share with the B4X community. It’s a very simplistic viewer which I used in one of my projects, although this version has been tidied/cleaned up quite a bit. You should be able to compile this as-is if you want to see it in action but, to be honest the main purpose for this post was to share the code, which you could use in your own projects. It’s nothing spectacular and I’m sure there are a dozen other ways to achieve the same but, I needed something very simple for me project and this did the trick.

The code has been commented in the areas where it is required for you to change it to suit your needs. Look in the Sub Globals section. I do rely on the JpegUtils library for some image rotational operations so you will need to either include it in your IDE or remove/comment the code which uses it. BTW – The Camera button doesn’t do anything (it did in the original project), only the Refresh and Delete ones work (although the file delete command is commented out, so un-comment it if you want to actually test the file deletion).

Hopefully you’ll all find it pretty straight forward to use. If you have any questions please let me know, other than that I hope you like it! I've attached the project zip file.

Moderators - As this is not an app (UI is there just to show how it would look) I thought it best to post it in this section and not in the “Share your creations” section. However, if you feel it should go there instead then by all means please move it.

Thanks

Screenshot_2018-03-12-17-30-26.png Screenshot_2018-03-12-17-29-25.png
 

Attachments

  • ImageViewer.zip
    19.2 KB · Views: 433
Top