Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@pwittchen
Last active December 21, 2015 18:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pwittchen/6347966 to your computer and use it in GitHub Desktop.
Save pwittchen/6347966 to your computer and use it in GitHub Desktop.
imageView = (ImageView) findViewById(R.id.iv_image);
// ...
String imageUrl = "http://www.example.com/image.jpg";
VolleyHelper.init(this); // we can call this method in other place - e.g. in class extending Application class
// and refer to application context insted of activity context
ImageLoader imageLoader = VolleyHelper.getImageLoader();
imageLoader.get(imageUrl,ImageLoader.getImageListener(mImageView,R.drawable.no_image, R.drawable.error_image));
// ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment