Skip to content

Instantly share code, notes, and snippets.

var win = Titanium.UI.currentWindow;
win.backgroundColor = '#fff';
win.layout = 'vertical';
var CONTROL_HEIGHT = 34;
titles = [
{ title: 'This is row 0 (from array)'},
{ title: 'This is row 1 (from array)'},
{ title: 'This is row 2 (from array)'},
// create table view data object
var data = [];
data[0] = Ti.UI.createTableViewRow({hasChild:true,title:'Row 1'});
data[1] = Ti.UI.createTableViewRow({});
data[2] = Ti.UI.createTableViewRow({hasCheck:true,title:'Row 3'});
data[3] = Ti.UI.createTableViewRow({title:'Row 4'});
var label = Ti.UI.createLabel({
// create table view data object
var data = [
{title:'Row 1', hasChild:true, color:'red', selectedColor:'#fff'},
{title:'Row 2', hasDetail:true, color:'green', selectedColor:'#fff'},
{title:'Row 3', hasCheck:true, color:'blue', selectedColor:'#fff'},
{title:'Row 4', color:'orange', selectedColor:'#fff'},
{title:'Row 5', color:'orange', selectedColor:'#fff'},
{title:'Row 6', color:'orange', selectedColor:'#fff'},
{title:'Row 7', color:'orange', selectedColor:'#fff'},
{title:'Row 8', color:'orange', selectedColor:'#fff'},
var imageScrollView = Titanium.UI.createScrollView({
contentWidth:'auto',
contentHeight:'auto',
top:0,
showVerticalScrollIndicator:true,
showHorizontalScrollIndicator:true
});
var select;
var category;
var win1 = Ti.UI.currentWindow;
var imageScrollView = Titanium.UI.createScrollView({
contentWidth:'auto',
contentHeight:'auto',
top:0,
showVerticalScrollIndicator:true,
showHorizontalScrollIndicator:true
});
@hal-gh
hal-gh / app.js
Created November 10, 2010 19:42
tabgroup close test
Ti.UI.setBackgroundColor('white');
var winRoot = Ti.UI.createWindow({
backgroundColor:'blue',
fullscreen: true,
title:'Tab 1'
});
var tabGroupMode = 1;
// click window to open tabgroup
// this sets the background color of the master UIView (when there are no windows/tab groups on it)
Titanium.UI.setBackgroundColor('#f00');
//create tab group
var tabGroup = Titanium.UI.createTabGroup();
//
// create base UI tab and root window
//
var win1 = Titanium.UI.createWindow({
var win = Titanium.UI.currentWindow;
var b1 = Titanium.UI.createButton({
title:'I am a Button',
height:40,
width:200,
top:10
});
1096 KrollContext D (kroll$1) [11,33] Running evaluated script: app://app.js
1096 TiAnalyticsSvc W (Thread-10) [110,143] Analytics Service Started
1096 TiAPI I (kroll$1) [455,598] Adding: /card/0.png
67 ActivityManager I Displayed activity com.testing.testing2/.Testing2Activity: 3674 ms (total 3674 ms)
1096 AndroidRuntime D Shutting down VM
1096 dalvikvm W threadid=1: thread exiting with uncaught exception (group=0x4001d800)
1096 TiUncaughtHandler E (main) [485,1083] Sending event: exception on thread: main msg:java.lang.NullPointerException; Titanium 1.5.0,201
0/11/27 09:34,3c76dd
1096 TiUncaughtHandler E java.lang.NullPointerException
1096 TiUncaughtHandler E at ti.modules.titanium.ui.widget.TiScrollableView.addView(TiScrollableView.java:379)
489 AndroidRuntime D >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<
489 AndroidRuntime D CheckJNI is ON
489 AndroidRuntime D --- registering native functions ---
61 ActivityManager I Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x
10000000 cmp=com.testing.weatherapp/.WeatherappActivity }
489 AndroidRuntime D Shutting down VM
489 dalvikvm D Debugger has detached; object registry had 1 entries
61 ActivityManager I Start proc com.testing.weatherapp for activity com.testing.weatherapp/.WeatherappActivity: pid=496 uid=1
0036 gids={1015, 3003}
489 AndroidRuntime I NOTE: attach of thread 'Binder Thread #3' failed