Hi, brand new to Appcelerator and looking at developing a basic app to be deployed on iOS, Android and Blackberry OS - however, I'm wondering how best to handle the various screen sizes and densities. Is this likely to be a complex issue and are there any best practices for beginning the development phase with different screen sizes in mind? Many thanks for any help.
2 Answers
This is good place to start: http://docs.appcelerator.com/titanium/2.0/index.html#!/guide/Supporting_Multiple_Platforms_in_a_Single_Codebase
I don't know if this is the best way, but here how I do it:
I create an directory with all the screen resolution that people may use in my system, plus a folder named default.
Then, to load my window I use a script that depending of the width & the height of the screen will decide what folder I should load, and if I can't find the good screen, I load default.
In each of them, I try to separe every part of the UI in separate folder. So the main file, will be the same (and will hold the logic), but the UI part will be in separated folder, so it will look differently on each screen.
At first, I tried using only % to set my height and width, but rapidly I figured that is was awefull, so now I create multiple file... a little bit like reactive css
Your Answer
Think you can help? Login to answer this question!