Skip to content Skip to sidebar Skip to footer

Android Load Images From Drawable Efficiently

I'm new to Android development and I've had a lot of difficulty figuring out how to load images efficiently. The short version of my question is as follows: I have some png images

Solution 1:

you shoud convert your png image (xxhdpi,mdpi etc..) using this link https://romannurik.github.io/AndroidAssetStudio/nine-patches.html automatically image chaged depending upon your device

Solution 2:

The cause is here:

android:maxWidth="20000dp"android:maxHeight="20000dp"

Try delete these two lines. Your app just contains a simple image, it should not have anything to do with OutOfMemory error.

Post a Comment for "Android Load Images From Drawable Efficiently"