0

What is the difference between setImageDrawable() setDrawable() of ImageView. When to use which ?

Constantin Groß
  • 10,719
  • 4
  • 24
  • 50
prago
  • 5,225
  • 5
  • 25
  • 27

1 Answers1

0

setImageDrawable sets the image view with the drawable provided. You would use this to set a drawable in an imageView.

http://developer.android.com/reference/android/widget/ImageView.html#setImageDrawable(android.graphics.drawable.Drawable)

setDrawable doesn't exist in the ImageView class; so, you would never use it in the same context. It looks like it's going to be added to API 21, but that will be in the RotateDrawable class, which, wouldn't be used in the same context.

http://developer.android.com/reference/android/graphics/drawable/RotateDrawable.html

BlackHatSamurai
  • 23,275
  • 22
  • 95
  • 156