Android Question Open and close activities slowdown the application

Discussion in 'Android Questions' started by Hccsoft, Feb 2, 2015.

  1. Hccsoft

    Hccsoft Member Licensed User


    I have an application that works properly unless I recharge more than 10 activities (I don't have more than 2 screens at once and I unload the screen when I close). The application becomes slow and charge the images and icons pixelated. I think it's a memory problem but when I close the activities I close using an Activity.RemoveAllViews.

    I also tested with:

    For i = 0 To Activity.NumberOfViews-1 Step -1
    Activity.RemoveViewAt (i)

    Any idea what could be happening?

    Thank you
  2. KMatle

    KMatle Expert Licensed User

    Do you see any out of memory messages in the log?
  3. Erel

    Erel Administrator Staff Member Licensed User

    Make sure that you are not loading large images (width * height). A single large image can consume all the available memory.
  4. Hccsoft

    Hccsoft Member Licensed User

    The background images have 200kb to 500kb and 1300x800 (it's too much?). It's for 1080p Sony Xperia.

    Attached Files:

  5. KMatle

    KMatle Expert Licensed User

    It's 1330x800x4=4 MB. Android has only a very small amout of memory for images (NOT 2 GB!). Load them with bitmapsample at a lower resolution or re-use the imageviews.

    I still wonder why android can display superduper games with Open GL and 3d shaders but is not able to display some images.
    lemonisdead likes this.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice