Android ImageView replacement which allows image loading from URLs or contact address book, with caching

Overview

Smart Image View for Android

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

Documentation, Features and Examples

Full details and documentation can be found on the project page here:

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

Comments
  • Bitmaps are extremely low quality

    Bitmaps are extremely low quality

    Since commit 302339fce748f6ad83163f520a0b26cf35c5bb35 all my Bitmaps (JPG and PNG) are extremely low quality and pixelated. I load the images from a webserver and have tested it with different images, servers and different locations in my App.

    Seems that the new Bitmap decoding routing is not working for me.

    opened by mac-cain13 2
  • Overloaded the method setImageUrl to receive an URLConnection as parameter

    Overloaded the method setImageUrl to receive an URLConnection as parameter

    I changed the WebImage class and the SmartImageView class to receive an URLConnection as parameter, in case of need is can pass a cookie to URLConnection in request, for example , the secure cookie Amazon CloudFront

    opened by fabriciopaulo 1
  • Added support to get handle of bitmap on image load complete

    Added support to get handle of bitmap on image load complete

    Hi @loopj

    I have added support in OnCompleteListener to get reference(handle) of bitmap with onComplete(Bitmap). Also taken care of backward compatibility of old api call onComplete().

    I think having a way to get referece of bitmap will be handy for other applications.

    opened by rutvijkumarshah 1
  • Added OnCompleteListener

    Added OnCompleteListener

    Added OnCompleteListener to support external callbacks. My use case was that I had a shadow below my ImageView, however if the loading of the image took too much time, the shadow was just laying there. By setting a callback I can show the shadow only after the image loaded completely.

    opened by ffleandro 1
  • Scaling of images

    Scaling of images

    Is there a way to scale the images, to make it similar to:

    ImageView image;
    image = (ImageView)findViewById(R.id.yourImageView1);
    image.setScaleType(ImageView.ScaleType.FIT_CENTER);
    

    There is no provision that is similar. I would like to scale images across many android devices. Is this the right approach?

    /* some code not shown; smartImageView is basically an instance of SmartImageView */
    smartImageView.setImageUrl(data.picture);
    smartImageView.setMaxHeight(10);
    smartImageView.setMaxWidth(10);
    

    What units are used as parameters for setMaxHeight() and setMaxWidth() or other methods for size setting?

    Thanks.

    opened by miclovich 0
  • While scrolling images in list view is disturbed.

    While scrolling images in list view is disturbed.

    To explain with an example.

    List View

    Image 1 Image 2 Image 3 ------- Beyond the visible area ----- Image 4 Image 5

    All the image tags have default src attribute for empty images.

    Now when I scroll down & if the connection is slow by default I will see Image1 and Image 2 in Image 4 and 5 place holders. Once the image is loaded it replaced it with correct images.

    This is more visible when we scroll fast or use bigger images. It would be great if Image 4 and Image 5 could show the default drawable if the image is not loaded while scrolling.

    We tried to play around with the code but I am no expert to fix it :)

    EDIT : Fixed by assigning default drawable for this view

    opened by BuddhaSource 0
  • Crash Aplicattion

    Crash Aplicattion

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

    .JAVA SmartImageView myImage = (SmartImageView) findViewById(R.id.my_image); myImage.setImageUrl("http://www.awesomeimages.com/myawesomeimage.jpg");

    Manifiest

    error FATAL EXCEPTION: main Process:, PID: 14393 java.lang.NullPointerException: Attempt to invoke virtual method 'void com.loopj.android.image.SmartImageView.setImageUrl(java.lang.String)' on a null object reference

    opened by diegoarielbarriosmichalik 2
  • Still supported

    Still supported

    Is smart image view still being updated/supported. It appears that is has not been updated in years and looking to see if it would handle images and mp4 and AndroidStudio.

    opened by justdan0227 0
  • Cache removal control

    Cache removal control

    need to have cache removal control. This can be done if the WebImageCache would be private and providing a getInstance method to the file would make this happen.

    opened by naveenthontepu 0
Replacement for deprecated official Android crop image function

The MIT License (MIT) Copyright (c) 2012 Jan Muller Permission is hereby granted, free of charge, to any person obtaining a copy of this software and

Jan Muller 561 Nov 25, 2022
Custom ImageView for moving image around the screen (Android)

MovingImageView Create a custom ImageView for moving image around the screen. Usage To use MovingImageView, add the module into your project and start

Albert Grobas 819 Nov 18, 2022
Flickable ImageView for Android. It's like a view of twitter's detail image.

FlickableView Flickable ImageView for Android. It's like a view of twitter's detail image. It's possible that other views animate with FlickableView.

goka 153 Nov 14, 2022
A library for Android provides blurred drop shadows to ImageView similar to iOS image backdrop shadows

A library for Android provides blurred drop shadows to ImageView similar to iOS image backdrop shadows.Provides fast canvas draw as no renderscript needed .The similar shadow blurred effects can also be seen in iOS Music App.

Vivek Verma 163 Dec 31, 2022
Custom ImageView to generate captcha image.

CaptchaImageView Custom ImageView to generate captcha image. Add CaptchaImageView to your layout <test.jinesh.captchaimageviewlib.CaptchaImageView

Jinesh Francis 610 Oct 18, 2022
AndroidGradientImageView is a simple imageview which overlays gradient on its content.

AndroidGradientImageView AndroidGradientImageView is a simple imageView which overlays gradient on its content like below: Setup Gradle dependencies {

Sungcheol Kim 216 Nov 18, 2022
Image Picker with Customizable UI for Android, Pick an image from Gallery

Image Picker A Image Picker Library for Android (Supports Android 12) with fully

null 2 May 29, 2022
Slider-Gallery-Zoom: image slider for android supporting indicator and auto scroll with clicking on image

image slider supporting indicator and auto scroll with clicking on image to open full screen image slider swipe and pinch zoom gestures like gallery,just pass your images and the position of the current image.

Mahmoud Elian 3 May 28, 2022
Custom ImageView for android with polygon shape (Android)

PolygonImageView Create a custom ImageView with polygonal forms. Usage To use PolygonImageView, add the module into your project and start to build xm

Albert Grobas 531 Dec 25, 2022
Implementation of ImageView for Android that supports zooming, by various touch gestures.

PhotoView PhotoView aims to help produce an easily usable implementation of a zooming Android ImageView. [ Dependency Add this in your root build.grad

Baseflow 18.4k Dec 30, 2022
A circular ImageView for Android

CircleImageView A fast circular ImageView perfect for profile images. This is based on RoundedImageView from Vince Mi which itself is based on techniq

Henning Dodenhof 13.8k Mar 29, 2021
Adds touch functionality to Android ImageView.

TouchImageView for Android Capabilities TouchImageView extends ImageView and supports all of ImageView’s functionality. In addition, TouchImageView ad

Michael Ortiz 2.4k Mar 28, 2021
Custom shaped android imageview components

Shape Image View Provides a set of custom shaped android imageview components, and a framework to define more shapes. Implements both shader and bitma

Siyamed SINIR 2.6k Mar 29, 2021
Android ImageView widget with zoom and pan capabilities

ImageViewTouch for Android ImageViewTouch is an android ImageView widget with zoom and pan capabilities. This is an implementation of the ImageView wi

Alessandro Crugnola 1.9k Jan 4, 2023
Implements pinch-zoom, rotate, pan as an ImageView for Android 2.1+

GestureImageView This is a simple Android View class which provides basic pinch and zoom capability for images. Can be used as a replacement for a sta

Jason 1.1k Nov 10, 2022
Android ImageView that handles animated GIF images

GifImageView Android ImageView that handles Animated GIF images Usage In your build.gradle file: dependencies { compile 'com.felipecsl:gifimageview:

Felipe Lima 1.1k Mar 9, 2021
Android ImageView that supports different radii on each corner.

SelectableRoundedImageView Note that this project is no longer maintained. Android ImageView that supports different radii on each corner. It also sup

Joonho Kim 1.1k Mar 17, 2021
ImageView with a tag on android

SimpleTagImageView ImageView with a tag in android. So it's a ImageView. Demo ####Warning:When you set the round radius,the simpletagimageview scale t

null 944 Nov 10, 2022
Create parallax and any other transformation effects on scrolling android ImageView

Android Parallax Image View Creates effect such as vertical parallax, horizontal parallax etc. on android ImageView when it's being vertically or hori

Aris 164 Dec 7, 2022