I have a ViewFlipper in which, in each of its subviews, I put a bitmap on it. The thing is that I am worried that my application (in special, that Activity) will run out of memory and throw an (OutOfMemory) exception.
I thought in capturing the "OutOfMemory" exception, but that would be too late already...
I want to implement some callback method for when my activity is "about to run out of memory" (like, it will run out of memory if I allocate 2 or 3 more bitmaps).
Is there any method we can implement so I can free some of those loaded bitmaps inside it? I don't want to free the bitmaps if my application still has plenty of memory to have the bitmaps in memory.
Thanks in advance!