Here is my code:
BitmapFactory.Options options = new BitmapFactory.Options(); options.inJustDecodeBounds = true; BitmapFactory.decodeResource(getResource
Thanks to @CommonsWare and @petey,Loading Large Bitmaps Efficiently works for me.