Loading the same Bitmap multiple times on Android

by Unai Orbe » Thu, 29 Oct 2009 14:42:10 GMT


Sponsored Links
 Hi, I'm pretty new with Android and I have a doubt about how the resource
loading works.

I'm trying to make a game drawing directly on canvas, and I'm loading the
bitmaps using "BitmapFactory.decodeResource(mResources,
R.drawable.my_image)", my doubt is about the way Android stores/loads these.
I'm going to have to load the same image a few times, so I think I need a
"ResourceManager" for my game, but the R class is confusing me.

When I call the "decodeResource", Android has to actually load the image in
memory or it just gives me a "pointer" to the first image it loaded (when
loading the same image twice or more)? I know I could try checking the
memory it takes when loading the same image lots of times, but I'm just
feeling lazy for that :-P

Thanks in advance.

--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. SDK Add-on for Samsung Galaxy Tab

Yeah, found that today. I don't see the forum links on that page
though.

Also there is an issue running apps on the Tab emulator if they use
Google Maps APIs. Gets an error about missing shared library even
though build target for the app includes the Google APIs.




-- 

2. Galaxy Tab SDK missing shared library

Got the same problem today.

My app runs fine on all other emulators, even tried to install from
the web by downloading the version of my app that I sell on the
Android Market. Same issue.

Now since I had to hunt around to find the link for the Galaxy Add-on
maybe its not ready for prime time yet? I searched extensively
yesterday for it and couldn't find it, but today it turns up.

I notice that there is another Build Target available now (right click
project, select properties, click Android) which says: Galaxy Tab Add
On. But what the heck, I don't want to have to have a separate version
of the app compiled against the Galaxy Tab add on package !!!!
Currently I have Google API level 4 (1.6) selected as my Build target.




-- 

3. Crash report: NoSuchFieldError

4. Camera Preview not working on my G2

5. Tab Icons

6. Which Javascript Framework?

7. how to get device's android version