Introduction to Android Application Development: Android Essentials (5th Edition) (Developer's Library)
Format: PDF / Kindle (mobi) / ePub
What Every Android App Developer Should Know Today: Android 6 Tools, App/UI Design, Testing, Publishing, and More
Introduction to Android ™ Application Development, Fifth Edition , is the most useful real-world guide to building robust, commercial-grade Android apps with the new Android 6 SDK, Android Studio, and latest development best practices. Bigger, better, and more comprehensive than ever, this book covers everything you need to start developing professional apps for modern Android devices. If you’re serious about Android development, this guide will prepare you to build virtually any app you can imagine!
Three well-respected experts guide you through setting up your development environment, designing user interfaces, developing for diverse devices, and optimizing your entire app-development process. Up-to-date code listings support in-depth explanations of key API features, and many chapters contain multiple sample apps.
This fifth edition adds brand-new chapters on material design, styling applications, design patterns, and querying with SQLite. You’ll find a treasure trove of Android Studio tips, plus a brand-new appendix on the Gradle build system. This edition also offers
Updated coverage of the latest Android 5.1 and 6 APIs, tools, utilities, and best practices
New coverage of the Android 6.0 permission model
Powerful techniques for integrating material design into your apps
An all-new chapter on using styles and reusing common UI components
Extensive new coverage of app design, architecture, and backward compatibility
A full chapter on using SQLite with persistent database-backed app data
Revised quiz questions and exercises to test your knowledge
Download this book’s source code at informit.com/title/9780134389455 or introductiontoandroid.blogspot.com.
52 Exercises 53 References and More Information 53 Contents 3 Writing Your First Android Application 55 Testing Your Development Environment 55 Adding the Android Samples Using the SDK Manager 56 Adding the Snake Project to Your Android IDE Workspace 57 Creating an AVD for Your Snake Project 61 Creating a Launch Configuration for Your Snake Project 62 Running the Snake Application in the Android Emulator 66 Building Your First Android Application 68 Creating and Configuring a New Android
with Layouts 166 Referencing System Resources 171 Summary 172 Quiz Questions 173 Exercises 173 References and More Information 173 xv xvi Contents III: Android User Interface Design Essentials 7 Exploring User Interface Building Blocks 177 Introducing Android Views and Layouts 177 The Android View 177 The Android Controls 177 The Android Layout 178 Displaying Text to Users with TextView 179 Configuring Layout and Sizing 179 Creating Contextual Links in Text 180 Retrieving Data from Users
the Snapshot feature for each AVD. You can also use the Start button on the Android Virtual Device Manager to load an emulator before you need it. Launching the AVD this way also gives you some additional options such as screen scaling (see Figure 3.12), which can be used to either fit the AVD on your screen if it’s very high resolution or more closely emulate the size it might be on real hardware. Figure 3.12 Configuring AVD launch options. Testing Your Development Environment 4. If
you can examine the results in the Debug perspective of the Android IDE. If you examine the LogCat logging pane, you see that your application was forced to exit due to an unhandled exception (see Figure 3.27). Building Your First Android Application Figure 3.25 My First Android App crashing gracefully. 81 82 Chapter 3 Writing Your First Android Application Figure 3.26 Switching to Debug perspective for Android emulator debugging. Figure 3.27 Debugging MyFirstAndroidApp in the Android
the application can display the track information and progress in this area of the screen as well. This sort of application design requires only a single screen, and thus a single Activity class, as shown in Figure 4.4. But then you’re stuck with having to develop basically two separate applications: one to work on smaller screens, and another to work on larger ones. This is where fragments come in. If you componentize your features and make four fragments (List Artists, List Artist Albums, List