android.view.InflateException: Binary XML file line #2: Error inflating class

At runtime, Android resize’s images based on need (based on the screen size and resolution). It uses Bitmap’s for doing the resizing internally. Which, obviously, is very memory intensive (kinda allocates memory like crazy). One quick way to fix such issues can be, that you copy all drawable files to drawable-ldpi, mdpi, hdpi folders. This … Read more

Bitmap recycle with largeHeap enabled

You should probably have a look at Displaying Bitmaps Efficiently which includes several ways to handle large Bitmaps Efficiently, Loading Large Bitmaps Efficiently BitmapFactory.Options options = new BitmapFactory.Options(); options.inJustDecodeBounds = true; BitmapFactory.decodeResource(getResources(), R.id.myimage, options); int imageHeight = options.outHeight; int imageWidth = options.outWidth; This will give you the size of the image before downloading and on … Read more

How to specify more than 64 mb memory for an application?

largeHeap = “true” does not increase the heap size to or by 64 MB: Most apps should not need this and should instead focus on reducing their overall memory usage for improved performance. Enabling this also does not guarantee a fixed increase in available memory, because some devices are constrained by their total available memory. … Read more