http://www.flickr.com/photos/vaucher/5763894833/11   11   28
11   11   28
11   11   28
http://www.flickr.com/photos/     panman_/4507107513/11   11   28
// comment     var sampleCode = ‘Hello’;     alert(sampleCode);11   11   28
JavaScript          Objective-C Java        TitaniumMobile   API                       ※           JavaScript      Objecti...
Objective-C   Titanium.UI.View   Java   Titanium.UI.View11   11   28
✤     ✤11   11   28
✤           ✤11   11   28
http://www.flickr.com/photos/alanant/4483533096/11   11   28
✤           ✤           ✤           ✤11   11   28
✤     ✤           ✤           ✤           ✤11   11   28
✤           ✤           ✤               ✤11   11   28
11   11   28
11   11   28
✤           ✤11   11   28
// this sets the background color of the master      UIView (when there are no windows/tab groups on it)      Titanium.UI....
11   11   28
// create controls tab and root window      //      var win2 = Titanium.UI.createWindow({          title:Tab 2,          b...
// this sets the background color of the master      UIView (when there are no windows/tab groups on it)      Titanium.UI....
// this sets the background color of the master      UIView (when there are no windows/tab groups on it)      Titanium.UI....
✤           ✤     ✤           ✤           ✤11   11   28
var win1 = Titanium.UI.createWindow({          title:Tab 1,          backgroundColor:#fff      });      var tab1 = Titaniu...
Titanium.UI.setBackgroundColor(#FFF);               urlBox.addEventListener(blur,function(e){      var tabGroup = Titanium...
//        HTML                 WebView               //      var webView = Titanium.UI.createWebView({            Activity...
✤     ✤           ✤           ✤11   11   28
✤           ✤               ✤               ✤               ✤                   ✤11   11   28
Upcoming SlideShare
Loading in …5
×

20111130 titanium mobile

4,575 views
4,571 views

Published on

はじめようTitanium+JavaScriptでスマホアプリ開発カフェVol.1の発表資料

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
4,575
On SlideShare
0
From Embeds
0
Number of Embeds
1,762
Actions
Shares
0
Downloads
26
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

20111130 titanium mobile

  1. 1. http://www.flickr.com/photos/vaucher/5763894833/11 11 28
  2. 2. 11 11 28
  3. 3. 11 11 28
  4. 4. http://www.flickr.com/photos/ panman_/4507107513/11 11 28
  5. 5. // comment var sampleCode = ‘Hello’; alert(sampleCode);11 11 28
  6. 6. JavaScript Objective-C Java TitaniumMobile API ※ JavaScript Objective-C Java Titanium iOS Android OS Mobile Native iOS app Native Android app11 11 28
  7. 7. Objective-C Titanium.UI.View Java Titanium.UI.View11 11 28
  8. 8. ✤ ✤11 11 28
  9. 9. ✤ ✤11 11 28
  10. 10. http://www.flickr.com/photos/alanant/4483533096/11 11 28
  11. 11. ✤ ✤ ✤ ✤11 11 28
  12. 12. ✤ ✤ ✤ ✤ ✤11 11 28
  13. 13. ✤ ✤ ✤ ✤11 11 28
  14. 14. 11 11 28
  15. 15. 11 11 28
  16. 16. ✤ ✤11 11 28
  17. 17. // this sets the background color of the master UIView (when there are no windows/tab groups on it) Titanium.UI.setBackgroundColor(#000); // create tab group var tabGroup = Titanium.UI.createTabGroup(); // // create base UI tab and root window // var win1 = Titanium.UI.createWindow({ title:Tab 1, backgroundColor:#fff }); var tab1 = Titanium.UI.createTab({ icon:KS_nav_views.png, title:Tab 1, window:win1 }); var label1 = Titanium.UI.createLabel({ ! color:#999, ! text:I am Window 1, ! font:{fontSize:20,fontFamily:Helvetica Neue}, ! textAlign:center, ! width:auto }); win1.add(label1);11 11 28
  18. 18. 11 11 28
  19. 19. // create controls tab and root window // var win2 = Titanium.UI.createWindow({ title:Tab 2, backgroundColor:#fff }); var tab2 = Titanium.UI.createTab({ icon:KS_nav_ui.png, title:Tab 2, window:win2 }); var label2 = Titanium.UI.createLabel({ ! color:#999, ! text:I am Window 2, ! font:{fontSize:20,fontFamily:Helvetica Neue}, ! textAlign:center, ! width:auto }); win2.add(label2); // // add tabs // tabGroup.addTab(tab1); tabGroup.addTab(tab2); // open tab group tabGroup.open();11 11 28
  20. 20. // this sets the background color of the master UIView (when there are no windows/tab groups on it) Titanium.UI.setBackgroundColor(#000); // create tab group var tabGroup = Titanium.UI.createTabGroup(); // // create base UI tab and root window // var win1 = Titanium.UI.createWindow({ title:Tab 1, backgroundColor:#fff }); var tab1 = Titanium.UI.createTab({ icon:KS_nav_views.png, title:Tab 1, window:win1 }); var label1 = Titanium.UI.createLabel({ ! color:#999, ! text:I am Window 1, ! font:{fontSize:20,fontFamily:Helvetica Neue}, ! textAlign:center, ! width:auto }); win1.add(label1);11 11 28
  21. 21. // this sets the background color of the master UIView (when there are no windows/tab groups on it) Titanium.UI.setBackgroundColor(#000); // create tab group var tabGroup = Titanium.UI.createTabGroup(); // // create base UI tab and root window // var win1 = Titanium.UI.createWindow({ title:Tab 1, backgroundColor:#fff }); var tab1 = Titanium.UI.createTab({ icon:KS_nav_views.png, title:Tab 1, window:win1 }); var webView = Titanium.UI.createWebView({ ! url:http://www.google.co.jp }); win1.add(webView);11 11 28
  22. 22. ✤ ✤ ✤ ✤ ✤11 11 28
  23. 23. var win1 = Titanium.UI.createWindow({ title:Tab 1, backgroundColor:#fff }); var tab1 = Titanium.UI.createTab({ icon:KS_nav_views.png, title:Tab 1, window:win1 }); var webView = Titanium.UI.createWebView({ }); webView.html = <html> + <head> + <title> HTML </title> + </head> + <body> + <h1> HTML </h1> + <p> </p> + </body> + </html>; win1.add(webView);11 11 28
  24. 24. Titanium.UI.setBackgroundColor(#FFF); urlBox.addEventListener(blur,function(e){ var tabGroup = Titanium.UI.createTabGroup(); actInd.show(); var win1 = Titanium.UI.createWindow({ webView.url = e.value; title: , webView.reload(); backgroundColor:#fff }); }); win1.add(urlBox); var tab1 = Titanium.UI.createTab({ icon:KS_nav_views.png, // title:Tab 1, var stopBtn = Ti.UI.createButton({ window:win1 title:stop, }); top:10, // URL left:220, var urlBox = Titanium.UI.createTextField({ width:60, color:#336699, height:30, top:10, systemButton:Titanium.UI.iPhone.SystemButton.STOP left:10, }); width:200, stopBtn.addEventListener(click,function(e){ height:30, webView.stopLoading(); hintText:enter url, actInd.hide(); keyboardType:Titanium.UI.KEYBOARD_URL, }); returnKeyType:Titanium.UI.RETURNKEY_DEFAULT, win1.add(stopBtn); autocapitalization: false, borderStyle:Titanium.UI.INPUT_BORDERSTYLE_ROUNDED });11 11 28
  25. 25. // HTML WebView // var webView = Titanium.UI.createWebView({ ActivityIndicator top:50, var actInd = Titanium.UI.createActivityIndicator({ left:0, top:50, width:auto, height:55, height:auto width:auto, }); opacity:0.5, webView.addEventListener(beforeload,function(e){ color:#FFFFFF, actInd.show(); backgroundColor:#000, }); borderRadius:5, webView.addEventListener(load,function(e){ borderColor:#000, actInd.hide(); font:{fontFamily:Helvetica Neue, fontSize:13}, }); message: Loading..., win1.add(webView); style:Titanium.UI.iPhone.ActivityIndicatorStyle.PLA IN }); win1.add(actInd); tabGroup.addTab(tab1); tabGroup.open();11 11 28
  26. 26. ✤ ✤ ✤ ✤11 11 28
  27. 27. ✤ ✤ ✤ ✤ ✤ ✤11 11 28

×