The first type of setimageresource is to draw the object drawable from the resource drawable through the resource ID. This method automatically applies a resolution. Suitable for infrequently set picture picture resources not too big. But
For large pictures, or you need to constantly repeat the settings of the image call this method generated by the drawable will generate a bitmap object because bitmap is generated by Bitmapfactory have a part to call C library so need to open up a part
Native local memory space and a portion of the JVM's memory space. and native local memory space is a C-opened JVM's GC garbage collector is not recycled this part of the space, this time if you frequently call Setimageresource and do not manually adjust
Recycle native's memory space is difficult to release. The JVM's memory is not recycled in a timely manner, so it is quite easy to cause memory overflow.
and Setimagebitmap when you need to set up large pictures frequently by bitmapfactory generate bitmap then set and then manually drop the previous bitmap before each set to the recoverable state so that a large extent can prevent memory leaks overflow
So look at your needs your pictures are not frequently set and will not be too large to use the first if the need to constantly repeat the update settings that the best use of the second and remember to manually recycle and then set if useful to the picture cache, do not include large images in the cache
In the picture of the cache module is best to store only small and frequently used images to save memory and time overhead the large map requires manual recycling to ensure that the low-end point of the machine will not oom
[Android interface]setimageresource and Setimagebitmap