Closed zeagler closed 8 years ago
It seems to be caused be an java.lang.OutOfMemoryError. It looks like some images are using too much memory and are not being saved.
I suspect it is the background image; that is about 4.24 MB.
Should we 1) remove the background image 2) destroy the unused resources our self 3) Use a FrameLayout to display fragments over in an ImageView containing the background
I think it is only a problem with the 'Done' button. The activities are never removed from the back stack when the user returns to the Main Activity. I noticed that when using the Android back button I don't get the problem. If this is the case I should be able to fix he problem momentarily.
I fixed the issue where Activities were not being removed from the back stack but this did not fix the memory problem. I guess we need to free up the resources our selves, although I am not sure why memory is being accumulated anyway.
We have a build up of resources as they are never destroyed, finish()
will dereference and clean up all the resources of an activity.
Bonus: we go back to the previous activity instead of creating new ones so every slider and option is as it was.
When I quickly move between activities the app will crash at some point with an inflation error.
Binary XML file line #105: Error inflating class <unknown>
To reproduce error: use navigation drawer to move between
help
about
history
activities. ClickDone
on new activity. Move through 4 or 5 activity changes until it crashes.