I developed an application that uses lots of images on Android.
There are lots of images present in drawable folder say more then 100, I am developing application fo
In the above answer there is a getResources() missing in
getResources()
img.setImageBitmap(decodeSampleBitmapFromResource(R.drawable.dog_animation, width, height));
so it becomes
img.setImageBitmap(decodeSampleBitmapFromResource(getResources(), R.drawable.dog_animation, width, height));