If you use the support library, you get AppCompatImageView
instead of ImageView
, which supports setImageResource(0)
on all devices, so you should be fine with using it the same way as using setImageDrawable(null)
and setImageBitmap(null)
Otherwise, it should work fine starting from some Android version. According to the code of Android and according to my tests, I think it should be safe to use setImageResource(0)
from Android API 22 (5.1). You can see the Android code of API 22 vs API 21, here