java - most efficient way of displaying images -


my app uses 29 images in 2 different classes (and layouts). in 1 layout there 1 image view changes between @ 25 of images, , other layout scroll view contains images @ 3 or 4 visible on screen @ time. had images saved .jpg , each 720*540 , around 200-300kb in size. app has had out of memory issues after going between 2 layouts using images; using on 100 mb. did research on bitmaps , tried them images, didn't because still out of memory issues , increased .apk size 3 times. preferred way load images, drawable .jpg or bitmap or other way? suggestions appreciated.

when bitmap in memory, it's uncompressed. original format doesn't matter. can count on each image taking width * height * 4 bytes of memory. e.g., each of 720x540 images take ~1.5mb of memory.

it not matter load them from, @ least far amount of memory required.

now read this,

http://developer.android.com/training/displaying-bitmaps/cache-bitmap.html


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

css - Firefox for ubuntu renders wrong colors -