SECOND EDITIONBuilding Android Apps with HTML, CSS, and JavaScript Jonathan Stark with Brian Jepson... Building Android Apps with HTML, CSS, and JavaScript, Second Editionby Jonathan Sta
Trang 3SECOND EDITION
Building Android Apps with HTML, CSS, and JavaScript
Jonathan Stark
with Brian Jepson
Trang 4Building Android Apps with HTML, CSS, and JavaScript, Second Edition
by Jonathan Stark with Brian Jepson
Copyright © 2012 Jonathan Stark All rights reserved.
Printed in the United States of America.
Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472 O’Reilly books may be purchased for educational, business, or sales promotional use Online editions are also available for most titles (http://my.safaribooksonline.com) For more information, contact our corporate/institutional sales department: (800) 998-9938 or corporate@oreilly.com.
Editor: Brian Jepson
Production Editor: Kristen Borg
Proofreader: O’Reilly Production Services
Cover Designer: Karen Montgomery
Interior Designer: David Futato
Illustrator: Robert Romano September 2010: First Edition
January 2012: Second Edition
Revision History for the Second Edition:
2012-01-10 First release
See http://oreilly.com/catalog/errata.csp?isbn=9781449316419 for release details.
Nutshell Handbook, the Nutshell Handbook logo, and the O’Reilly logo are registered trademarks of
O’Reilly Media, Inc Building Android Apps with HTML, CSS, and JavaScript, the image of a maleo, and
related trade dress are trademarks of O’Reilly Media, Inc.
Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks Where those designations appear in this book, and O’Reilly Media, Inc., was aware of a trademark claim, the designations have been printed in caps or initial caps.
While every precaution has been taken in the preparation of this book, the publisher and authors assume
no responsibility for errors or omissions, or for damages resulting from the use of the information con-tained herein.
ISBN: 978-1-449-31641-9
[LSI]
1326207514
Trang 5To Erica & Cooper
Trang 6About the Authors
Jonathan Stark is a mobile and web application consultant who has been called “an expert on publishing desktop data to the web” by the Wall Street Journal He has written two books on web application programming, is a tech editor for both php|architect and Advisor magazines, and has been quoted in the media on Internet and mobile lifestyle trends Jonathan began his programming career more than 20 years ago on a Tandy TRS-80 and still thinks Zork was a sweet game
Brian Jepson is an O’Reilly editor, hacker, and co-organizer of Providence Geeks and the Rhode Island Mini Maker Faire He’s also been involved in various ways over the years with AS220, a non-profit unjuried and uncensored arts center in Providence, Rhode Island
Colophon
The animal on the cover of Building Android Apps with HTML, CSS, and JavaScript is
a maleo (Macrocephalon maleo), an endangered bird with a current population between
5,000 and 10,000 that is only found on the Indonesian islands of Sulawesi and Buton This distinctive, rare bird is about the size of a full-grown chicken, with white and light pink belly and breast feathers standing out against its black back and wings The maleo’s scientific name indicates that individuals possess strong legs and large heads Their sloped foreheads are often described as “helmet-shaped.”
Perhaps the most remarkable characteristic of this monogamous bird is the way it nests and cares for its offspring Unlike most birds, who incubate their own eggs, the maleo lays its eggs in pits in the sand to be incubated by the sun, geothermal energy, or both Maleos nest communally, which is likely a defensive measure against egg predators When a young maleo hatches and emerges from the sand after two to three months of incubation, it is independent and able to fly It quickly heads to the forest on its own
to hide from predators and find food
Maleo eggs are approximately five times the size of a chicken egg, making them desir-able among locals In 2009, the US-based Wildlife Conservation Society purchased a 36-acre area of the Sulawesi beach (containing about 40 nests) in order to raise aware-ness about the steadily declining species and to protect the birds from human egg harvesters
The cover image is from Cassell’s Natural History The cover font is Adobe ITC
Gara-mond The text font is Linotype Birka; the heading font is Adobe Myriad Condensed; and the code font is LucasFont’s TheSansMonoCondensed
Trang 7D