OReilly Learning Android, Develop Mobile Apps using Java and Eclipse 2nd (2014).pdf

(21943 KB) Pobierz
Learning Android, Second Edition
by Marko Gargenta and Masumi Nakamura
Copyright © 2014 Marko Gargenta and Masumi Nakamura. 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.
Editors:
Andy Oram and Rachel Roumeliotis
Production Editor:
Kara Ebrahim
Copyeditor:
Kim Cofer
Proofreader:
Amanda Kersey
January 2014:
Second Edition
Indexer:
Meghan Jones
Cover Designer:
Randy Comer
Interior Designer:
David Futato
Illustrator:
Rebecca Demarest
Revision History for the Second Edition:
2014-01-08:
First release
See
http://oreilly.com/catalog/errata.csp?isbn=9781449319236
for release details.
Nutshell Handbook, the Nutshell Handbook logo, and the O’Reilly logo are registered trademarks of O’Reilly
Media, Inc.
Learning Android, Second Edition,
the image of a Little Owl, and related trade dress are trade‐
marks 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 trade‐
mark 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 contained
herein.
ISBN: 978-1-449-31923-6
[LSI]
Table of Contents
Preface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi
1. Android Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Android Overview
Comprehensive
Open Source Platform
Designed for Mobile Devices
History
Google’s Motivation
Android Compatibility
Open Handset Alliance
Android Versions
Android Flavors
Android Open Source Project
Manufacturer Add-Ons
Summary
1
1
2
2
3
4
4
5
5
7
7
7
8
2. Java Review. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Comments
Data Types: Primitives and Objects
Modifiers
Arrays
Operators
Control Flow Statements
Error/Exception Handling
Complex Example
Interfaces and Inheritance
Collections
Generics
12
13
14
15
16
16
19
22
26
27
28
iii
Zgłoś jeśli naruszono regulamin