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 : 'white' | |
| }); | |
| win.open(); | |
| win.addEventListener('click', function(e) { | |
| var intent = Ti.Android.createIntent({ | |
| action : Ti.Android.ACTION_VIEW, | |
| data : "https://www.google.com/" |
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
| // by Blain Hamon | |
| var win = Ti.UI.createWindow({ | |
| backgroundColor : 'white', | |
| orientationModes : [Ti.UI.PORTRAIT] | |
| }); | |
| win.open(); | |
| var label = Ti.UI.createLabel({ | |
| text : 'No app event received. Make call while running app', | |
| textAlign : 'center', |
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 : 'black', | |
| orientationModes : [Ti.UI.PORTRAIT] | |
| }); | |
| win.open(); | |
| var activeVideo = Titanium.Media.createVideoPlayer({ | |
| top : 0, | |
| height : 200 | |
| }); | |
| win.add(activeVideo); |
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
| // Must use TiSDK 1.8.0.v20110915133349 or newer | |
| var tabGroup = Ti.UI.createTabGroup(); | |
| var win1 = Ti.UI.createWindow({ | |
| backgroundColor : 'white', | |
| orientationModes : [Ti.UI.PORTRAIT] | |
| }); | |
| var label1 = Ti.UI.createLabel({ | |
| text : 'I am a label' | |
| }); | |
| win1.add(label1); |
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 data = []; | |
| for (var i = 0; i < 10; i++) { | |
| data.push({title:'I am row text '+i }); | |
| } | |
| var tableView = Ti.UI.createTableView({ | |
| data:data | |
| }); | |
| tableView.setCreateCallback(function(e) { |
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
| // Must have a pdf reader app installed, maybe Adobe Reader, maybe something else | |
| var win = Ti.UI.createWindow({ | |
| navBarHidden: true, | |
| backgroundColor: 'blue' | |
| }); | |
| win.open(); | |
| var button = Ti.UI.createButton({ | |
| title: 'Get PDF', | |
| 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
| Titanium.UI.setBackgroundColor('#000'); | |
| var windows = []; | |
| // | |
| // create base UI tab and root window | |
| // | |
| var win1 = Titanium.UI.createWindow({ | |
| title : 'Tab 1', | |
| backgroundColor : '#fff', | |
| exitOnClose : true | |
| }); |
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
| <android xmlns:android="http://schemas.android.com/apk/res/android"> | |
| <manifest> | |
| <supports-screens android:anyDensity="false"/> | |
| <application android:debuggable="true"> | |
| <activity android:alwaysRetainTaskState="true" | |
| android:name=".TitestActivity" | |
| android:configChanges="keyboardHidden|orientation" | |
| android:screenOrientation="portrait" | |
| android:theme="@style/Theme.Titanium"> | |
| <intent-filter> |
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
| <!-- add android:screenOrientation="portrait" to the main activity --> | |
| <!-- This sets the splash screen --> | |
| <activity android:name=".Test1Activity" android:screenOrientation="portrait" | |
| android:label="Test1" android:theme="@style/Theme.Titanium" | |
| android:configChanges="keyboardHidden|orientation"> | |
| <intent-filter> | |
| <action android:name="android.intent.action.MAIN" /> | |
| <category android:name="android.intent.category.LAUNCHER" /> | |
| </intent-filter> |
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 : '#fff', | |
| layout : 'vertical' | |
| }); | |
| var testButton = Ti.UI.createButton({ | |
| title : "Copy Folder", | |
| top : 20, | |
| height : 50, | |
| width : 250, |