文件名称:Palm WebOS 开发.rar
文件大小:4.57MB
文件格式:RAR
更新时间:2022-07-28 23:33:10
书籍教程-其它书籍
基于palm WebOS应用程序开发的书,详细介绍了WebOS的Widget以及高级widget,服务,数据,Style以及高级Style,云服务各个方面。适用于WebOS应用程序开发的参考书和学习教材。英文书籍。 Table of Contents Foreword . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvii 1. Overview of webOS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Application Model 2 Application Framework and OS 3 User Interface 3 Navigation 4 Launcher 4 Card View 5 Notifications and the Dashboard 7 User Interface Principles 10 Mojo Application Framework 12 Anatomy of a webOS Application 13 UI Widgets 16 Services 18 Palm webOS Architecture 19 Application Environment 20 Core OS 21 Software Developer Kit 21 Development Tools 22 Mojo Framework and Sample Code 22 webOSdev 22 Summary 23 2. Application Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 Getting Started 26 Creating Your Application 26 Testing and Debugging 30 News 30 News Wireframes 31 vii Download at Boykma.Com Creating the News Application 33 Customizing the Launcher Icon and Application ID 34 Adding the First Scene 35 Base Styles 40 Application Launch Lifecycle 43 Adding a Second Scene 44 Controllers 51 Controllers and Assistants 51 Scene Stack 52 Summary 53 3. Widgets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 All About Widgets 55 Declaring Widgets 56 Setting Up a Widget 56 Updating a Widget’s Data Model 57 Widget Event Handling 58 Using Widgets 58 Buttons and Selectors 59 Buttons 59 Selectors 61 Lists 64 List Widgets 65 More About Lists 84 Text Fields 86 Adding Text Fields to News 87 Password Field 91 Filter Field 91 Rich Text Edit 92 Events 92 Framework Event Types 92 Listening 93 stopListening 94 Using Events with Widgets 95 Summary 95 4. Dialogs and Menus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97 Dialogs 97 Error Dialog 98 Alert Dialog 99 Custom Dialogs 100 Menus 106 Menu Widgets 107 viii | Table of Contents Download at Boykma.Com Submenus 123 Commander Chain 126 Summary 129 5. Advanced Widgets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131 Indicators 131 Spinners 132 Progress Indicators 136 Scrollers 138 Back to the News: Adding a featured feed Scroller 139 Pickers 144 Simple Pickers 145 File Picker 147 Advanced Lists 148 Formatters 149 Dividers 150 Filter Lists 150 Viewers 156 WebView 156 Other Viewers 159 Summary 161 6. Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163 Working with Cookies 164 Back to the News: Adding a Cookie 164 Working with the Depot 166 Back to the News: Adding a Depot 167 HTML 5 Storage 170 Ajax 172 Ajax Request 173 Ajax Response 174 More Ajax 175 Summary 176 7. Advanced Styles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177 Typography 178 Fonts 178 Truncation 180 Capitalization 181 Vertical Alignment 181 Images 183 Standard Image 183 Multistate Image 184 Table of Contents | ix Download at Boykma.Com 9-Tile Image 184 Touch 187 Maximize Your Touch Targets 187 Optimizing Touch Feedback 188 Passing Touches to the Target 189 Light and Dark Styles 189 Summary 191 8. Application Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193 Using Services 193 Service Overview 194 Application Manager 196 Cross-App Launch 197 Core Application Services 198 Web 198 Phone 199 Camera 200 Photos 200 Maps 201 Palm Synergy Services 201 Account Manager 201 Contacts and Calendar 203 People Picker 204 Email and Messaging 205 Viewers and Players 209 View File 209 Audio 209 Video 210 Other Applications 210 Summary 211 9. System and Cloud Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213 System Services 214 Accelerometer 215 Alarms 218 Connection Manager 220 Location Services 221 Power Management 223 System Properties 224 System Services 225 System Sounds 225 Cloud Services 226 Summary 227 x | Table of Contents Download at Boykma.Com 10. Background Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229 Stages 229 Creating New Stages 230 Using Existing Stages 231 Working with Stages 231 Notifications 232 Banner Notifications 233 Minimized Applications 235 Pop-up Notifications 235 Dashboards 240 Back to the News: Adding a Dashboard Stage 241 Handling Minimize, Maximize, and Tap Events 245 Advanced Applications 247 Back to the News: App Assistant 247 Handling Launch Requests 251 Sending and Considering Notifications 253 Back to the News: Creating Secondary Cards 254 Background Applications 256 Summary 260 11. Localization and Internationalization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261 Locales 261 Character Sets and Fonts 263 Keyboards 263 Localization 264 Localized Application Structure 265 appinfo.json 266 JavaScript Text Strings 266 Localizable HTML 270 Internationalization 273 Back to the News: Multilingual Formatting 273 Summary 274 A. Palm webOS Developer Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275 B. Quick Reference—Developer Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279 C. Quick Reference—Style Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 341 D. News Application Source Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 359 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 417
【文件预览】:
PalmWebOS
----下载说明.txt(377B)
----Palm+webOS.pdf(6.79MB)