Memory Management in Titanium Application

A virtual place which is totally responsible to store and hold our data in this virtual world of mobile or internet is Memory. As this is limited in mobile devices so while developing any application used by them, we should keep this Memory in our mind. And due to this step of Memory Management comes to play.

Memory and storage are looks similar but if we look closely, can find that Memory are volatile location where application and its related data are stored temporarily when application get processed. And the storage had the places where we store our data as long as we need. In mobile devices both storage and memory related things are handled by ship and also by SD Card. Memory spaces varying device to device. In any device there is a limitation for memory consumed by different application and it also varied from device to device. So memory consumed by our application should not exceed the memory limitation provided on device. Violation of this will result crashing of that application unexpectedly. That’s why memory management is the crucial thing that we need to be handled carefully while developing any application.

Continue reading

Custom Tab with Smooth Animation using Titanium Framework

Here is a sample code to make custom tab and open their corresponding views with a smooth animation.

//Define current window
var currentWin = Ti.UI.currentWindow;

//Define the first tab
var firstTab= Ti.UI.createView({

width                  :100,
height                 :50,
left                     : 65,
top                     : 0,
opacity               : 0.5,
backgroundColor :’red’

Continue reading