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 activityClassName = Ti.App.id + '.' + Ti.App.name.substring(0, 1).toUpperCase() + Ti.App.name.substring(1) + 'Activity'; | |
var intent = Titanium.Android.createIntent({ | |
//className: 'org.appcelerator.titanium.TiActivity', | |
//packageName: Ti.App.id, | |
className: activityClassName, | |
action: Titanium.Android.ACTION_MAIN, | |
flags: 0x10200000 | |
}); | |
intent.addCategory(Titanium.Android.CATEGORY_LAUNCHER); |
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 container = Ti.UI.createView({backgroundColor: "white", layout: "vertical"}); | |
var layout = [ | |
{ | |
title: "Parent 1", | |
isparent: true, | |
opened: false, | |
sub: [ | |
{ |
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
// This is the Android version of the Tweetie-like pull to refresh table: | |
// http://developer.appcelerator.com/blog/2010/05/how-to-create-a-tweetie-like-pull-to-refresh-table.html | |
var win = Ti.UI.currentWindow; | |
var alertDialog = Titanium.UI.createAlertDialog({ | |
title: 'System Message', | |
buttonNames: ['OK'] | |
}); | |
var scrollView = Ti.UI.createScrollView({ |
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 activity = Ti.Android.currentActivity; | |
var win = Ti.UI.currentWindow; | |
activity.addEventListener("create", function(e) { | |
var button = Ti.UI.createButton({title: "Hello world"}); | |
button.addEventListener("click", function(e) { | |
activity.finish(); | |
}); | |
win.add(button); | |
}); |
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
// | |
// in this demo, we simply show how you could dynamically scroll | |
// with a continuous amount of data in the tableview by detecting | |
// when the user's scroll position gets near the end of the table | |
// and start a background fetch of new data and seamlessly append | |
// the new data to the table automatically | |
// | |
var win = Ti.UI.createWindow(); |