Home Page Icon
Home Page
Table of Contents for
Cover
Close
Cover
by Mitch Allen
Palm webOS
Palm® webOS™
Dedication
A Note Regarding Supplemental Files
Foreword
Preface
Mobile Web Challenges
Palm webOS
The Mobile Web Is the Web
About This Book
Conventions Used in This Book
Using Code Examples
How to Contact Us
Safari® Books Online
Acknowledgments
1. Overview of webOS
Application Model
Application Framework and OS
User Interface
Navigation
Launcher
Card View
Notifications and the Dashboard
User Interface Principles
Mojo Application Framework
Anatomy of a webOS Application
Stages and scenes
Application lifecycle
Events
Storage
UI Widgets
Using widgets
Services
Palm webOS Architecture
Application Environment
Core OS
Software Developer Kit
Development Tools
Mojo Framework and Sample Code
webOSdev
Summary
2. Application Basics
Getting Started
Creating Your Application
Testing and Debugging
News
News Wireframes
Creating the News Application
Customizing the Launcher Icon and Application ID
Adding the First Scene
The scene view
The scene assistant
Pushing the scene
Styling the scene
Base Styles
Elements
Scene styles
Widget styles
Application Launch Lifecycle
Adding a Second Scene
Controllers
Controllers and Assistants
Scene Stack
Summary
3. Widgets
All About Widgets
Declaring Widgets
Setting Up a Widget
Updating a Widget’s Data Model
Widget Event Handling
Using Widgets
Buttons and Selectors
Buttons
Adding a button to News
Selectors
Check Box
Toggle Button
Radio Button
List Selector
Slider
Lists
List Widgets
Back to the News: Adding a Story List
Back to the News: Ajax requests
Back to the News: Adding a feed list
More About Lists
Dynamic lists
Formatters and dividers
Text Fields
Adding Text Fields to News
Password Field
Filter Field
Rich Text Edit
Events
Framework Event Types
Listening
stopListening
Using Events with Widgets
Summary
4. Dialogs and Menus
Dialogs
Error Dialog
Alert Dialog
Custom Dialogs
Back to the News: Adding an Add Feed dialog
Menus
Menu Widgets
Application menu
Back to the News: Adding an Application menu
Back to the News: Adding preferences to News
View menu
Back to the News: Adding View menus
Command menu
Back to the News: Adding Command menus
Submenus
Back to the News: Adding a submenu
Commander Chain
Summary
5. Advanced Widgets
Indicators
Spinners
Back to the News: Adding a spinner for feed updates
Progress Indicators
Progress Pill
Progress Bar
Progress Slider
Scrollers
Back to the News: Adding a featured feed Scroller
Pickers
Simple Pickers
Date pickers
Time pickers
Integer pickers
Back to the News: Adding an integer picker
File Picker
Advanced Lists
Formatters
Dividers
Filter Lists
Back to the News: Adding a search field
Viewers
WebView
Back to the News: Adding a web view
Other Viewers
Image view
Audio and video objects
Summary
6. Data
Working with Cookies
Back to the News: Adding a Cookie
Working with the Depot
Back to the News: Adding a Depot
HTML 5 Storage
Ajax
Ajax Request
Ajax Response
More Ajax
Ajax responders
Ajax.Updater and Ajax.PeriodicalUpdater
Summary
7. Advanced Styles
Typography
Fonts
Truncation
Capitalization
Vertical Alignment
Images
Standard Image
Multistate Image
9-Tile Image
3-tile image
Unsupported CSS properties
Touch
Maximize Your Touch Targets
Optimizing Touch Feedback
Passing Touches to the Target
Light and Dark Styles
Summary
8. Application Services
Using Services
Service Overview
Application Manager
Open
Launch
Cross-App Launch
Core Application Services
Web
Back to the News: Launching the browser
Phone
Camera
Photos
Maps
Palm Synergy Services
Account Manager
Contacts and Calendar
People Picker
Email and Messaging
Back to the News: Sharing stories through email or messaging
Viewers and Players
View File
Audio
Video
Other Applications
Summary
9. System and Cloud Services
System Services
Accelerometer
Orientation changes
Shake
Raw acceleration
Alarms
Connection Manager
Location Services
Get current position
Tracking
Reverse location
Power Management
System Properties
System Services
System Sounds
Cloud Services
Summary
10. Background Applications
Stages
Creating New Stages
Using Existing Stages
Working with Stages
Notifications
Banner Notifications
Back to the News: Banner notifications
Minimized Applications
Pop-up Notifications
Dashboards
Back to the News: Adding a Dashboard Stage
Handling Minimize, Maximize, and Tap Events
Advanced Applications
Back to the News: App Assistant
Handling Launch Requests
Sending and Considering Notifications
Back to the News: Creating Secondary Cards
Background Applications
Summary
11. Localization and Internationalization
Locales
Character Sets and Fonts
Keyboards
Localization
Localized Application Structure
appinfo.json
JavaScript Text Strings
Identifying strings
Extracting strings
Localizing strings
Localizable HTML
Identifying and extracting strings
Localizing strings
Internationalization
Back to the News: Multilingual Formatting
Summary
A. Palm webOS Developer Program
Philosophy
Palm webOS: Open Platform, Open Community
Benefits to the Developer
Resources and Community
What You Should Do
B. Quick Reference—Developer Guide
Widgets
Button
Check Box
Date Picker
Drawer
File Picker
Filter Field
Filter List
Image View
Integer Picker
List
List Selector
Password Field
Progress Bar
Progress Pill
Progress Slider
Radio Button
Rich Text Edit
Scroller
Slider
Spinner
Text Field
Time Picker
Toggle Button
Web View
Dialogs
Mojo.Controller.errorDialog()
Mojo.Controller.SceneController.showAlertDialog()
Mojo.Controller.SceneController.showDialog()
Menus
AppMenu
Command Menu
View Menu
Submenu
Storage
Mojo.Model.Cookie()
Mojo.Depot()
Services
Accounts
Method: listAccounts
Method: createAccount
Method: getAccount
Method: updateAccount
Method: deleteAccount
Alarms
Method: set
Method: clear
Application Manager
Method: open
Method: launch
Audio
Method: launch
Calendar
Method: createCalendar
Method: getCalendar
Method: updateCalendar
Method: deleteCalendar
Method: listCalendars
Method: createEvent
Method: getEvent
Method: updateEvent
Method: deleteEvent
Method: listEvents
Method: startTracking
Method: getChanges
Method: doneWithChanges
Connection Manager
Method: getStatus
Contacts
Method: createContact
Method: getContact
Method: updateContact
Method: deleteContact
Method: listContacts
Method: startTracking
Method: getChanges
Method: doneWithChanges
Email
Method: open
Method: launch
Location Services
Method: getCurrentPosition
Method: startTracking
Method: getReverseLocation
Maps
Method: open
Method: launch
Messaging
Method: launch
Phone
Method: open
Method: launch
Photos
Method: launch
System Properties
Method: getSysProperties
System Service
Method: getSystemTime
System Sounds
Method: playFeedback
Video
Method: launch
Controller APIs
Mojo.Controller.AppController.createStageWithCallback(stageArguments, onCreate, optionalStageType)
Mojo.Controller.AppController.getActiveStageController(stageType)
Mojo.Controller.AppController.getScreenOrientation()
Mojo.Controller.AppController.getStageController(stageName)
Mojo.Controller.AppController.getStageProxy(stageName)
Mojo.Controller.AppController.sendToNotificationChain(notificationData)
Mojo.Controller.AppController.showBanner(bannerParams, launchArguments, category)
Mojo.Controller.SceneController.listen(element, eventType, callback, onCapture)
Mojo.Controller.SceneController.get(elementId)
Mojo.Controller.SceneController.removeRequest(request)
Mojo.Controller.SceneController.serviceRequest(url, options, resubscribe)
Mojo.Controller.SceneController.setupWidget(name, attributes, model)
Mojo.Controller.SceneController.stopListening(element, eventType, callback, onCapture)
Mojo.Controller.StageController.activate()
Mojo.Controller.StageController.activeScene()
Mojo.Controller.StageController.deactivate()
Mojo.Controller.StageController.delegateToSceneAssistant(functionName)
Mojo.Controller.StageController.getScenes()
Mojo.Controller.StageController.getWindowOrientation()
Mojo.Controller.StageController.popScene(returnValue, options)
Mojo.Controller.StageController.popScenesTo(targetScene, returnValue, options)
Mojo.Controller.StageController.pushScene(sceneArguments)
Mojo.Controller.StageController.setWindowOrientation(orientation)
Mojo.Controller.StageController.swapScene(sceneArguments)
Mojo.Controller.StageController.topScene()
C. Quick Reference—Style Guide
Scene Basics
Backdrop
Fixed Header
Page Header
Scrim
Scroll Fades
View/Command Menus
List Basics
Add/Remove Rows
Lists and Rows
Separators
Reordering Rows
Swipe to Delete
Touch Feedback
Touch Feedback with Groups
Containers
Drawers
Labeled Groups
Unlabeled Groups
Dividers
Alphabetical Dividers
Collapsible Dividers
Labeled Dividers
Solid Dividers
Panels
Dashboard Panel
Dialog
Menu Panel
Submenu
Text
Basic Text Styles
Capitalization
Fonts
Truncation
Widgets
Button
Check Box
Date Picker
Integer Picker
Filter Field
List Selector
Progress Pill
Radio Button
Slider
Spinner
Text Field
Time Picker
Toggle Button
D. News Application Source Code
News Application Directory Structure
news/app/assistants/app-assistant.js
news/app/assistants/dashboard-assistant.js
news/app/assistants/feedList-assistant.js
news/app/assistants/preferences-assistant.js
news/app/assistants/storyList-assistant.js
news/app/assistants/storyView-assistant.js
news/app/models/cookies.js
news/app/models/feeds.js
news/app/assistants/views/dashboard/dashboard-scene.html
news/app/assistants/views/dashboard/item-info.html
news/app/assistants/views/feedList/addFeed-dialog.html
news/app/assistants/views/feedList/feedList-scene.html
news/app/assistants/views/feedList/feedListTemplate.html
news/app/assistants/views/feedList/feedRowTemplate.html
news/app/assistants/views/preferences/preferences-scene.html
news/app/assistants/views/storyList/storyList-scene.html
news/app/assistants/views/storyList/storyListTemplate.html
news/app/assistants/views/storyList/storyRowTemplate.html
news/app/assistants/views/storyView/storyView-scene.html
news/appinfo.json
news/framework_config.json
news/index.html
news/resources/es_us/appinfo.json
news/resources/es_us/strings.json
news/resources/es_us/views/feedList/addFeed-dialog.html
news/resources/es_us/views/feedList/feedList-scene.html
news/resources/es_us/views/preferences/preferences-scene.html
news/sources.json
news/stylesheets/News.css
Index
About the Author
Colophon
Copyright
Search in book...
Toggle Font Controls
Playlists
Add To
Create new playlist
Name your new playlist
Playlist description (optional)
Cancel
Create playlist
Sign In
Email address
Password
Forgot Password?
Create account
Login
or
Continue with Facebook
Continue with Google
Sign Up
Full Name
Email address
Confirm Email Address
Password
Login
Create account
or
Continue with Facebook
Continue with Google
Next
Next Chapter
Palm® webOS™
Add Highlight
No Comment
..................Content has been hidden....................
You can't read the all page of ebook, please click
here
login for view all page.
Day Mode
Cloud Mode
Night Mode
Reset