This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Titanium.Geolocation.getCurrentPosition(function(e) | |
| { | |
| if (!e.success || e.error) | |
| { | |
| currentLocation.text = 'error: ' + JSON.stringify(e.error); | |
| Ti.API.info("Code translation: "+translateErrorCode(e.code)); | |
| alert('error ' + JSON.stringify(e.error)); | |
| return; | |
| } | |
| var longitude = e.coords.longitude; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //How to GET and POST special characters to server | |
| var win=Titanium.UI.createWindow({ | |
| backgroundColor:'#fff' | |
| }); | |
| var lbl = Titanium.UI.createLabel({ | |
| top:10, | |
| width:300, | |
| left:10, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var vidWin = Titanium.UI.createWindow({ | |
| title : 'Video', | |
| backgroundColor : '#fff' | |
| }); | |
| var videoPlayer = Titanium.Media.createVideoPlayer({ | |
| top : 2, | |
| autoplay : true, | |
| backgroundColor : 'blue', | |
| height : 300, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var newtop = Ti.Platform.displayCaps.platformHeight + 20; | |
| function doBox(e) { | |
| $.box.animate({ | |
| top:newtop, | |
| duration:2000, | |
| autoreverse: true | |
| }); | |
| } | |
| $.index.open(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var state = true; | |
| var window = Titanium.UI.createWindow({ | |
| backgroundColor: '#ffffff', | |
| height: Ti.UI.FILL, | |
| width: Ti.UI.FILL | |
| }); | |
| var view = Ti.UI.createView({ | |
| top:165, | |
| width:300, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var win = Titanium.UI.createWindow({ | |
| backgroundColor:'#fff' | |
| }); | |
| var webView = Ti.UI.createWebView({ | |
| url:'/localHtml.html', | |
| backgroundColor:'transparent' | |
| }); | |
| win.add(webView); | |
| Ti.App.addEventListener("appC", function(e) { | |
| var win1 = Titanium.UI.createWindow({ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var win = Ti.UI.createWindow({ | |
| backgroundColor : "gray" | |
| }); | |
| var btn = Ti.UI.createButton({ | |
| title : "open email dialogue", | |
| top : 100, | |
| left : 100, | |
| height : 150, | |
| width : 150 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var win = Ti.UI.createWindow(); | |
| var like = Titanium.UI.createImageView({ | |
| image : '/image1.png', | |
| left : 50, | |
| top : 50, | |
| height : 50, | |
| width : 50 | |
| }); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Titanium.UI.setBackgroundColor('#000'); | |
| var win1 = Titanium.UI.createWindow({ | |
| title:'Tab 1', | |
| backgroundColor:'#fff' | |
| }); | |
| var aButton = Ti.UI.createButton({ | |
| title : 'Camera', | |
| height : 50, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var mainWin = Ti.UI.createWindow({ | |
| backgroundColor: "blue" | |
| }); | |
| var btn = Ti.UI.createButton({ | |
| title: "Click", | |
| width: 200, | |
| height: 50, | |
| backgroundColor: "#fff", | |
| color: "#000" | |
| }); |