Even though you are de-referencing the image view, there still may be
a reference in the Activity itself. Try using this instead:
iv = new ImageView(Context.getApplicationContext() );
I think you're creating a new image, while maintaining the reference
to the old image(s) every time you change
Ok, thanks for the alternate solutions Romain!
I tried reducing the resolution of the picture to a third and then my
application had an out of memory the third time I opened/closed the
keyboard. It seems I'm not releasing the memory properly even though
I'm de-referencing the image view. I'm prob
Your image is simply way too big. You should resize the Bitmap after
loading it or, if it's a JPEG, rescale it at loading time. Take a look
at BitmapFactory.Options to see how to do it.
Alternatively you could handle the screen rotation yourself but it
will prevent you from using alternate resour
Thanks for helping Romain!
I get an OutOfMemoryError on getDrawable(R.drawable.largeimage)
On Dec 22, 5:59 pm, Romain Guy wrote:
> What is the crash exactly? What do you see in the logs? It sounds like
> you're having an OutOfMemory situation.
>
>
>
> On Mon, Dec 22, 2008 at 12:53 PM, mattsm8
What is the crash exactly? What do you see in the logs? It sounds like
you're having an OutOfMemory situation.
On Mon, Dec 22, 2008 at 12:53 PM, mattsm8 wrote:
>
> I am trying to create an application which will display an image which
> is larger than the screen of the device where the user can
5 matches
Mail list logo