Book Image

PhoneGap 2.x Mobile Application Development HOTSHOT

By : Kerri Shotts
Book Image

PhoneGap 2.x Mobile Application Development HOTSHOT

By: Kerri Shotts

Overview of this book

<p>Do you want to create mobile apps that run on multiple mobile platforms? With PhoneGap (Apache Cordova), you can put your existing development skills and HTML, CSS, and JavaScript knowledge to great use by creating mobile apps for cross-platform devices.</p> <p>"PhoneGap 2.x Mobile Application Development Hotshot" covers the concepts necessary to let you create great apps for mobile devices. The book includes ten apps varying in difficulty that cover the gamut – productivity apps, games, and more - that are designed to help you learn how to use PhoneGap to create a great experience.</p> <p>"PhoneGap 2.x Mobile Application Development Hotshot" covers the creation of ten apps, from their design to their completion, using the PhoneGap APIs. The book begins with the importance of localization and how HTML, CSS, and JavaScript interact to create the mobile app experience. The book then proceeds through mobile apps of various genres, including productivity apps, entertainment apps, and games. Each app covers specific items provided by PhoneGap that help make the mobile app experience better. This book covers the camera, geolocation, audio and video, and much more in order to help you create feature-rich mobile apps.</p>
Table of Contents (19 chapters)
PhoneGap 2.x Mobile Application Development HOTSHOT
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
InstallingShareKit 2.0
Index

Implementing the split-view UI


Now it's time to implement the changes necessary to make our app a split-view app. From this point forward, we'll be working in /2/www if you want to follow along. We started from the code in the last task and then modified it to suit the new user interface.

Getting on with it

Unlike the last time, we're going to be making several modifications. Not a lot of code, mind you, but we'll be touching several different files and making tweaks to support the change. The documents view gets only a few minor modifications, though we will change the display to a list instead of a grid, and the file view gets several modifications. For one, it has to handle what to do when there is no document loaded (which will happen at the beginning of the app). Second, it has to change the way it handles autosaving content (since there is no longer any dismissal of the view).

But first, we need to get the layout set up to show two views side-by-side. We'll start in index.html:

  <body...