diff --git a/README.textile b/README.textile index 385678a..6d4637b 100644 --- a/README.textile +++ b/README.textile @@ -5,6 +5,10 @@ Download happens away from the UI thread and the images are cached with a two-le h2. Recent changes +h3. 1.5.7-SNAPSHOT + +* Added the possibility of loading a picture with an Animation + h3. 1.5.6-SNAPSHOT * Removed necessity to set a service in the manifest for the clean up. Everything is done in the BasicFileManager with a background thread. @@ -161,6 +165,31 @@ ImageLoader contains a utility class for directly downloading a Bitmap from a UR This method will throw an ImageNotFoundException if there is no image on the other end of your URL. +h3. Adding an animation + +If you want to load a an image using an animation you just have to add an Animation object to the imageLoader.load method + +

+
+ImageTagFactory imageTagFactory = new ImageTagFactory(this, R.drawable.bg_img_loading);
+imageTagFactory.setErrorImageId(R.drawable.bg_img_notfound);
+
+Animation fadeInAnimation = AnimationUtils.loadAnimation(this, R.anim.fade_in);
+
+private ViewBinder getViewBinder() {
+  return new ViewBinder() {
+    @Override
+    public boolean setViewValue(View view, Cursor cursor, int columnIndex) {
+      // Build image tag with remote image URL
+      ImageTag tag = imageTagFactory.build(cursor.getString(columnIndex));
+      ((ImageView) view).setTag(tag);
+      imageLoader.load(view, fadeInAnimation);
+      return true;
+    }
+  };
+}
+
+ h2. Getting the library h3. Using Maven diff --git a/demo/AndroidManifest.xml b/demo/AndroidManifest.xml index 3d65b5f..7d15608 100644 --- a/demo/AndroidManifest.xml +++ b/demo/AndroidManifest.xml @@ -3,8 +3,8 @@ + android:versionCode="8" + android:versionName="1.5.7-SNAPSHOT">