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 = Titanium.UI.createWindow({ | |
backgroundColor: 'blue' | |
}); | |
var btn = Ti.UI.createButton({ | |
title : 'Add Notification' | |
}); | |
btn.addEventListener('click', function(e) { | |
var activity = Ti.Android.currentActivity(); |
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({ backgroundColor: '#fff' }); | |
win.add(Ti.UI.createLabel({ text: 'Look for the notification! It should be there now.' })); | |
win.open(); | |
Titanium.Android.NotificationManager.notify( | |
0, // <-- this is an ID that we can use to clear the notification later | |
Ti.Android.createNotification({ | |
contentTitle: 'Cheese, Gromit!', | |
contentText: 'Swiss', | |
tickerText: 'Our app made a notification!', |
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({ |
NewerOlder