[F/OS] Image Loader - Extension for image loading and caching

Image Loader

Hi everyone,
Today I present a new extension based on Universal Image Loader that allows you to load and cache images.

Demo

Event

  • OnLoadingStarted: Event when the loading of the image is started. The url returns the URL of the image.

OnLoadingStarted

  • OnLoadingFailed: Event when the image is failed to load. The url returns the URL of the image.

OnLoadingFailed

  • OnLoadingComplete: Event when the image is loaded. The url returns the URL of the image.

OnLoadingComplete

  • OnProgress: Event when the image is loading. The url returns the URL of the image, current returns the current size of the image in bytes, total returns the total size in bytes of the image that is loading.

OnProgress

Methods

  • LoadImage: This method loads the image in the image component. Parameters : imageComponent: The image component where the image will be displayed. url: The URL of the image you want to load.

component_method (3)

  • LoadImageInArrangement: This method loads the image in the vertical/horizontal arrangement component. Parameters : hvArrangement: The vertical/horizontal arrangement component where the image will be displayed. url: The URL of the image you want to load.

imageHV

  • LoadImageAsync: This method loads the image Asynchronous in the image component. Parameters : imageComponent: The image component where the image will be displayed. url: The URL of the image you want to load.

async

  • LoadImageAsyncInArrangement: This method loads the image Asynchronous in the vertical/horizontal arrangement component. Parameters : hvArrangement: The vertical/horizontal arrangement component where the image will be displayed. url: The URL of the image you want to load.

LoadHvAsy

  • CacheImage: This method cache the image without display it. Parameters : url: The URL of the image you want to cache.

CacheImage

  • CachedImageExists: This method return true if the image is in the cache, and false if the image is not in cache. Parameters : url: The URL of the image you want to check.

ImageExists

  • DeleteCachedImage: This method delete image from the cache. Parameters : url: The URL of the image you want to delete from the cache.

DeleteCahted

ExtractCachedImage: This method extracts/copy the image from the cache and save it in a directory that you want. Parameters : url: The URL of the image you want to extract. saveIn: The directory where the image will be saved. extension: The extension of the image (for example: .png .jpg ).


Note: This method works only if WRITE_EXTERNAL_STORAGE is granted before loading/caching the image, see the example below.
ExtractCachedImage Usage

  • ClearDiskCache: This method clean the Disk Cache.

component_method (4)

  • ClearMemoryCache: This method clean the Memory Cache.

component_method (5)

  • PauseLoading: All images that are loading will be paused.

pause

  • ResumeLoading: All images that are paused will be resumed.

resume

  • StopLoading: All images that are loading will be stopped.

stop

Properties

  • DisableCacheOnDisk: If it is checked, it won’t cache on disk.

disk

  • DisableCacheInMemory: If it is checked, it won’t cache in memory.

memory

  • LoadingImage: The image that will be displayed when is loading.

loading

  • ErrorImage: The image that will be displayed when in case of an error.

error

Source code

Downloads

Aix: com.devyb.devybimageloader.aix (216.1 KB)

Aia: ImageLoader.aia (217.2 KB)

Apk: ImageLoader.apk (5.2 MB)

Latest Version: 6
Released:2020-06-21T22:00:00Z
Last Updated:2020-10-02T22:00:00Z

I hope you like this extension, and I hope it helps many users in our community to develop high-quality apps. :hugs:
If you liked this extension and you think it will be useful for the community, let me know with a :+1:.

84 Likes

Nice extension @DevYB

2 Likes

This may resume my work on wallpaper app.
Can I use it to load images from url will they load faster.

2 Likes

Yes, you can use it. watch the demo video.

5 Likes

Can use add a placeholder options to it. :grin:

1 Like

Sure, I’ll add it for the next update.

3 Likes

Nice extension…

Few more functionality on image utilities :+1:

Can I use any other component instead of image component? Like vertical arrangement, horizontal arrangement?
If I assigned it to load lots of images then will it load asynchronously ?

2 Likes

No, only image component is supported.

I Will try to add load images asynchronously for the next update.

3 Likes

Nice Extension. Good work.

extension size is large

1 Like

Thank you.
It’s little bit large because it contains the library.:downcast_face_with_sweat:

3 Likes

:confused::confused::confused:

I think so you must add the support for other components to.

4 Likes

Good job :+1:

You can try modifying the jar.

Good extension provide more functionality and try to reduce the size of extension . Otherwise extension is very very impressive . Good work :grinning:

2 Likes

Good extension
Good work :heart_eyes:

2 Likes

Thank you for helping the community. You did a beautiful job!

2 Likes

Nice Idea :grinning:, I will try to do it. Thank you.

1 Like

Nice Extension :heart_eyes:
Can we use this with Custom listview?

1 Like

Nice aix. …

1 Like

can we also load images as arrangement background? great extension btw

Good extention.keep it up

1 Like