You are previewing Android Programming Concepts.
O'Reilly logo
Android Programming Concepts

Book Description

Using a hands-on, student-friendly approach, Android Programming Concepts provides a comprehensive foundation for the development of mobile applications for devices and tablets powered by Android. This text explores Android Java and the Android SDK, the implementation of interactivity using touchscreen gesture detection and sensors, and current concepts and techniques for constructing mobile apps that take advantage of the latest Android features. Each chapter features a collection of well-designed and classroom tested labs that provide clear guidance of Android concepts. Each lab is geared toward one or two specific Android concepts, which eliminated distractions and gives the reader better focus on the concepts at hand.

Table of Contents

  1. Cover
  2. Title Page
  3. Copyright
  4. Dedication
  5. Contents
  6. Preface
  7. Chapter 1 Introduction
    1. 1.1 Android Platforms
    2. 1.2 Java vs. Android Java
    3. 1.3 Android Studio IDE
    4. 1.4 The Basics of App Design
    5. 1.5 The Anatomy of an Android Project
      1. 1.5.1 Android Manifest File
      2. 1.5.2 Java Source Code and Activity Class Files
      3. 1.5.3 Drawable Resources
      4. 1.5.4 Layout XML Files
      5. 1.5.5 Value Resources
      6. 1.5.6 Gradle Scripts
    6. 1.6 Building Basic Applications in Android Studio
    7. 1.7 Model-View-Controller
    8. 1.8 Debugging Android Applications
    9. 1.9 Sharing your Android Applications
      1. Exercises
  8. Chapter 2 Building User Interfaces and Basic Applications
    1. 2.1 Android User Interface
    2. 2.2 Layouts
    3. 2.3 The View Class
    4. 2.4 Text Input and Output
    5. 2.5 Soft Keyboards
    6. 2.6 Android’s Form Widgets for User Interfaces
      1. 2.6.1 RadioButton and CheckBox
      2. 2.6.2 ToggleButton
      3. 2.6.3 Switch
      4. 2.6.4 ProgressBar
      5. 2.6.5 SeekBar
      6. 2.6.6 RatingBar
      7. 2.6.7 Spinner
    7. 2.7 Unique ID of a View Object and the R Class
    8. 2.8 The ViewGroup
      1. 2.8.1 RadioGroup
    9. 2.9 Adaptive Design Concepts—Screens and Orientations
    10. 2.10 TableLayout and TableRow
    11. 2.11 Container Views
      1. 2.11.1 ListView, GridView, and ExpandableListView
      2. 2.11.2 ScrollView and HorizontalScrollView
      3. 2.11.3 SearchView
      4. 2.11.4 VideoView
    12. 2.12 Using an Adapter
      1. Exercises
  9. Chapter 3 Activities and Intents
    1. 3.1 Activity Lifecycle
    2. 3.2 Starting, Saving, and Restoring an Activity
    3. 3.3 Multiple Activities and the Intent Class
      1. 3.3.1 Explicit Intents
      2. 3.3.2 Implicit Intents
    4. 3.4 Handling Keyboard Visibility in an Activity
    5. 3.5 Passing Data between Activities
    6. 3.6 Basic Transitions between Activities
    7. 3.7 Scene Transitions
      1. Exercises
  10. Chapter 4 Fragments, ActionBar, and Menus
    1. 4.1 Fragmentation and Android Fragments
    2. 4.2 The Fragment Lifecycle
    3. 4.3 Action Bar
    4. 4.4 ActionBar Configurations
      1. 4.4.1 Overflow on the Action Bar
      2. 4.4.2 Adding an Action View
    5. 4.5 Responsive Design with Fragments
    6. 4.6 Animation in Fragment Transactions
    7. 4.7 ListViews and Adapters
    8. 4.8 Handling Click Events in a ListView
      1. Exercises
  11. Chapter 5 Graphics, Drawing, and Audio
    1. 5.1 Graphics in Android
    2. 5.2 Adding and Manipulating ImageViews
    3. 5.3 Drawing and the Canvas Class
    4. 5.4 Recursive Drawing
    5. 5.5 Frame-by-Frame and Film Loop Animations
    6. 5.6 Animate Library
    7. 5.7 Audio
      1. 5.7.1 SoundPool
      2. 5.7.2 MediaPlayer
      3. Exercises
  12. Chapter 6 Threads, Handlers, and Programmatic Movement
    1. 6.1 Multithreading and Multicore Processing
    2. 6.2 Main Thread and Background Thread
    3. 6.3 Thread Approaches
      1. 6.3.1 Implementing a Runnable Interface
      2. 6.3.2 Extend the Thread Class
    4. 6.4 UI Modification and the Handler Class
    5. 6.5 Loopers
    6. 6.6 Canvas Movement and Views
    7. 6.7 SurfaceViews
    8. 6.8 Efficient Threading
    9. 6.9 Materials and Functionality
    10. 6.10 AsyncTasks
      1. Exercises
  13. Chapter 7 Touch Gestures
    1. 7.1 Touchscreens
    2. 7.2 Touch Gestures
    3. 7.3 The Basics of Touch Events
    4. 7.4 Gesture Detector
    5. 7.5 The MotionEvent Class
    6. 7.6 The Drag-and-Drop Gesture
    7. 7.7 Fling Gesture
    8. 7.8 Fling Velocity
    9. 7.9 Multitouch Gestures
      1. Exercises
  14. Chapter 8 Sensors and Camera
    1. 8.1 Sensors and Mobile Devices
    2. 8.2 Android Sensors
      1. 8.2.1 Motion Sensors
      2. 8.2.2 Environmental Sensors
      3. 8.2.3 Positional Sensors
    3. 8.3 Working with Sensors
    4. 8.4 Coordinate System
    5. 8.5 Accelerometer and Force
    6. 8.6 Sensor Batching
      1. 8.6.1 Step Counter and Step Detector
    7. 8.7 Composite Sensors
    8. 8.8 Camera
      1. 8.8.1 The Built-in Camera Application
    9. 8.9 Manipulating Photos
      1. Exercises
  15. Chapter 9 File Storage, Shared Preferences, and SQLite
    1. 9.1 Storing Data
    2. 9.2 Shared Preferences
    3. 9.3 File Storage—Internal and External Storage
    4. 9.4 Android Database with SQLite
    5. 9.5 SQLiteOpenHelper
    6. 9.6 Adapters and AdapterViews
      1. Exercises
  16. Index