Busy memory of Imageview

Asked

Viewed 48 times

2

I have a Activity with background with a ImageView 480x800. If I divide this image into 4 equal parts (240x400) and put in it Activity the 4 new images, side by side so that make the same look of the great, I will occupy less memory on the mobile, or gives in the same? At least the apk will decrease.

1 answer

1


The apk will decrease, but it will make no difference when you multiply the image in memory, the space occupied will be what is effectively used and not the original, then you will have a small gain because the executable in memory will be smaller, but not the effective use.

Actually there are other factors that will make a lot more difference and probably this attempt at economics won’t help much. Understanding the general functioning of memory, how objects are allocated and released can give a more effective result.

  • Maniero, I got it... Actually in the end it is in the same... I will then study the objects allocated and released in memory. VLW...

  • 1

    > "At least the APK will decrease", take a look at this if you are interested https://developer.android.com/topic/performance/reduce-apk-size#compress

  • I do not know why they changed the title of this question. By the title that is now, it seems that I want to teach and not learn... Wow Maniero, what an excellent tip. I didn’t even know it existed. Vlw...

Browser other questions tagged

You are not signed in. Login or sign up in order to post.