Smart Image View for Android

useful android libraries
vivekkalady
Site Admin
Posts: 35
Joined: Tue Nov 18, 2014 2:39 pm

Smart Image View for Android

Postby vivekkalady » Sat Nov 22, 2014 9:34 am

SmartImageView is a drop-in replacement for Android’s standard ImageView which additionally allows images to be loaded from URLs or the user’s contact address book. Images are cached to memory and to disk for super fast loading.

Features

  • Drop-in replacement for ImageView
  • Load images from a URL
  • Load images from the phone’s contact address book
  • Asynchronous loading of images, loading happens outside the UI thread
  • Images are cached to memory and to disk for super fast loading
  • SmartImage class is easily extendable to load from other sources

Download the latest .jar file from github and place it in your Android app’s libs/ folder.

Add a SmartImageView to your activity’s xml layout:

Code: Select all

<com.loopj.android.image.SmartImageView
    android:id="@+id/my_image" />


Get a reference to the layout’s SmartImageView:

Code: Select all

SmartImageView myImage = (SmartImageView) this.findViewById(R.id.my_image);


Load an image into the view from a URL:

Code: Select all

myImage.setImageUrl("http://www.awesomeimages.com/myawesomeimage.jpg");


Load an image into the view from the phone’s contact address book:

Code: Select all

myImage.setImageContact(contactAddressBookId);



Original Source : http://loopj.com/android-smart-image-view/

Return to “Libraries”

Who is online

Users browsing this forum: No registered users and 1 guest

cron