This file contains 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 memLeakArray = []; | |
function FirstWindow() { | |
var win = Ti.UI.createWindow({ | |
backgroundColor: '#ccc' | |
}); | |
var btn = Ti.UI.createButton({ | |
title: 'open next', | |
width: Ti.UI.SIZE, |
This file contains 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
public class Shape | |
{ | |
virtual public int GetHeight() | |
{ | |
return 101; | |
} | |
} | |
public class Square : Shape | |
{ |
This file contains 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(); | |
// image found at | |
// http://f.cl.ly/items/3F2Z0j112l3r0x2Z0215/background.png | |
var bgImage = Ti.UI.createImageView({ | |
width:320, | |
height:320, | |
image: 'background.png', | |
top:-100 |
This file contains 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
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis varius nulla a tortor luctus a suscipit lorem vehicula. Donec eleifend sollicitudin purus, ut condimentum lorem tincidunt eu. Aliquam vitae nunc et lacus faucibus sodales pretium ac nisl. In at metus nec lacus imperdiet semper. Phasellus ullamcorper viverra pharetra. Praesent urna felis, molestie id mattis a, bibendum facilisis mauris. Vestibulum ut sapien magna. Vivamus et justo lectus, ac placerat eros. | |
Aliquam quis elit quis urna egestas mollis quis nec odio. Aenean malesuada, odio vitae egestas dapibus, nunc augue blandit augue, a cursus lectus lorem rutrum augue. Curabitur tincidunt mollis laoreet. Curabitur non dolor neque. Proin accumsan convallis massa vitae feugiat. Aliquam luctus est nec mi vestibulum fermentum. Sed et felis id tortor iaculis gravida. Proin lectus lacus, ultrices posuere imperdiet vel, cursus et leo. Cras lacinia, ante sed accumsan vulputate, quam nisi hendrerit est, vel tempus ante nisl et risus. Cras nulla sapien, aliqu |
This file contains 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
/** | |
* Appcelerator Titanium Mobile | |
* Copyright (c) 2009-2012 by Appcelerator, Inc. All Rights Reserved. | |
* Licensed under the terms of the Apache Public License | |
* Please see the LICENSE included with this distribution for details. | |
* | |
* WARNING: This is generated code. Modify at your own risk and without support. | |
*/ | |
#ifdef USE_TI_UITEXTAREA |
This file contains 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
/** | |
* Test #1 | |
* Adding 10,000 Ti.UI.TableViewRows to a Ti.UI.TableView | |
* The rows have the Ti.UI.iPhone.TableViewCellSelectionStyle.BLUE constant in them | |
* | |
* Total time in my Mac: 1228ms | |
*/ | |
var win = Ti.UI.createWindow({ | |
backgroundColor: '#ccc' |
This file contains 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
/** | |
* Gets a Titanium Element | |
* @param {Ti.UI.View} Parent View - Where the view is | |
* @param {String} tag Property of the view | |
* @param {String} value Value of the custom property | |
* @return {Ti.UI.View} Return a view if found, otherwise null; | |
*/ | |
function getElementByTag(parent, tag, value){ | |
// Store the array in a variable for better performance |
This file contains 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
//------------ ui.js ------------- | |
/** | |
* AlertDialog component with callback function | |
* @param { Object } _params Ti.UI.AlertDialog properties | |
* and optional "callback" | |
*/ | |
exports.Alert = function(_params){ | |
_params = _params || {}; |
This file contains 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 DEBUG = true; | |
/** | |
* Print log in cosole in "< INFO >" modude if DEBUG if true | |
* @param { String } _text console log text | |
*/ | |
exports.Info = function(_text){ | |
if(DEBUG){ | |
Ti.API.info('< INFO > '+_text); | |
} else { | |
return; |
This file contains 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 Dashboard = require('dashboard'); | |
var win = Ti.UI.createWindow({ | |
backgroundColor:'lightgray' | |
}); | |
var view = new Dashboard.View(); | |
var data = []; | |
for(var i = 0; i < 20; i++){ |