Titanium Mobile/¥×¥í¥¸¥§¥¯¥È¿·µ¬ºîÀ® ¤ÎÊѹ¹ÅÀ
Top / Titanium Mobile / ¥×¥í¥¸¥§¥¯¥È¿·µ¬ºîÀ®
- Äɲ䵤줿¹Ô¤Ï¤³¤Î¿§¤Ç¤¹¡£
- ºï½ü¤µ¤ì¤¿¹Ô¤Ï¤³¤Î¿§¤Ç¤¹¡£
- Titanium Mobile/¥×¥í¥¸¥§¥¯¥È¿·µ¬ºîÀ® ¤Ø¹Ô¤¯¡£
- Titanium Mobile/¥×¥í¥¸¥§¥¯¥È¿·µ¬ºîÀ® ¤Îº¹Ê¬¤òºï½ü
Titanium Mobile¤Î¥×¥í¥¸¥§¥¯¥È¤Ï[File] - [New] - [Mobile Project]¤«¤é¹Ô¤¤¤Þ¤¹¤¬¡¢¿÷·Á¤Î¼ïÎब¿¤¤¤Î¤Ç¥á¥â¤Ç¤¹¡£ *tiapp.xml¥ª¥¹¥¹¥áÀßÄê **ñ°Ì¤òsystem¤«¤édp¤ËÊѹ¹ <property name="ti.ui.defaultunit" type="string">dp</property> Íýͳ¡§¤³¤Á¤é¤ÎÊý¤¬Android¤Ë¤âÂбþ¤µ¤»¤ë¤È¤¤Ë¥Ü¥¿¥ó¤ÎÂ礤µ¤Ê¤É¤¬iPhone¤È¶á¤¯¤Ê¤ê¤Þ¤¹¡£2014ǯ¼Åµ¤Ç¤Ï¥Ç¥Õ¥©¥ë¥È¤Çdp¤È¤Ê¤Ã¤Æ¤¤¤ë¤è¤¦¤Ç¤¹¡£ Íýͳ¡§¤³¤Á¤é¤ÎÊý¤¬Android¤Ë¤âÂбþ¤µ¤»¤ë¤È¤¤Ë¥Ü¥¿¥ó¤ÎÂ礤µ¤Ê¤É¤¬iPhone¤È¶á¤¯¤Ê¤ê¤Þ¤¹¡£2014ǯ»þÅÀ¤Ç¤Ï¥Ç¥Õ¥©¥ë¥È¤Çdp¤È¤Ê¤Ã¤Æ¤¤¤ë¤è¤¦¤Ç¤¹¡£ **³«È¯¥Ó¥ë¥É¤Î»þ¤âAndroid¤Çminify¤¬¤«¤«¤ë¤è¤¦¤ËÀßÄê ¼¡¤Î¹Ô¤òÄɲä·¤Þ¤¹¡£ <property name="ti.android.compilejs" type="bool">true</property> Íýͳ¡§JSON¥Ç¡¼¥¿¤ËÊѤÊminify¤¬¤«¤«¤ê¡¢ÉÔ¶ñ¹ç¤Î¸¶°ø¤È¤Ê¤ë¾ì¹ç¤¬¤¢¤ë¤½¤¦¤Ç¤¹¡£ »²¹Í¥Ú¡¼¥¸¡§[[Titanium¤ÇAndroid¥¢¥×¥ê¤ò¥ê¥ê¡¼¥¹¥Ó¥ë¥É¤·¤¿¤È¤¤À¤±¾å¼ê¤¯Æ°¤«¤Ê¤¯¤Æµã¤¤¤¿Ïà | ¥ê¥¢½¼ÇúȯÆüµ>http://d.hatena.ne.jp/ria10/20131115/1384518551]] *Classic **Default Project ¿÷·Á¤¬¶õ¤Î¥×¥í¥¸¥§¥¯¥È¡£´°Á´¤Ë¶õ¤Ç¤Ê¤¯¡¢app.jsÆâ¤ÇTabGroup¤äWindow¤òºî¤ë¥µ¥ó¥×¥ë¤¬Æþ¤Ã¤Æ¤¤¤Þ¤¹¡£ |js¥Õ¥¡¥¤¥ë̾|ÆâÍÆ|h |app.js|TabGroup¤òÀ¸À®¤·¤Æ¡¢¥é¥Ù¥ëÆþ¤ê¤ÎWindow£²¤Ä¤òÄɲä·¤Æopen| **Single Window Application ¥·¥ó¥×¥ë¤Ê¥¦¥£¥ó¥É¥¦¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¡£¥Ê¥Ó¥²¡¼¥·¥ç¥ó¥Ð¡¼¤ÏÉÕ¤¤¤Æ¤ª¤é¤º¡¢£±²èÌ̤Ǥ¤¤¤¤Î¤Ç²èÌ̤ò¹¤¯»È¤¤¤¿¤¤¾ì¹ç¤Ë¥ª¥¹¥¹¥á |js¥Õ¥¡¥¤¥ë̾|ÆâÍÆ|h |app.js|¥¿¥Ö¥ì¥Ã¥È¡¦iPhone¡¦Android¤ÎȽÄê¤ò¤·¤Æ¡¢¤½¤ì¤¾¤ì¤ÎWindow¤ò³«¤¯| |ui/handheld/ApplicationWindow.js|iPhoneÍѤÎWindow¡£¥·¥ó¥×¥ë¤ËFirstView¤òadd¤¹¤ë¡£var firstView = new FirstView(); self.add(firstView);| |ui/handheld/android/ApplicationWindow.js|AndroidÍÑ| |ui/tablet/ApplicationWindow.js|¥¿¥Ö¥ì¥Ã¥ÈÍÑ| |ui/common/FirstView.js|¥¿¥Ö¥ì¥Ã¥È¡¦iPhone¡¦Android¶¦Ä̤ÎView¡£¥µ¥ó¥×¥ë¤È¤·¤Æ¥¯¥ê¥Ã¥¯²Äǽ¤Ê¥é¥Ù¥ë¤òÇÛÃÖ| **Master/Detail Application ¥Æ¡¼¥Ö¥ë¤òɽ¼¨¤·¡¢ÁªÂò¤¹¤ë¤ÈÊÌ¥¦¥£¥ó¥É¥¦¤ò³«¤¯¥µ¥ó¥×¥ë¤Ç¤¹¡£iOS¤Ç¤Ï¥Ê¥Ó¥²¡¼¥·¥ç¥ó¥Ð¡¼¤âɽ¼¨¤µ¤ì¡¢ÊÌ¥¦¥£¥ó¥É¥¦¤Îº¸¾å¤òÁªÂò¤¹¤ë¤È¸µ¤Î¥Æ¡¼¥Ö¥ë¤ËÌá¤ê¤Þ¤¹¡£~ ¥Ê¥Ó¥²¡¼¥·¥ç¥ó¥Ð¡¼¤òÍøÍѤ¹¤ëÊýË¡¤Ï¤³¤Î¿÷·Á¤Î¤è¤¦¤ËNavigationGroup¤ò»ÈÍѤ¹¤ëÊýË¡¤È¡¢¼¡¤Î¹àÌܤÇÀâÌÀ¤¹¤ëTabGroup¤ò»ÈÍѤ¹¤ëÊýË¡¤¬¤¢¤ê¤Þ¤¹¡£NavigationGroup¤ÏAndroid¤Ë¸ºß¤»¤º¡¢¤³¤ì¤ò»ÈÍѤ¹¤ë¤ÈWindow¤ÎÀ¸À®¤äÀÚ¤êÂؤ¨¤òAndroid¤ÈiOS¤Ç¥³¡¼¥É¤ò½ñ¤´¹¤¨¤Ê¤¤¤È¤¤¤±¤Þ¤»¤ó¡£ TabGroup¤Ç¤¹¤ÈiOS¤ÈAndroid¤Ç¶¦Ä̤˵½Ò¤Ç¤¤ë¤Î¤Ç¡¢¥¿¥Ö¤ò»È¤ï¤Ê¤¤¾ì¹ç¤Ç¤â¡ÖTabbed Application¡×¤ò¿÷·Á¤È¤·¤Æ¥¿¥Ö¤òÈóɽ¼¨¤Ç»ÈÍѤ¹¤ë¤Û¤¦¤¬¥ª¥¹¥¹¥á¤Ç¤¹¡£ |js¥Õ¥¡¥¤¥ë̾|ÆâÍÆ|h |app.js|¥¿¥Ö¥ì¥Ã¥È¡¦iPhone¡¦Android¤ÎȽÄê¤ò¤·¤Æ¡¢¤½¤ì¤¾¤ì¤ÎWindow¤ò³«¤¯| |ui/handheld/ios/ApplicationWindow.js|NavigationGroup¤òadd¤·¤¿iPhoneÍѤÎWindow¡£³¬Áؤξ夫¤é½ç¤Ë¼¡¤Î¤è¤¦¤ËÀßÄê¡£Window->NavigationGroup->MasiterContainerWindow->MasterView¡£¥Þ¥¹¥¿¡¼¤Î¹Ô¤¬ÁªÂò¤µ¤ì¤ë¤ÈnavGroup.open(detailContainerWindow);¤È¤·¤ÆNavigationGroup¤«¤é²¼¤ÎÉôʬ¤òÀÚ¤êÂؤ¨¤ë¡£Ãí°Õ»ö¹à¡§NavigationGroup¤ÏTi.UI.iPhone.createNavigationGroup¤ÇÀ¸À®¤·¡¢iPhone°Í¸¤Î¥³¡¼¥É¤È¤Ê¤ê¤Þ¤¹¡£| |ui/handheld/android/ApplicationWindow.js|MasterView¤òadd¤·¤¿AndroidÍѤÎWindow¡£³¬Áؤξ夫¤é½ç¤Ë¼¡¤Î¤è¤¦¤ËÀßÄê¡£Window->MasterView¡£¥Þ¥¹¥¿¡¼¤Î¹Ô¤¬ÁªÂò¤µ¤ì¤ë¤È¿·¤¿¤ËÀ¸À®¤·¤¿DetailContainerWindow->DetailView¤òopen¤·¤ÆWindow¤´¤ÈÀÚ¤êÂؤ¨¡£| |ui/handheld/mobileweb/ApplicationWindow.js|MobileWebÍÑ| |ui/tablet/ApplicationWindow.js|¥¿¥Ö¥ì¥Ã¥ÈÍÑ| |ui/common/MasterView.js|TableView¤òÀ¸À®¤·¡¢¹Ô¤òclick¤¹¤ë¤È¼«¿È¤ÎView¤Î¥«¥¹¥¿¥à¥¤¥Ù¥ó¥È¤òȯÀ¸¤µ¤»¤ë¡£| |ui/common/DetailView.js|¼«¿È¤ÎView¤ËÂФ¹¤ë¥«¥¹¥¿¥à¥¤¥Ù¥ó¥È¤ò´Æ»ë¤·¡¢È¯À¸¤·¤¿¤é¥é¥Ù¥ëÆâÍƤò¹¹¿·¡£| **Tabbed Application ¥¿¥ÖÉÕ¤¤Î¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¿÷·Á¡£¥¿¥Ö¤½¤ì¤¾¤ì¤ÇÆÈΩ¤·¤Æ¡¢¥Ê¥Ó¥²¡¼¥·¥ç¥ó¥Ð¡¼¤Ë¤è¤ë²èÌÌÁ«°Ü¤¬¹Ô¤¨¤Þ¤¹¡£~ ~ ¥Ê¥Ó¥²¡¼¥·¥ç¥ó¥Ð¡¼¤Ë¤è¤ë²èÌÌÁ«°Ü¤À¤±¤òÍøÍѤ¹¤ë¤¿¤á¡¢¥¿¥Ö¤òÈóɽ¼¨¤È¤¹¤ëÊýË¡ +ApplicationTabGroup.js¤Çwin2, tab2´ØÏ¢¤Î¥³¡¼¥É¤òºï½ü +win1À¸À®Ä¾¸å¤Ë¥¿¥Ö¤ò¾Ã¤¹¥³¡¼¥É¤òÄɲá£win1.hideTabBar(); +¥¿¥Ö¤Î¥¿¥¤¥È¥ë¤ª¤è¤Ó¥¢¥¤¥³¥ó²èÁüÀßÄê¤ò¥³¥á¥ó¥È¥¢¥¦¥È¡£// title: L('home'), // icon: '/images/KS_nav_ui.png', +¥¿¥Ö²èÁü¥Õ¥¡¥¤¥ë¤ò¥×¥í¥¸¥§¥¯¥È¤«¤éºï½ü |js¥Õ¥¡¥¤¥ë̾|ÆâÍÆ|h |app.js|ApplicationTabGroup¤òÀ¸À®¤·¤Æ³«¤¤Þ¤¹¡£¥¿¥Ö¥ì¥Ã¥È¡¦¥¿¥Ö¥ì¥Ã¥È°Ê³°¡ÊiPhone¡¦Android¡Ë¤ÎȽÄê¤ò¤·¤Æ¡¢ApplicationTabGroupÀ¸À®»þ¤ËŬÀÚ¤ÊWindow¤òÅϤ·¤Æ¤¤¤Þ¤¹¡£| |ui/handheld/ApplicationWindow.js|iPhone¤ª¤è¤ÓAndroidÍѤÎWindow¡£¥Ü¥¿¥ó¤ÇÊÌWindow¤ò³«¤¤Þ¤¹¡£ÊÌ¥¦¥£¥ó¥É¥¦¤«¤é¤Ï¥Ê¥Ó¥²¡¼¥·¥ç¥ó¥Ð¡¼¤ÎÌá¤ë¥Ü¥¿¥ó¤ÇÌá¤ê¤Þ¤¹¡£self.containingTab.open(Ti.UI.createWindow(...));| |ui/tablet/ApplicationWindow.js|¥¿¥Ö¥ì¥Ã¥ÈÍÑ| |ui/common/ApplicationTabGroup.js|Í¿¤¨¤é¤ì¤¿Window¥¯¥é¥¹¤ò¸µ¤ËWindow2¤Ä¤òÀ¸À®¤·¡¢Tab¤ËÆþ¤ì¤Æ¡¢Tab¤òTabGroup¤Ëadd¤·¤Æ¤¤¤Þ¤¹¡£| **HTML-based html¤Ç¥¢¥×¥ê¤òºî¤ëºÝ¤Î¿÷·Á¤Ç¤¹¡£HTML¥Õ¥©¥ë¥À¤Ëhtml¥Õ¥¡¥¤¥ë¤Ê¤É¤òÆþ¤ì¤Æ¤ª¤¯¤È¡¢¥¢¥×¥êµ¯Æ°¸å¤Ë¤½¤ì¤é¤òWebView¤ËÆɤ߹þ¤ó¤Çɽ¼¨¤·¤Þ¤¹¡£ |js¥Õ¥¡¥¤¥ë̾|ÆâÍÆ|h |app.js|new ApplicationWindow().open()| |ui/ApplicationWindow.js|WebView¤òÀ¸À®¡£¼¡¤Î¤É¤ì¤«¤ÎApplicationWindowPlatform(window, webView, titleBarOn, drawerOn)¤ò¸Æ¤Ó½Ð¤¹¡£| |ui/iphone/ui/ApplicationWindowPlatform.js|iOS¸ÇͤΥ¢¥×¥ê½èÍý¡£html¥í¡¼¥É¸å¤Ë¥Ê¥Ó¥²¡¼¥·¥ç¥ó¥Ð¡¼¥¿¥¤¥È¥ëÀßÄê¡¢Ìá¤ë½èÍý¤Ê¤É| |ui/android/ui/ApplicationWindowPlatform.js|Android¸ÇͤΥ¢¥×¥ê½èÍý| |ui/mobileweb/ui/ApplicationWindowPlatform.js|mobileweb¸ÇͤΥ¢¥×¥ê½èÍý| |ui/Drawer.js|iOSÍѤβ¼¤«¤é°ú¤½Ð¤»¤ëÉôʬ¤Î¥×¥í¥°¥é¥à| *¥ê¥ó¥¯ -[[thapps>http://coe.webcrow.jp/]] ... ¥¿¡¼¥²¥Ã¥È¤òweb¤È¤·¤¿»þ¤Î¥Ç¥â