HAPPY BOOKSGIVING
Use code BOOKSGIVING during checkout to save 40%-55% on books and eBooks. Shop now.
Register your product to gain access to bonus material or receive a coupon.
Android Programming Unleashed is the most comprehensive and technically sophisticated guide to best-practice Android development with today's powerful new versions of Android: 4.1 (Jelly Bean) and 4.0.3 (Ice Cream Sandwich). Offering the exceptional breadth and depth developers have come to expect from the Unleashed series, it covers everything programmers need to know to develop robust, high-performance Android apps that deliver a superior user experience.
Leading developer trainer Bintu Harwani begins with basic UI controls, then progresses to more advanced topics, finally covering how to develop feature rich Android applications that can access Internet-based services and store data. He illuminates each important SDK component through complete, self-contained code examples that show developers the most effective ways to build production-ready code. Coverage includes: understanding the modern Android platform from the developer's standpoint… using widgets, containers, resources, selection widgets, dialogs, and fragments… supporting actions and persistence… incorporating menus, ActionBars, content providers, and databases… integrating media and animations… using web, map, and other services… supporting communication via messaging, contacts, and emails… publishing Android apps, and much more.
Accessing Google Maps in Android Apps
Accessing Web Services Through Android Apps
Applying AJAX to a PHP App to Make It Highly Responsive
Converting a Java Program into an Android App
Creating MVC 4 Apps in Visual Studio
Using the Android Emulator and Developer Tools to Build Bullet-Proof Android Applications, Part 1
Using the Android Emulator and Developer Tools to Build Bullet-Proof Android Applications, Part 2
Laying Out Controls in Android Containers
Download the sample pages (includes Chapter 3 and Index)
Introduction 1
Key Topics That This Book Covers 1
Key Benefits That This Book Provides 2
How This Book Is Organized 2
Code Examples for This Book 5
I: Fundamentals of Android Development
1 Introduction to Android 9
The Android 4.1 Jelly Bean SDK 9
Understanding the Android Software Stack 11
Installing the Android SDK 12
Adding Platforms and Other Components 16
Installing Eclipse 20
Installing the Android Development Tools (ADT) Plug-in 22
Making the ADT Plug-in Functional 24
Creating Android Virtual Devices 24
Creating the First Android Project 27
Laying Out the Application 31
Defining Action Code Through Java 34
Running the Application 36
Using the TextView Control 39
Assigning the Text Directly in the Layout File 39
Assigning Text Through the Activity File 40
Applying Dimensions to Controls 42
Aligning Content with the Gravity Attribute 43
Commonly Used Attributes 43
Using the Android Emulator 47
Limitations of the Android Emulator 47
The Android Debug Bridge (ADB) 48
Launching Android Applications on a Handset 50
Summary 51
2 Basic Widgets 53
Understanding the Role of Android Application Components 53
Understanding the Utility of Android API 55
Overview of the Android Project Files 57
Understanding Activities 59
Understanding the Android Activity Life Cycle 60
Role of the Android Manifest File 61
Using the Manifest Editor 64
Creating the User Interface 64
Commonly Used Layouts and Controls 66
Event Handling 67
Creating an Anonymous Inner Class 68
Activity Implementing the OnClickListener Interface 71
Declaring the Event Handler in the XML Control Definition 72
Displaying Messages Through Toast 75
Creating and Starting an Activity 76
Describing Operations Through Intent 77
Method Used to Start an Activity 77
Creating Your Own Layout File 78
Creating a New Activity 79
Registering the New Activity 80
Starting the Activity 81
Using the EditText Control 82
Attributes Used to Configure the EditText Control 82
Adding an Event Listener to the EditText Control 84
Choosing Options with CheckBox 87
Choosing Mutually Exclusive Items Using RadioButtons 91
Summary 98
II: Building Blocks for Android Application Design
3 Laying Out Controls in Containers 101
Introduction to Layouts &