The Code-Bin
Links
Home
Add your code!
All Listings
About
Latest Entry
Featured Scripts
Author's Website
Latest Entries
FFMPEG Thumbnail Scr...
PHP, 0.8KB
Jul. 29, 10:24pm
John
Z80 Assembler, 190 bytes
Feb. 17, 3:36am
John
Z80 Assembler, 176 bytes
Sep. 13, 2:19am
John
Z80 Assembler, 77 bytes
Sep. 13, 2:18am
John
Z80 Assembler, 209 bytes
Sep. 13, 2:17am
untitled Javascript Code
Posted by: Appcelerator | January 24, 2011 @ 10:32am
Javascript Code
[
Download
]
OptionDialog = {}; OptionDialog.view = Ti.UI.createView(); OptionDialog.init = function() { var b1 = Ti.UI.createButton({ title:'Options Dialog 1', height:50, width:300, top:100 }); OptionDialog.view.add(b1); var dialog1 = Titanium.UI.createOptionDialog({ options:['Option 1', 'Option 2'], title:'Select an Option' }); // build first popover b1.addEventListener('click', function() { dialog1.show({view:b1,animated:true}); }); var b2 = Ti.UI.createButton({ title:'Options Dialog 2', height:50, width:300, top:170 }); OptionDialog.view.add(b2); // NOTE: on iPad cancel button is not displayed since clicking outside of the dialog // cancels the action (you can still track the button click though in the event listener) var dialog2 = Titanium.UI.createOptionDialog({ options:['Option 1', 'Option 2', 'Option 3'], destructive:1, cancel:2, }); // build first popover b2.addEventListener('click', function() { dialog2.show({view:b2,animated:true}); }); };
Syntax Highlighting
[
Open in new window
]
Author Comments
none
Rating
4.44 / 8
57 Votes
http://codebin.yi.org/1078
page generated in 0.00 seconds