Hide Title- and Tabbar
Hi together,
i have a app with with 4 Tabs.
Lets say on the first one is a Tableview. When the Table recieves data, i show a "loading screen". But this one only hides the table. How can i hide oder overlay the titlebar and tabbar?
2 Answers
-
You could use as a "loading screen" a window that is set fullscreen ( and maybe modal ).
-
I use the following code, which can disable the whole screen with a transparent full screen window:
/** * Disable the screen */ var screenHideWin = null; var disableScreen = function(e) { screenHideWin = Ti.UI.createWindow(); screenHideWin.open({fullscreen:true}); }; Ti.App.addEventListener('disableScreen', disableScreen); /** * Reenable disabled screen */ var enableScreen = function(e) { screenHideWin.close(); screenHideWin = null; }; Ti.App.addEventListener('enableScreen', enableScreen);
You can call the functions directly or by an event:
Ti.App.fireEvent('disableScreen'); //... Ti.App.fireEvent('enableScreen');