Fragmented - Android Developer Podcast

The Fragmented Podcast is a podcast for Android Developers hosted by Donn Felker and Kaushik Gopal. Our goal is to help you become a better Android Developer. We chat about topics such as Testing, Dependency Injection, Android Patterns and Practices, useful libraries and much more. We will also be interviewing some of the top Android Developers out there. Subscribe now and join us on the journey of being an Android Developer.


episode 5: 005: Image libraries for Android

In this episode of Fragmented, Donn and Kaushik start off by discussing the tips and tricks available for efficiently loading images in an Android app. Good image libraries make use of these techniques and perform all the heavy lifting in the background. So they then discuss the different image library options available for Android developers. Show Notes Techniques/tips on effective image rendering in Android: Bitmap sizes and allocation:

  • Displaying bitmaps efficiently []
  • RGB_565, ARGB_888 and other different bitmap configurations[]
  • Android Camera2 apis []
  • Chet Haase DevByte : Bitmap allocation [] (bitmaps managed in Dalvik heap post 3.0; so large bitmaps implies large heap implies GC could happen more often)
Reuse bitmaps:
  • inBitmap option for Android 3.0 and later []
  • before Android 4.4 only equal sized bitmaps with inSampleSize 1 supported[]
  • Reusing bitmap objects on Android[]
Downsample bitmaps
  • Load a scaled down version into memory []
    • see code for calculateInSampleSize
  • Cache Algorithms - see LruCache []
  • LruCache object in Android []
  • JakeWharton DiskLruCache []
  • Don’t use Soft or Weak References for your Caches []
  • Android Performance Pattern DevByte - why 60fps []
Image libraries for Android:
  • Picasso by Square []
    • fetch introduced in V 2.5.0 (Changelog) []
    • Picasso doesn’t do bitmap recycling
    • Jake Wharton’s thoughts on Picasso not having a bitmap pool []
  • Glide []
    • github issue where author explains tags being used to store metadata[]
    • Glide  does bitmap recycling
  • Ion
    • DeepZoom with Ion []
    • Uses BitmapRegionDecoder to implement DeepZoom[]
  • Volley
    • Ficus Kirkpatrick introduces Volley in Google.IO []
    • Doesn’t come with an image caching mechansim out of the box[]
  • Fresco
    • Introducing Fresco []
    • Romain Guy concern over native api call []
  • Other noteworthies that we did not discuss:
    • Universal Image Loader Library comparisons by others:
  • Picasso vs Glide []
Image library comparisons:
  • JesseWilson on Picasso vs Fresco :P []
  • JesseWilson Picasso:Glide :: Coke:Pepsi []
  • Image comparisons by Koushik Dutta []
  • Volley vs Picasso []
Awesome picks:
  • Donn
    • Moshi - A new modern JSON library for Android and Java from the Square guys
    • JsonSchemaToPojo: Take json or a json schema and turn it into POJOs.
    • Parcelabler: Generate Parcelable implementations with a click of a button
    • Parceler: Android parcels created through Code generation
  • KG:
    • Not your father's Java: 3 part blog post series An opinionated guide to modern Java development
    • Stetho screencast: Debugging Android with Stetho - Donn’sscreencast
    • Cleartones : professional ringtones!
Contact Donn Felker
  • @donnfelker []
Kaushik Gopal
  • @kaushikgopal []


 2015-04-17  1h34m