Universal Image Loader Wrapper for Android

I am not really sure if this is a good idea or not. Yet, I did it and created a github project that is a wrapper for Sergey Tarasevich's Android-Universal-Image-Loader.

In the first version, I just included one of the classes I usually use in my projects, namely ImageLoadingView.
I have, of course, removed many of the functions in the class to make it a minimal wrapper for now.

It could be used in the following way:

    <mobi.sherif.util.ui.ImageLoadingView
        android:id="@+id/image"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        app:bitmapConfig="RGB_565"
        app:cacheInMemory="true"
        app:cacheOnDisc="false"
        app:delayBeforeLoading="1000"
        app:imageForEmptyUri="@drawable/ic_empty"
        app:imageOnFail="@drawable/ic_error"
        app:imageOnLoading="@drawable/ic_stub"
        app:resetViewBeforeLoading="true" />

Obviously, not all the configurations of  UIL's DisplayImageOptions are available in xml but hopefully this will change in future releases.

Another important addition is specifying the url of the image to be loaded in XML using:

    app:imageUrl="http://www.android.com/images/logo.png"

Some times, some java code should be used to set the url: This still possible using the various setImage provided in the ImageLoadingView class.

Basically, that is what this wrapper is for now. It is available on github.

4 comments:

  1. I don’t think many of websites provide this type of information.
    Android App Development

    ReplyDelete
  2. A selection of Android application developers has surfaced in the industry in the recent past. As a matter of fact, there are some strong reasons attached to this. prompter

    ReplyDelete
  3. Since you know about the advantages of putting resources into the Android app, you can build up your app on this most encouraging stage to remain ahead in this aggressive market. fake gps location spoofer free

    ReplyDelete
  4. I found a lot of information here to create this actually best for all newbie here. Thank you for this information. Appvn Apk

    ReplyDelete