Single vs Multiple Screens Memory Issues

30 views
Skip to first unread message

Ugur Turan

unread,
Feb 3, 2015, 9:18:50 AM2/3/15
to mitappinv...@googlegroups.com
Hi,

I am trying to make a complex app, and so far I thought about making different screens with vertical layouts, making one visible and the other invisible etc. I plan to have a splash screen with images and sprites but that's it. The rest of the app will be text based. I'll have around 100 variables, 10 lists, 30 labels, 3 listviews, a notifier, a timer, around 40 procedures, a tinydb, a web component, and a canvas with 20 sprites. Now,If I keep everything on one screen, will I have memory issues? would it be better to build an app with multiple screens, opening one and closing the previous? I have a tinydb already, and work with locally saved data, so passing information between screens isn't an issue, I just want to know which way would be better in terms of memory. 

SteveJG

unread,
Feb 3, 2015, 9:33:10 AM2/3/15
to mitappinv...@googlegroups.com
Great question.   We recommend closing screens when changing from one screen to another because this action frees system memory, so the memory used on one screen is released when it is closed as you move to another screen.    If system memory is an issue, then using multiple screens with AI2 makes sense.   There is no reason any app HAS to be developed on a single screen; doing so simplifies a lot of coding issues regarding passing variables but I am not aware of any other significant benefits other than not having to pass values..

Will your proposed app be a system memory hog?    I don't know.  The major thing to consider is that the aia  of you new project does not exceed 5Mb (the source code plus any resources...images, sound files).

So which way would be better in terms of memory?     I expect multiple screens.   What Android users must realize is  the phones are NOT computers and will never be able to process large amounts of data as fast as a computer (all things being equal). The cpu's are generally no match to even the average cpu of a modern PC, so while one can build huge apps with AI2, I expect that comes with a slow response to commands at times.

Anyone have a different opinion?



Regards,
Steve
Reply all
Reply to author
Forward
0 new messages