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
| (function() { | |
| var win = Ti.UI.createWindow(); | |
| var section1 = Ti.UI.createTableViewSection({ | |
| headerTitle:'Header 1' | |
| }); | |
| for (var i=0; i < 4; i++) { | |
| section1.add(Ti.UI.createTableViewRow({ | |
| title:'Row '+i | |
| })); | |
| } |
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
| <html> | |
| <head> | |
| <title>Scrolling along the Z-Axis</title> | |
| <!-- | |
| Example from http://eng.wealtfront.com | |
| Assumes browser window is sized at a height of 400px (the size of the black box). | |
| --> | |
| <style> | |
| body{height:600px;} | |
| #viewport { |
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:'stripped' | |
| }); | |
| win.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
| /* | |
| Copyright 2011 Pedro Enrique | |
| Licensed under the Apache License, Version 2.0 (the "License"); | |
| you may not use this file except in compliance with the License. | |
| You may obtain a copy of the License at | |
| http://www.apache.org/licenses/LICENSE-2.0 | |
| Unless required by applicable law or agreed to in writing, software |
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
| api.cachedImageView = function(imageDirectoryName, url, imageViewObject, hires) { | |
| var filename = url.split('/'); | |
| var hiresfilename; | |
| filename = filename[filename.length - 1]; | |
| hiresfilename = filename.split('.'); | |
| hiresfilename = hiresfilename[hiresfilename.length - 2] + '@2x' + hiresfilename[hiresfilename.length - 1]; | |
| var file = Ti.Filesystem.getFile(Ti.Filesystem.applicationDataDirectory, imageDirectoryName, filename); | |
| var hiresfile = Ti.Filesystem.getFile(Ti.Filesystem.applicationDataDirectory, imageDirectoryName, hiresfilename); | |
| if(file.exists()) { | |
| imageViewObject.image = file.nativePath; |
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 CircleLoaderView = require("CircleLoaderView"); | |
| var myloader = new CircleLoaderView({ | |
| width : 200, | |
| centerWidth : 100, | |
| backgroundColor : "#fff", | |
| tintColor : "blue", | |
| textColor : "red", | |
| labelFontSize : 28 |
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.App.addEventListener("playvideo", function (e) { | |
| win11 = Titanium.UI.createWindow({ | |
| orientationModes: [Ti.UI.LANDSCAPE_LEFT, Ti.UI.LANDSCAPE_RIGHT], | |
| title: "Video", | |
| zIndex: 222222 | |
| }); | |
| var activeMovie = Titanium.Media.createVideoPlayer({ | |
| fullscreen: !0, | |
| autoplay: !0, |
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
| //.. | |
| //AudioStreamer/AudioStreamerCUR.m | |
| // | |
| // failWithErrorCode: | |
| // | |
| // Sets the playback state to failed and logs the error. | |
| // | |
| // Parameters: | |
| // anErrorCode - the error condition | |
| // |
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
| //Application Window Component Constructor | |
| function ApplicationWindow() { | |
| //load component dependencies | |
| var FirstView = require('ui/common/FirstView'); | |
| //create component instance | |
| var self = Ti.UI.createWindow({ | |
| backgroundColor : '#ffffff', | |
| borderRadius : 6 | |
| }); |