Changing ImageView content causes OutOfMemoryError

后端 未结 5 485
渐次进展
渐次进展 2021-02-04 02:14

I have a very simple application with one ImageView and a Button. The first Drawable resource loaded by my ImageView is specified with the \"android:src\" tag i

5条回答
  •  深忆病人
    2021-02-04 02:41

    This was driving me nuts.

    I'm building for a Xoom with very large, hi-res, full screen images (800x1232).

    The following code worked for me:

    public void onStop()
    {
        super.onStop();
        imageView.setImageBitmap(null);
    }
    

    Good luck!!!

提交回复
热议问题