$.webview.url="http://www.w3schools.com/";
$.webview.addEventListener('beforeload', function(e) {
if (e.url != $.webview.url) {
e.bubble = false;
$.webview.stopLoading();
Ti.Platform.openURL(e.url);
}
});
Wednesday, 4 March 2015
Open links in browser from titanium web view
Monday, 2 March 2015
Titanium - Pause and Resume events for android
win.addEventListener("open", function(e) {
win.activity.addEventListener("resume", function() {
});
//Notice the pause event
win.activity.addEventListener("pause", function() {
});
});
Device Display informations Titanium
Ti.API.info('Ti.Platform.displayCaps.density: ' + Ti.Platform.displayCaps.density); Ti.API.info('Ti.Platform.displayCaps.dpi: ' + Ti.Platform.displayCaps.dpi); Ti.API.info('Ti.Platform.displayCaps.platformHeight: ' + Ti.Platform.displayCaps.platformHeight); Ti.API.info('Ti.Platform.displayCaps.platformWidth: ' + Ti.Platform.displayCaps.platformWidth); if((Ti.Platform.osname === 'iphone')||(Ti.Platform.osname === 'ipad')||(Ti.Platform.osname === 'android')){ Ti.API.info('Ti.Platform.displayCaps.logicalDensityFactor: ' + Ti.Platform.displayCaps.logicalDensityFactor); } if(Ti.Platform.osname === 'android'){ Ti.API.info('Ti.Platform.displayCaps.xdpi: ' + Ti.Platform.displayCaps.xdpi); Ti.API.info('Ti.Platform.displayCaps.ydpi: ' + Ti.Platform.displayCaps.ydpi); }
http://docs.appcelerator.com/titanium/3.0/#!/api/Titanium.Platform.DisplayCaps
Subscribe to:
Posts (Atom)