Index

A B C D E F G H I J L M N O P Q R S T U V W X Z

Symbols

9-patch images, For the More Curious: 9-Patch Images
<> (diamond notation), Singletons and centralized data storage
?? (null coalescing) operator, More syntactic sugar
@+id, Resources and resource IDs
@Before annotation, Setting Up Your Test
@Override, Making log messages
@Test annotation, Writing Tests
@{} (binding mustache) operator, Binding to Data, Binding to a ViewModel

A

aapt (Android Asset Packing tool), For the More Curious: Android Build Process
accessibility

(see also Accessibility Scanner, Explore by Touch, TalkBack)

about, Accessibility, Creating a Comparable Experience

android:contentDescription attribute, Adding content descriptions

android:focusable attribute, Making a widget focusable

color contrast and, For the More Curious: Using Accessibility Scanner

someView.setContentDescription(someString) method, Creating a Comparable Experience

for touch targets, For the More Curious: Using Accessibility Scanner

accessibility focus, TalkBack
Accessibility Scanner, For the More Curious: Using Accessibility Scanner
accessibility services, TalkBack
action bar, toolbar vs, For the More Curious: Action Bar vs Toolbar
action views, Using SearchView
ACTION_IMAGE_CAPTURE, Firing the intent
activities

(see also Activity class, fragments)

about, App Basics

abstract fragment-hosting activity, An abstract Activity class

adding to project, Your Second Activity

as controllers, Model-View-Controller and Android

back stack of, How Android Sees Your Activities, Tasks and the Back Stack

base, Tasks and the Back Stack

child, Your Second Activity, Getting a result back from a child activity

creating new, Creating a new activity

fragment transactions and, Activity: Fragment Boss

handling configuration changes in, Proper Rotation with WebView

hosting fragments, Starting CriminalIntent, Hosting a UI Fragment

label (display name), Resolving an Implicit Intent

launcher, How Android Sees Your Activities

lifecycle and fragments, The FragmentManager and the fragment lifecycle

lifecycle diagram, The Activity Lifecycle, Revisited

lifecycle of, The Activity Lifecycle, Rotation and the Activity Lifecycle, The Activity Lifecycle, Revisited

managing fragments, Activity: Fragment Boss

overriding methods, The Activity Lifecycle, Making log messages

passing data between, Passing Data Between Activities

record, The Activity Lifecycle, Revisited

rotation and, Rotation and the Activity Lifecycle

stack of, How Android Sees Your Activities

starting from fragments, Starting an Activity from a Fragment

starting in current task, Tasks and the Back Stack

starting in new task, Starting a new task

states of, The Activity Lifecycle, The Activity Lifecycle, Revisited

tasks and, Tasks and the Back Stack

UI flexibility and, The Need for UI Flexibility

Activity class

as Context subclass, Making Toasts

getIntent(), Using intent extras, Retrieving an extra

lifecycle methods, The Activity Lifecycle

onActivityResult(…), Sending back an intent

onCreate(Bundle), The Activity Lifecycle, Making log messages

onCreateOptionsMenu(Menu), Creating the menu

onDestroy(), The Activity Lifecycle

onPause(), The Activity Lifecycle

onResume(), The Activity Lifecycle, Reloading the List

onSaveInstanceState(Bundle), Saving Data Across Rotation

onStart(), The Activity Lifecycle

onStop(), The Activity Lifecycle

setContentView(…) method, From Layout XML to View Objects

setResult(…), Setting a result

startActivity(Intent), Starting an Activity

startActivityForResult(…), Getting a result back from a child activity

activity record, The Activity Lifecycle, Revisited
ActivityInfo class, Creating Explicit Intents at Runtime
ActivityManager class

back stack, How Android Sees Your Activities

starting activities, Starting an Activity, Communicating with intents, Explicit and implicit intents, Sending back an intent

ActivityNotFoundException, Communicating with intents
Adapter class, Adapters
adapters

about, Adapters

implementing, Implementing a ViewHolder and an Adapter

adb (Android Debug Bridge) driver, Connecting your device
add(…) method (FragmentTransaction), Fragment transactions
addFlags(int) method (Intent), Starting a new task
AlarmManager class, Delayed Execution with AlarmManager, Managing alarms with PendingIntent
AlertDialog class

about, Dialogs

wrapping in DialogFragment, Creating a DialogFragment

AlertDialog.Builder class

about, Creating a DialogFragment

create(), Creating a DialogFragment

setPositiveButton(…), Creating a DialogFragment

setTitle(int), Creating a DialogFragment

setView(…), Setting a dialog’s contents

alias resources, Using an alias resource
ancestral navigation, Enabling Hierarchical Navigation
Android Asset Packing tool (aapt), For the More Curious: Android Build Process
Android Asset Studio, Using Android Asset Studio
Android Debug Bridge (adb) driver, Connecting your device
Android developer documentation, Using the Android Developer Documentation
Android firmware versions, Android SDK Versions
Android Lint

as static analyzer, Using Android Lint

compatibility and, Adding code from later APIs safely

running, Using Android Lint

Android SDK Manager, Downloading Earlier SDK Versions
Android Studio

adding dependencies in, Adding dependencies in Android Studio

AppCompat theme, Modifying the theme

build process, For the More Curious: Android Build Process

code completion, Using code completion

code style preferences, Generating getters and setters

creating new classes, Creating a New Class

creating new projects, Creating an Android Project

debugger

(see also debugging)

devices view, Configuring your device for development

editor, Navigating in Android Studio

Emulator Control, Mock location data

extracting a method with, Sending data to the target fragment

generating getter and setter methods, Generating getters and setters

graphical layout tool, Using the Graphical Layout Tool, Testing Alternative Resources

installing, Downloading and Installing Android Studio

preferences, Generating getters and setters

project tool window, Navigating in Android Studio

project window, Navigating in Android Studio

run configurations, Data Binding Callbacks

tool windows, Navigating in Android Studio

variables view, Setting breakpoints

Android versions (see SDK versions)
Android Virtual Device Manager, Running on the Emulator
Android Virtual Devices (AVDs), creating, Running on the Emulator
Android XML namespace, The view hierarchy
android.text.format.DateFormat class, Challenge: Formatting the Date
android.util.Log class (see Log class)
android.view.animation package, Legacy animation tools
android:background attribute, Styles
android:configChanges attribute, Proper Rotation with WebView
android:contentDescription attribute, Challenge: From Button to ImageButton, Adding content descriptions
android:documentLaunchMode attribute, For the More Curious: Concurrent Documents
android:drawablePadding attribute, Referencing resources in XML
android:drawableRight attribute, Referencing resources in XML
android:focusable attribute, Making a widget focusable
android:icon attribute, Using Android Asset Studio
android:id attribute, Resources and resource IDs
android:labelFor attribute, Using labels to provide context
android:layout_gravity attribute, Creating a landscape layout
android:layout_height attribute, android:layout_width and android:layout_height
android:layout_margin attribute, Margins vs padding
android:layout_width attribute, android:layout_width and android:layout_height
android:name attribute, Declaring activities in the manifest
android:orientation attribute, android:orientation
android:padding attribute, Margins vs padding
android:protectionLevel attribute, More about protection levels
android:text attribute, android:text
AndroidManifest.xml (see manifest)
animated state list drawables, State list animators
animation

about, Property Animation

android.view.animation package, Legacy animation tools

interpolation, Simple Property Animation

property animation vs transitions framework, Transitions

running multiple animators, Playing Animators Together

simple property animation, Simple Property Animation

transformation properties and (see transformation properties)

transitions framework, Transitions

translation, Simple Property Animation

animation tools, Animation Tools
AnimatorListener class, Playing Animators Together
AnimatorSet class, Playing Animators Together
anonymous inner classes, Code Style, Setting listeners
API keys

maps, Getting a Maps API Key

when working with teams, For the More Curious: Teams and API Keys

API levels (see SDK versions)
.apk file, For the More Curious: Android Build Process, For the More Curious: Mipmap Images
app icon, How hierarchical navigation works
app namespace, The app namespace
app/java directory, From Layout XML to View Objects
app:showAsAction attribute, Defining a menu in XML
AppCompat library

about, Adding dependencies in Android Studio

app namespace, The app namespace

themes in, Modifying the theme

toolbars with, AppCompat

AppCompatActivity class, From Layout XML to View Objects
appendQueryParameter(…) method (Uri.Builder), Fetching JSON from Flickr
application architecture, Single Responsibility Principle, Binding to Data
application context, For the More Curious: The Application Context
AppTheme theme, Modifying the theme
arguments bundle, The downside to direct retrieval
ArrayList class, Singletons and centralized data storage
AssetManager class, Getting At Assets, For the More Curious: Non-Assets?
assets

accessing, Accessing Assets

importing, Importing Assets

managing, Getting At Assets

presenting to user, Wiring Up Assets for Use

vs resources, Importing Assets, For the More Curious: Why Assets, Not Resources

AsyncTask class

cancel(boolean), Cleaning Up AsyncTasks

doInBackground(…), Using AsyncTask to Run on a Background Thread

for running on background thread, Using AsyncTask to Run on a Background Thread

HandlerThread vs, For the More Curious: AsyncTasks vs Threads

onPostExecute(…), From AsyncTask Back to the Main Thread

onProgressUpdate(…), For the More Curious: More on AsyncTask

publishProgress(…), For the More Curious: More on AsyncTask

AsyncTaskLoader class, For the More Curious: Alternatives to AsyncTask
AttributeSet class, Creating BoxDrawingView
audio streams, Creating a SoundPool
auto-completion, Using code completion
AVDs (Android Virtual Devices), creating, Running on the Emulator

B

Back button, Exploring the activity lifecycle by example, Tasks and the Back Stack, Challenge: Using the Back Button for Browser History
back stack, How Android Sees Your Activities
background threads

dedicated, Downloading Lots of Small Things

updating UI from, From AsyncTask Back to the Main Thread

using AsyncTask for, Using AsyncTask to Run on a Background Thread, Beyond the main thread

BaseObservable class, Observable data
beginTransaction() method (FragmentTransaction), Fragment transactions
Bitmap class, Scaling and Displaying Bitmaps
BitmapFactory class, Scaling and Displaying Bitmaps
bitmaps, scaling and displaying, Scaling and Displaying Bitmaps
breakpoints

(see also debugging)

exception, Using exception breakpoints

setting, Setting breakpoints

broadcast intents

about, Regular Intents vs Broadcast Intents

ordered, Passing and receiving data with ordered broadcasts

permissions and, Limiting broadcasts to your app using private permissions

registered in code, Creating and registering a dynamic receiver

regular intents vs, Regular Intents vs Broadcast Intents

sending, Sending broadcast intents

broadcast receivers

about, Regular Intents vs Broadcast Intents

dynamic, Creating and registering a dynamic receiver

implementing, Creating and registering a standalone receiver

intent filters and, Regular Intents vs Broadcast Intents

long-running tasks and, Receivers and Long-Running Tasks

permissions and, Limiting broadcasts to your app using private permissions

standalone, Creating and registering a standalone receiver

uses for, Using receivers

build errors, Issues with the R class

(see also debugging)

build process, For the More Curious: Android Build Process
build target, Compile SDK version
build.gradle, A sane minimum
Build.VERSION.SDK_INT, Adding code from later APIs safely
Bundle class

for stashing objects, Rotation and Object Continuity

for fragment arguments, Fragment Arguments

in onCreate(Bundle), Saving Data Across Rotation

in onSaveInstanceState(Bundle), Saving Data Across Rotation

putCharSequence(…);, Fragment Arguments

putInt(…);, Fragment Arguments

putSerializable(…), Fragment Arguments

Button class

example, Laying Out the UI

vs ImageButton, Challenge: From Button to ImageButton

inheritance, Challenge: From Button to ImageButton

buttons

(see also Button class, ImageButton class)

9-patch images for, For the More Curious: 9-Patch Images

adding icons to, Referencing resources in XML

adding IDs, Resources and resource IDs

drawables for, XML Drawables

floating action, Floating action buttons

modifying attributes, Modifying Button Attributes

positive, negative, and neutral, Creating a DialogFragment

C

caching, Challenge: Preloading and Caching
Calendar class, Passing data to DatePickerFragment
Callbacks interface, Fragment callback interfaces
camera

about, Taking Pictures with Intents

firing intent, Firing the intent

layouts for, A Place for Your Photo

taking pictures with intents, Using a Camera Intent

CameraUpdate class, Working with Your Map
cancel(boolean) method (AsyncTask), Cleaning Up AsyncTasks
cancel(…) method (AlarmManager), Managing alarms with PendingIntent
Canvas class, Rendering Inside onDraw(Canvas)
cards (view component), Cards
choosers, creating, Sending a crime report
circular reveal animation, Circular reveal
classes, importing, Wiring Up Widgets
close() method, Converting to model objects
code completion, Using code completion
codenames, version, Android SDK Versions
color

for animation, Color evaluation

themes and, Adding Theme Colors

color resources, adding, Color Resources
colorAccent attribute, Adding Theme Colors
colorPrimary attribute, Adding Theme Colors
colorPrimaryDark attribute, Adding Theme Colors
colors.xml file, Color Resources
commands (IntentService), Creating an IntentService
compatibility

Android Lint and, Adding code from later APIs safely

fragments and, Two types of fragments

importance of, Code Style, Android SDK Versions

issues, Compatibility and Android Programming

minimum SDK version and, Minimum SDK version

with support libraries, Two types of fragments

using conditional code for, Adding code from later APIs safely

wrapping code for, Adding code from later APIs safely

compile SDK version, Compile SDK version
compileSdkVersion, A sane minimum
ComponentName class, Creating Explicit Intents at Runtime
components, Communicating with intents
concurrent documents, For the More Curious: Concurrent Documents
configuration changes, Rotation and retained fragments
configuration qualifiers

about, Creating a landscape layout

for language, Localizing Resources

listed, Configuration Qualifiers

multiple, Multiple qualifiers

precedence of, Prioritizing alternative resources

for screen density, Adding an Icon, Screen density works differently

for screen orientation, Creating a landscape layout

for screen size, Creating tablet alternatives, For the More Curious: More on Determining Device Size

ConnectivityManager class, Safe background networking
ConstraintLayout class

about, Introducing ConstraintLayout

converting layout to use, Using ConstraintLayout

constraints

about, Introducing ConstraintLayout

adding in graphical editor, Adding widgets

in XML, ConstraintLayout’s inner workings

removing, The graphical editor

warnings when insufficient, The graphical editor

contacts

getting data from, Getting the data from the contact list

permissions for, Contacts permissions

container view IDs, Fragment transactions
container views, Defining a container view
ContentProvider class, Getting the data from the contact list
ContentResolver class, Getting the data from the contact list
ContentValues class, Using ContentValues
Context class

AssetManager, Getting At Assets

basic file and directory methods in, File Storage

explicit intents and, Communicating with intents

for opening database files, Building Your Initial Database

getSharedPreferences(…), Simple Persistence with Shared Preferences

references to, For the More Curious: The Application Context

resource IDs and, Making Toasts

Context.MODE_WORLD_READABLE, File Storage
controller objects, Model-View-Controller and Android
conventions

class naming, Creating an Android Project

extra naming, Using intent extras

package naming, Creating an Android Project

variable naming, Wiring Up Widgets, Generating getters and setters

create() method (AlertDialog.Builder), Creating a DialogFragment
createChooser(…) method (Intent), Sending a crime report
Cursor class, Using a CursorWrapper, Converting to model objects
CursorWrapper class, Using a CursorWrapper

D

data binding

?? (null coalescing) operator in, More syntactic sugar

@{} operator, Binding to Data, Binding to a ViewModel

and application architecture, Binding to Data

and view models, Binding to a ViewModel

binding adapters, BindingAdapters

binding classes, Simple data binding

enabling, Simple data binding

lambda expressions, Lambda expressions

observable data, Observable data

/data/data directory, SQLite Databases
database schema, Defining a Schema
databases, SQLite, SQLite Databases
Date class, Passing data to DatePickerFragment
DatePicker class, Setting a dialog’s contents
debug key, For the More Curious: Android Build Process
debugging

(see also Android Lint)

about, Debugging Android Apps

build errors, Issues with the R class

crash, Exceptions and Stack Traces

crash on unconnected device, Exceptions and Stack Traces

database issues, Debugging database issues

misbehaviors, Diagnosing misbehaviors

online help for, Issues with the R class

R, Issues with the R class

running app with debugger, Setting breakpoints

stopping debugger, Setting breakpoints

using breakpoints, Setting breakpoints

when working with teams, For the More Curious: Teams and API Keys

DEFAULT (Intent), Using NerdLauncher as a Home Screen
default resources, Default resources
delayed execution, Delayed Execution with AlarmManager
density-independent pixel, Screen pixel densities and dp and sp
dependencies, adding, Adding dependencies in Android Studio
dependency injectors, For the More Curious: Singletons
detach(Fragment) method (FragmentTransaction), FragmentStatePagerAdapter vs FragmentPagerAdapter
developer documentation, Using the Android Developer Documentation
device configurations, Device configurations and alternative resources
devices

configuring language settings, Localizing Resources

hardware, Running on the Emulator

virtual, Running on the Emulator, Two-Pane Master-Detail Interfaces

devices view, Configuring your device for development
Dialog class, Dialogs
DialogFragment class

about, Creating a DialogFragment

onCreateDialog(Bundle), Creating a DialogFragment

show(…), Showing a DialogFragment

dialogs, Dialogs
diamond notation, Singletons and centralized data storage
dip (density-independent pixel), Screen pixel densities and dp and sp
documentation, Using the Android Developer Documentation
doInBackground(…) method (AsyncTask), Using AsyncTask to Run on a Background Thread
dp (density-independent pixel), Screen pixel densities and dp and sp
draw() method (View), Rendering Inside onDraw(Canvas)
drawables

9-patch images, For the More Curious: 9-Patch Images

layer list, Layer List Drawables

referencing, Referencing resources in XML

shape, Shape Drawables

state list, State List Drawables

XML drawables, XML Drawables

drawing

Canvas, Rendering Inside onDraw(Canvas)

in onDraw(Canvas), Rendering Inside onDraw(Canvas)

Paint, Rendering Inside onDraw(Canvas)

E

EditText class, Defining CrimeFragment’s layout
elevation, Elevation and Z values
emulator

creating a virtual device for, Running on the Emulator

for location testing, Play Services and Location Testing on Emulators

installing, Downloading Earlier SDK Versions

rotating, Referencing resources in XML

running on, Running on the Emulator

search queries on, Responding to SearchView user interactions

for tablets, Two-Pane Master-Detail Interfaces

Emulator Control (Android Studio), Mock location data
errors, Wiring Up Widgets

(see also debugging)

escape sequence (in string), Updating the View Layer
EventBus, For the More Curious: Local Events
exception breakpoints, Using exception breakpoints
exceptions, Exceptions and Stack Traces, Logging stack traces
explicit intents

creating, Communicating with intents

creating at runtime, Creating Explicit Intents at Runtime

implicit intents vs, Implicit Intents

purpose, Explicit and implicit intents

Explore by Touch, Explore by Touch
extras

about, Using intent extras

fragments retrieving from activity, Retrieving an extra

as key-value pairs, Using intent extras

naming, Using intent extras

putting, Using intent extras

retrieving, Using intent extras

structure of, Using intent extras

F

File class

getCacheDir(…), File Storage

getDir(…), File Storage

getFilesDir(…), File Storage

FileDescriptor class, Accessing Assets
FileInputStream class, File Storage
fileList(…) method (String), File Storage
FileOutputStream class, File Storage
fill_parent, android:layout_width and android:layout_height
Flickr

API, Fetching JSON from Flickr

Geosearch, Flickr Geosearch

searching in, Searching Flickr

floating action buttons, Floating action buttons
FloatingActionButton class, Floating action buttons
fluent interface, Fragment transactions
fragment arguments, Retrieving an extra, The downside to direct retrieval, For the More Curious: Why Use Fragment Arguments?
Fragment class

for asset management, Creating BeatBox

getActivity(), Starting an Activity from a Fragment, Retrieving an extra

getArguments(…), Retrieving arguments

getTargetFragment(), Setting a target fragment

getTargetRequestCode(), Setting a target fragment

from native libraries, For the More Curious: Why Support Fragments Are Superior

newInstance(…), Attaching arguments to a fragment

onActivityResult(…), Passing Data Between Two Fragments

onCreate(Bundle), Implementing fragment lifecycle methods

onCreateOptionsMenu(…), Creating the menu

onCreateView(…), Implementing fragment lifecycle methods

onOptionsItemSelected(MenuItem), Creating the menu, Responding to menu selections

onSaveInstanceState(Bundle), Implementing fragment lifecycle methods

setArguments(…), Attaching arguments to a fragment

setHasOptionsMenu(boolean), Creating the menu

setRetainInstance(…), Retaining a fragment

setTargetFragment(…), Setting a target fragment

SingleFragmentActivity, Creating BeatBox

startActivityForResult(…), Getting Results with Fragments

from support library, Two types of fragments, For the More Curious: Why Support Fragments Are Superior

fragment transactions, Activity: Fragment Boss, Implementing CrimeListFragment.Callbacks

(see also FragmentTransaction class)

FragmentManager class

adding fragments to, Adding a UI Fragment to the FragmentManager

fragment lifecycle and, The FragmentManager and the fragment lifecycle

onResume(), Reloading the List

responsibilities, Adding a UI Fragment to the FragmentManager

role in rotation, Rotation and Object Continuity, Rotation and retained fragments

FragmentPagerAdapter class, FragmentStatePagerAdapter vs FragmentPagerAdapter
fragments

(see also fragment transactions, FragmentManager class)

about, Introducing Fragments

accessing extra in activity’s intent, Retrieving an extra

activities vs, The Need for UI Flexibility

activity lifecycle and, The FragmentManager and the fragment lifecycle

adding in code, Two approaches to hosting

adding to FragmentManager, Adding a UI Fragment to the FragmentManager

adding to layout, Two approaches to hosting

application architecture with, Application Architecture with Fragments

arguments of, The downside to direct retrieval

as composable units, The Need for UI Flexibility, Activity: Fragment Boss

Callbacks interface, Fragment callback interfaces

compatibility and, Two types of fragments

container view IDs, Fragment transactions

container views for, Defining a container view, Creating a layout with two fragment containers

creating, Creating a UI Fragment

creating from support library, Creating the CrimeFragment class

delegating functionality to activity, Fragment callback interfaces

hosting, Starting CriminalIntent, Hosting a UI Fragment

implementing lifecycle methods, Implementing fragment lifecycle methods

inflating layouts for, Implementing fragment lifecycle methods

layout, Two approaches to hosting

lifecycle diagram, The FragmentManager and the fragment lifecycle

lifecycle methods, The FragmentManager and the fragment lifecycle

lifecycle of, The fragment lifecycle, The FragmentManager and the fragment lifecycle

maintaining independence of, The downside to direct retrieval, Activity: Fragment Boss

passing data between (same activity), Passing Data Between Two Fragments

passing data with fragment arguments, Passing data to DatePickerFragment

reasons for, The Need for UI Flexibility, The reason all our activities will use fragments

retaining, Retaining a fragment

rotation and, Rotation and retained fragments

setting listeners in, Wiring widgets in a fragment

starting activities from, Starting an Activity from a Fragment

support libraries and, Two types of fragments, For the More Curious: Why Support Fragments Are Superior

without support library, For the More Curious: Why Support Fragments Are Superior

UI flexibility and, The Need for UI Flexibility

widgets and, Wiring widgets in a fragment

FragmentStatePagerAdapter class

about, ViewPager and PagerAdapter

getCount(), ViewPager and PagerAdapter

getItem(int), ViewPager and PagerAdapter

setOffscreenPageLimit(int), Integrating CrimePagerActivity

FragmentTransaction class

add(…), Fragment transactions

beginTransaction(), Fragment transactions

detach(Fragment), FragmentStatePagerAdapter vs FragmentPagerAdapter

remove(Fragment), FragmentStatePagerAdapter vs FragmentPagerAdapter

FrameLayout class

about, Creating a landscape layout

as container view for fragments, Defining a container view, Creating a layout with two fragment containers

Fused Location Provider, Google Play Services

(see also FusedLocationProviderApi class)

FusedLocationProviderApi class, Getting a Location Fix

G

gen directory, Resources and resource IDs
getAction() method (MotionEvent), Handling Touch Events
getActivity() method (Fragment), Starting an Activity from a Fragment, Retrieving an extra
getArguments(…) method (Fragment), Retrieving arguments
getBooleanExtra(…) method (Intent), Using intent extras
getBottom() method (View), Simple Property Animation
getCacheDir(…) method (File), File Storage
getCount() method (FragmentStatePagerAdapter), ViewPager and PagerAdapter
getDefaultSharedPreferences(…) method (PreferenceManager), Simple Persistence with Shared Preferences
getDir(String name, int mode) method, File Storage
getFilesDir(…) method (File), File Storage
getHeight() method (View), Simple Property Animation
getInputStream() method (HttpURLConnection), Networking Basics
getIntent() method (Activity), Using intent extras, Retrieving an extra
getItem(int) method (FragmentStatePagerAdapter), ViewPager and PagerAdapter
getLeft() method (View), Simple Property Animation
getMapAsync(…) method (SupportMapFragment), Working with Your Map
getOutputStream() method (HttpURLConnection), Networking Basics
getRight() method (View), Simple Property Animation
getScaledBitmap(…) method, Scaling and Displaying Bitmaps
getSharedPreferences(…) method (Context), Simple Persistence with Shared Preferences
getTargetFragment() method (Fragment), Setting a target fragment
getTargetRequestCode() method (Fragment), Setting a target fragment
getter and setter methods, generating, Generating getters and setters
getTop() method (View), Simple Property Animation
Google Drive, For the More Curious: Concurrent Documents
Google Play Services

about, Google Play Services

Maps API from, Importing Play Services Maps

setting up, Setting Up Google Play Services

using, Using Google Play Services

GoogleMap class, Working with Your Map
graphical layout tool, Using the Graphical Layout Tool, Testing Alternative Resources
GridLayoutManager class, Creating PhotoGallery
GridView class, For the More Curious: ListView and GridView

I

icons, Using Android Asset Studio
ImageButton class, Challenge: From Button to ImageButton
implicit intents

action, Parts of an implicit intent, Resolving an Implicit Intent

ACTION_CALL category, Challenge: Another Implicit Intent

ACTION_DIAL category, Challenge: Another Implicit Intent

ACTION_PICK category, Asking Android for a contact

ACTION_SEND category, Sending a crime report

benefits of using, Implicit Intents

categories, Parts of an implicit intent, Resolving an Implicit Intent

CATEGORY_DEFAULT, Resolving an Implicit Intent

data, Parts of an implicit intent

explicit intents vs, Implicit Intents, Using Implicit Intents

for browsing web content, The Easy Way: Implicit Intents

parts of, Parts of an implicit intent

sending with AlarmManager, Delayed Execution with AlarmManager

taking pictures with, Using a Camera Intent

inflating layouts, From Layout XML to View Objects, Implementing fragment lifecycle methods
inheritance, Style inheritance, For the More Curious: More on Style Inheritance
InputStream class

for delivering bytes, Networking Basics

read(), Networking Basics

inSampleSize, Scaling and Displaying Bitmaps
insert(…) method, Inserting and updating rows
integration testing

mock objects, For the More Curious: Mocks and Testing

vs unit testing, Creating a Test Class

Intent class

addFlags(…), Starting a new task

constructors, Communicating with intents

createChooser(…), Sending a crime report

getBooleanExtra(…), Using intent extras

putExtra(…), Using intent extras, Putting an extra

setClassName(…), Creating Explicit Intents at Runtime

setComponent(…), Creating Explicit Intents at Runtime

intent filters

about, How Android Sees Your Activities

BOOT_COMPLETED, Creating and registering a standalone receiver

explained, Parts of an implicit intent

SHOW_NOTIFICATION, Creating and registering a dynamic receiver

intent services

processing commands, Creating an IntentService

purpose, Creating an IntentService

Intent.FLAG_ACTIVITY_NEW_DOCUMENT class, For the More Curious: Concurrent Documents
intents

(see also broadcast intents, explicit intents, extras, implicit intents, Intent class)

communicating with, Communicating with intents

implicit vs explicit, Explicit and implicit intents, Implicit Intents

permissions and, Contacts permissions

regular vs broadcast, Regular Intents vs Broadcast Intents

taking pictures with, Using a Camera Intent

IntentService class

about, Creating an IntentService

commands, Creating an IntentService

interpolators, Using different interpolators
invalidate() method (View), Tracking across motion events
isNetworkAvailableAndConnected() method (ConnectivityManager), Safe background networking

J

JavaScript Object Notation (JSON), Fetching JSON from Flickr
JavaScript, enabling, The Harder Way: WebView
JavaScript, injecting objects, For the More Curious: Injecting JavaScript Objects
JobScheduler class, For the More Curious: JobScheduler and JobServices
JobService class, For the More Curious: JobScheduler and JobServices
JSON (JavaScript Object Notation), Fetching JSON from Flickr
JSONObject class, Parsing JSON text

L

lambda expressions, Lambda expressions
-land qualifier, Creating a landscape layout
language settings, Localizing Resources
LatLngBounds class, Working with Your Map
launcher activities, How Android Sees Your Activities
LAUNCHER category, How Android Sees Your Activities, Resolving an Implicit Intent
layer list drawables, Layer List Drawables
layout attributes

android:background, Styles

android:contentDescription, Challenge: From Button to ImageButton

android:drawablePadding, Referencing resources in XML

android:drawableRight, Referencing resources in XML

android:icon, Using Android Asset Studio

android:id, Resources and resource IDs

android:layout_gravity, Creating a landscape layout

android:layout_height, android:layout_width and android:layout_height

android:layout_margin, Margins vs padding

android:layout_width, android:layout_width and android:layout_height

android:orientation, android:orientation

android:text, android:text

colorAccent, Adding Theme Colors

colorPrimary, Adding Theme Colors

colorPrimaryDark, Adding Theme Colors

layout constraints (see constraints)
layout fragments, Two approaches to hosting
layout parameters, ConstraintLayout’s inner workings
LayoutInflater class, For the More Curious: Android Build Process, Implementing fragment lifecycle methods
layouts

about, App Basics

alternative, Creating a landscape layout

for asset management, Creating BeatBox

for cameras, A Place for Your Photo

defining in XML, Laying Out the UI

design documentation, Android’s design guidelines

inflating, From Layout XML to View Objects, Implementing fragment lifecycle methods

landscape, Creating a landscape layout

naming, Creating an Android Project

previewing, Previewing the layout, Creating a new activity, Testing Alternative Resources

for property animation, Building the Scene

root element, The view hierarchy

testing, Testing Alternative Resources

view hierarchy and, The view hierarchy

-ldpi suffix, Adding an Icon
lifecycle callbacks, The Activity Lifecycle
LinearLayout class, Laying Out the UI, The view hierarchy
Lint (see Android Lint)
list(String) method, Getting At Assets
list-detail interfaces, UI Fragments and the Fragment Manager, Using ViewPager, Two-Pane Master-Detail Interfaces
List<E> interface, Singletons and centralized data storage
listeners

about, Setting listeners

as interfaces, Setting listeners

setting in fragments, Wiring widgets in a fragment

setting up, Setting listeners

lists

displaying, Displaying Lists with RecyclerView

getting item data, Adapters

ListView class, For the More Curious: ListView and GridView
Loader class, For the More Curious: Alternatives to AsyncTask
LoaderManager class, For the More Curious: Alternatives to AsyncTask
loadLabel(PackageManager) method (ResolveInfo), Resolving an Implicit Intent
local files, SQLite Databases
local layout rect, Simple Property Animation
LocalBroadcastManager class, For the More Curious: Local Events, For the More Curious: Detecting the Visibility of Your Fragment
localization, Localization
location

about, Locations and Play Services

adding GPS permissions for, Location permissions

with Flickr Geosearch, Flickr Geosearch

Fused Location Provider, Google Play Services

testing, Play Services and Location Testing on Emulators

Location API, Locations and Libraries
LocationListener class, Getting a Location Fix
LocationRequest class, Getting a Location Fix
Log class

levels, For the More Curious: Log Levels and Methods

logging messages, Making log messages

methods, For the More Curious: Log Levels and Methods

Log.d(String, String, Throwable) method, Logging stack traces
Logcat, Using Logcat

(see also logging)

logging

of exceptions, Logging stack traces

Log.d(String, String, Throwable), Logging stack traces

messages, Making log messages

of stack traces, Logging stack traces

TAG constant, Making log messages

Looper class, Communicating with the Main Thread, Handler anatomy
LRU (least recently used) caching strategy, Challenge: Preloading and Caching
LRUCache class, Challenge: Preloading and Caching

M

m prefix for variable names, Wiring Up Widgets, Generating getters and setters
MAIN category, How Android Sees Your Activities, Resolving an Implicit Intent
main thread, You and Your Main Thread
makeText(…) method (Toast), Making Toasts
manifest

(see also manifest attributes)

about, Declaring activities in the manifest

adding network permissions to, Asking permission to network

adding service to, Creating an IntentService

adding uses-permission INTERNET, Asking permission to network

Android versions in, A sane minimum

build process and, For the More Curious: Android Build Process

declaring Activity in, Declaring activities in the manifest

manifest attributes

android:configChanges, Proper Rotation with WebView

android:protectionLevel, More about protection levels

MapFragment class, Setting Up Your Map
maps, Maps

adding markers to, Drawing on the map

API setup for, Getting a Maps API Key

getting lat-lon data for, Getting More Location Data

working with, Working with Your Map

Maps API

about, Getting a Maps API Key

key, Getting a Maps API Key

MapView class, Setting Up Your Map
margins, Margins vs padding
master-detail interfaces, UI Fragments and the Fragment Manager, Using ViewPager, Two-Pane Master-Detail Interfaces
matchers, for testing, Test Dependencies
match_parent, android:layout_width and android:layout_height
material design

about, Material Design

animation tools, Animation Tools

material surfaces, Material Surfaces

view components, View Components

mContext class, For the More Curious: The Application Context
-mdpi suffix, Adding an Icon
MediaStore class, Using a Camera Intent, Firing the intent
MediaStore.ACTION_IMAGE_CAPTURE, Using a Camera Intent
MediaStore.EXTRA_OUTPUT, Firing the intent
MenuItem class, Responding to menu selections
menus

(see also toolbar)

about, Menus

app:showAsAction attribute, Defining a menu in XML

creating, Creating the menu

creating XML file for, Defining a menu in XML

defining in XML, Defining a menu in XML

determining selected item, Responding to menu selections

populating with items, Creating the menu

as resources, Defining a menu in XML

responding to selections, Responding to menu selections

Message class, Message anatomy
message handlers, Message anatomy
message loop, Communicating with the Main Thread
message queue, Communicating with the Main Thread
messages, Message anatomy
minimum required SDK, A sane minimum
minSdkVersion, A sane minimum
mipmap images, For the More Curious: Mipmap Images
mock objects, for testing, Test Dependencies, Using mocked dependencies, For the More Curious: Mocks and Testing
model layer, Model-View-Controller and Android
model objects, Model-View-Controller and Android
model objects, from databases, Converting to model objects
Model-View-Controller

about, Model-View-Controller and Android

benefits, Benefits of MVC

drawbacks, Different Architectures: Why Bother?

flow of control, Model-View-Controller and Android

Model-View-ViewModel (MVVM), Different Architectures: Why Bother?
motion events, handling, Handling Touch Events
MotionEvent class

about, Handling Touch Events

actions, Handling Touch Events

getAction(), Handling Touch Events

MVC (see Model-View-Controller)
MVVM (Model-View-ViewModel), Different Architectures: Why Bother?

N

namespace

Android XML, The view hierarchy

app, The app namespace

naming conventions

for static variables, Singletons and centralized data storage

for style inheritance, Style inheritance

navigation, Enabling Hierarchical Navigation
network, checking availability of, Safe background networking
networking (HTTP), HTTP and Background Tasks, Networking Basics, Beyond the main thread
networking permissions, Asking permission to network
NetworkOnMainThreadException class, You and Your Main Thread
newInstance(…) method (Fragment), Attaching arguments to a fragment
9-patch images, For the More Curious: 9-Patch Images
Notification class, Notifications
NotificationManager class, Notifications
notifications

on Android Wear devices, Challenge: Notifications on Android Wear

posting, Notifications

notify(…) method (NotificationManager), Notifications
null coalescing (??) operator, More syntactic sugar
NullPointerException, Exceptions and Stack Traces

O

ObjectAnimator class, Simple Property Animation
Observable interface, Observable data
onActivityResult(…) method (Activity), Sending back an intent
onActivityResult(…) method (Fragment), Passing Data Between Two Fragments
OnCheckedChangeListener interface, Wiring widgets in a fragment
onClick(View) method (onClickListener), Using anonymous inner classes
OnClickListener interface, Setting listeners
onCreate(Bundle) method (Activity), The Activity Lifecycle
onCreate(Bundle) method (Fragment), Implementing fragment lifecycle methods
onCreateDialog(Bundle) method (DialogFragment), Creating a DialogFragment
onCreateOptionsMenu(Menu) method (Activity), Creating the menu
onCreateOptionsMenu(…) method (Fragment), Creating the menu
onCreateView(…) method (Fragment), Implementing fragment lifecycle methods
onCreateViewHolder(…) method, Implementing a ViewHolder and an Adapter, Preparing RecyclerView to Display Images
onDestroy() method (Activity), The Activity Lifecycle
onDraw(Canvas) method (View), Rendering Inside onDraw(Canvas)
onOptionsItemSelected(MenuItem) method (Fragment), Creating the menu, Responding to menu selections
onPause() method (Activity), The Activity Lifecycle
onPostExecute(…) method (AsyncTask), From AsyncTask Back to the Main Thread
onProgressChanged(…) method (WebChromeClient), Using WebChromeClient to spruce things up
onProgressUpdate(…) method (AsyncTask), For the More Curious: More on AsyncTask
OnQueryTextListener(…) interface (SearchView), Responding to SearchView user interactions
onReceivedTitle(…) method (WebChromeClient), Using WebChromeClient to spruce things up
onRestoreStateInstance(Parcelable) method (View), Challenge: Saving State
onResume() method (Activity), The Activity Lifecycle, Reloading the List
onResume() method (FragmentManager), Reloading the List
onSaveInstanceState(Bundle) method (Activity class, Saving Data Across Rotation
onSaveInstanceState(Bundle) method (Fragment), Implementing fragment lifecycle methods
onSaveStateInstance() method (View), Challenge: Saving State
onStart() method (Activity), The Activity Lifecycle
onStop() method (Activity), The Activity Lifecycle
onTextChanged(…) method (TextWatcher), Wiring widgets in a fragment
onTouchEvent(MotionEvent) method (View), Handling Touch Events
OnTouchListener interface (View), Handling Touch Events
openConnection() method (URL), Networking Basics
openFileInput(…) method (FileInputStream), File Storage
openFileOutput(…) method (FileInputStream), File Storage
openNonAssetFd(…) method, For the More Curious: Non-Assets?
options objects, Drawing on the map
overflow menu, Defining a menu in XML
@Override, Making log messages
overview screen, Exploring the activity lifecycle by example, Switching between tasks

P

PackageManager class

about, Checking for responding activities

querying, Firing the intent

resolveActivity(…), Checking for responding activities

packages, naming, Creating an Android Project
padding, Margins vs padding
Paint class, Rendering Inside onDraw(Canvas)
Parcelable interface, Rotation and Object Continuity, Challenge: Saving State
PendingIntent class, PendingIntent
permissions

adding to manifest, Asking permission to network

location, Location permissions

permission groups, Checking for permissions

providing rationale, Challenge: Permissions Rationale

requesting at runtime, Asking for Permission at Runtime

persistent data, Simple Persistence with Shared Preferences
photos

designating file location for, Designating a picture location

scaling and displaying bitmaps, Scaling and Displaying Bitmaps

taking with intents, Using a Camera Intent

PhotoView class, Scaling and Displaying Bitmaps
placeholders (in format strings), Using a Format String
Play Services (see Google Play Services)
PointF class, Handling Touch Events
post(…) method (Handler), Passing handlers
preferences (Android Studio), Generating getters and setters
preloading, Challenge: Preloading and Caching
presses, responding to, Responding to Presses
processes, For the More Curious: Processes vs Tasks
progress indicator

hiding, Using WebChromeClient to spruce things up

updating from background thread, For the More Curious: More on AsyncTask

projects

adding resources, Adding resources to a project

app/java directory, From Layout XML to View Objects

configuring, Creating an Android Project

creating, Creating an Android Project

gen directory, Resources and resource IDs

layout, Creating an Android Project

res/layout directory, Resources and resource IDs

res/menu directory, Defining a menu in XML

res/values directory, Resources and resource IDs

setting package name, Creating an Android Project

setting project name, Creating an Android Project

property animation (see animation)
protection level values, More about protection levels
publishProgress(…) method (AsyncTask), For the More Curious: More on AsyncTask
putCharSequence(…); method (Bundle), Fragment Arguments
putExtra(…) method (Intent), Putting an extra
putInt(…); method (Bundle), Fragment Arguments
putSerializable(…) method (Bundle), Fragment Arguments

Q

query(…) method, Reading from the Database

R

R class, Resources and resource IDs
randomUUID() method, Creating the Crime class
read() method (InputStream), Networking Basics
Recents button, Exploring the activity lifecycle by example
RecyclerView class

about, RecyclerView, Adapter, and ViewHolder

efficient reloading of, Challenge: Efficient RecyclerView Reloading

for display grid, Creating PhotoGallery

setOnItemClickListener(…), The Easy Way: Implicit Intents

vs ListView and GridView, For the More Curious: ListView and GridView

release key, For the More Curious: Android Build Process
remove(Fragment) method (FragmentTransaction), FragmentStatePagerAdapter vs FragmentPagerAdapter
request code (Activity), Getting a result back from a child activity
res/layout directory, Resources and resource IDs
res/menu directory, Defining a menu in XML
res/values directory, Creating string resources, Resources and resource IDs
resolveActivity(…) method (PackageManager), Checking for responding activities, Declaring Features
ResolveInfo class, Resolving an Implicit Intent
resource IDs

+ prefix in, Resources and resource IDs

about, Resources and resource IDs

resources

(see also configuration qualifiers, drawables, layouts, menus, string resources)

about, Resources and resource IDs

adding, Adding resources to a project

alias, Using an alias resource

alternative, Prioritizing alternative resources

vs assets, Importing Assets, For the More Curious: Why Assets, Not Resources

default, Default resources

localizing, Localization

location of, Resources and resource IDs

referencing in XML, Referencing resources in XML

string, android:text

result code (Activity), Setting a result
retained fragments, Retaining a fragment
retainInstance property (Fragment), Retaining a fragment, Rotation and retained fragments
rotation

activity lifecycle and, Rotation and the Activity Lifecycle

saving data across, Saving Data Across Rotation

with DatePicker, Setting a dialog’s contents

rows, inserting and updating, Inserting and updating rows
running on device, Running on a Device
RuntimeException class, Using exception breakpoints
RxJava, Using RxJava

S

s prefix for variable names, Generating getters and setters
sandbox, SQLite Databases
savedInstanceState, Rotation and Object Continuity
scale-independent pixel, Screen pixel densities and dp and sp
schema, database, Defining a Schema
screen orientation, Creating a landscape layout
screen pixel density, Adding an Icon, Screen pixel densities and dp and sp, Screen density works differently
screen size, determining, For the More Curious: More on Determining Device Size
SDK versions

(see also compatibility)

build target, Compile SDK version

codenames, Android SDK Versions

installing, Downloading Earlier SDK Versions

listed, Android SDK Versions

minimum required, A sane minimum

target, A sane minimum

updating, Downloading Earlier SDK Versions

search

about, Search

in Flickr, Searching Flickr

integrating into app, Search

user-initiated, Using SearchView

SearchView class

about, Using SearchView

bug, Responding to SearchView user interactions

OnQueryTextListener(…), Responding to SearchView user interactions

post-Honeycomb, Using SearchView

responding to user interactions, Responding to SearchView user interactions

Serializable class, Rotation and Object Continuity
services

adding to manifest, Creating an IntentService

bound, Bound services

lifecycle of, A service’s lifecycle

locally bound, Local service binding

non-sticky, Non-sticky services

notifying user, Notifications

purpose of, Background Services

remotely bound, Remote service binding

sticky, Sticky services

setArguments(…) method (Fragment), Attaching arguments to a fragment
setClassName(…) method (Intent), Creating Explicit Intents at Runtime
setComponent(ComponentName) method (Intent), Creating Explicit Intents at Runtime
setContentView(…) method (Activity), From Layout XML to View Objects
setHasOptionsMenu(boolean) method (Fragment), Creating the menu
setJavaScriptEnabled(…) method (WebSettings), The Harder Way: WebView
setOffscreenPageLimit(int) method (FragmentStatePagerAdapter), Integrating CrimePagerActivity
setOnClickListener(OnClickListener) method, Setting listeners
setOnItemClickListener(…) method (RecyclerView), The Easy Way: Implicit Intents
setOnTouchListener(…) method (View), Handling Touch Events
setPositiveButton(…) method (AlertDialog.Builder), Creating a DialogFragment
setRepeating(…) method (AlarmManager), Repeating alarms: not so exact
setResult(…) method (Activity), Setting a result, Getting Results with Fragments
setRetainInstance(…) method (Fragment), Retaining a fragment
setTargetFragment(…) method (Fragment), Setting a target fragment
setter methods, generating, Generating getters and setters
setText(int) method (TextView), Using intent extras
setTitle(int) method (AlertDialog.Builder), Creating a DialogFragment
setView(…) method (AlertDialog.Builder), Setting a dialog’s contents
shape drawables, Shape Drawables
ShapeDrawable class, Shape Drawables
shared element transitions, Shared element transitions
SharedPreferences class, Simple Persistence with Shared Preferences
shouldOverrideUrlLoading(…) method (WebViewClient), The Harder Way: WebView
show() method (Toast), Making Toasts
show(…) method (DialogFragment), Showing a DialogFragment
simulator (see emulator)
Single Responsibility Principle, Binding to Data
SingleFragmentActivity class, Creating BeatBox
singletons, Singletons and centralized data storage, For the More Curious: Singletons
snackbars, Snackbars
solutions file, Adding an Icon
SoundPool class

about, Unit Testing and Audio Playback

audio playback, Playing Sounds

creating, Creating a SoundPool

loading sounds into, Loading Sounds

rotation and object continuity with, Rotation and Object Continuity

SoundPool.release(), Unloading Sounds

unloading sounds, Unloading Sounds

SoundPool.release() method, Unloading Sounds
sp (scale-independent pixel), Screen pixel densities and dp and sp
SQLite databases

about, SQLite Databases

building, Building Your Initial Database

debugging, Debugging database issues

defining schema for, Defining a Schema

inserting and updating rows, Inserting and updating rows

model objects from, Converting to model objects

reading from, Reading from the Database

writing to, Writing to the Database

SQLiteDatabase.query(…) method, Reading from the Database
stack traces

in Logcat, Exceptions and Stack Traces

logging of, Logging stack traces

startActivity(Intent) method (Activity), Starting an Activity
startActivityForResult(…) method (Activity), Getting a result back from a child activity
startActivityForResult(…) method (Fragment), Getting Results with Fragments
state list animators, State list animators
state list drawables, State List Drawables
STREAM_MUSIC, Creating a SoundPool
string resources

about, android:text

creating, Creating string resources

referencing, Referencing resources in XML

String.replace(…) method, Wiring Up Assets for Use
String.split(…) method, Wiring Up Assets for Use
strings file, android:text, Creating string resources
strings, format, Using a Format String
strings.xml, Creating string resources
String[] class, File Storage
styles

about, Styles, themes, and theme attributes, Styles

inheritance, Style inheritance, For the More Curious: More on Style Inheritance

modifying button attributes, Modifying Button Attributes

themes and, Styles, themes, and theme attributes

styles.xml file, Styles
support libraries, Two types of fragments, For the More Curious: Fragments and the Support Library, For the More Curious: Why Support Fragments Are Superior

(see also AppCompat library)

SupportMapFragment class, Setting Up Your Map
SupportMapFragment.getMapAsync(…) method, Working with Your Map
-sw600dp suffix, Creating tablet alternatives
sync adapters, For the More Curious: Sync Adapters
system icons, Using Android Asset Studio

T

tables, creating, Building Your Initial Database
tablets

creating virtual devices for, Two-Pane Master-Detail Interfaces

user interfaces for, Two-Pane Master-Detail Interfaces

TAG constant, Making log messages
TalkBack

about, TalkBack

Android widgets’ inherent support, Explore by Touch

android:hint attribute, Using labels to provide context

android:labelFor attribute and, Using labels to provide context

enabling, TalkBack

linear navigation by swiping, Linear navigation by swiping

non-text elements and, Adding content descriptions

target fragments, Setting a target fragment
target SDK version, A sane minimum
targetSdkVersion, A sane minimum
tasks

about, Tasks and the Back Stack

and Back button, Tasks and the Back Stack

vs processes, For the More Curious: Processes vs Tasks

starting new, Starting a new task

switching between, Switching between tasks

temporal navigation, Enabling Hierarchical Navigation
TextView class

and tools:text, Creating a new activity

example, Laying Out the UI

inheritance, Challenge: From Button to ImageButton

setText(int), Using intent extras

TextWatcher interface, Wiring widgets in a fragment
theme attribute, Modifying the theme
themes

about, Themes

accessing attributes, For the More Curious: Accessing Theme Attributes

adding colors to, Adding Theme Colors

modifying, Modifying the theme

overriding attributes, Overriding Theme Attributes

styles and, Styles, themes, and theme attributes

threads

background (see background threads)

main, You and Your Main Thread

message queue, Communicating with the Main Thread

processes and, For the More Curious: Processes vs Tasks

as sequence of execution, You and Your Main Thread

UI, You and Your Main Thread

TimeInterpolator class, Using different interpolators
tinting, Adding Theme Colors
Toast class, Making Toasts
toasts, Making Toasts
toolbar

action bar vs, For the More Curious: Action Bar vs Toolbar

action views in, Using SearchView

app:showAsAction attribute, Defining a menu in XML

features, The Toolbar

menu, Menus

overflow menu, Defining a menu in XML

tools:text attribute, Creating a new activity
touch events, handling, Handling Touch Events
transformation properties

pivotX, View transformation properties

pivotY, View transformation properties

rotation, View transformation properties

scaleX, View transformation properties

scaleY, View transformation properties

translationX, View transformation properties

translationY, View transformation properties

translationZ, Elevation and Z values

transitions framework, for animation, Transitions
TypeEvaluator class, Color evaluation

U

UI fragments (see fragments)
UI thread, You and Your Main Thread
unit testing

@Before annotation, Setting Up Your Test

@Test annotation, Writing Tests

about, Unit Testing and Audio Playback

Espresso tool, For the More Curious: Espresso and Integration Testing

Hamcrest tool, Test Dependencies

vs integration testing, Creating a Test Class

JUnit testing framework, Creating a Test Class

matchers, Test Dependencies

mock objects, Test Dependencies, Using mocked dependencies

Mockito tool, Test Dependencies, Using mocked dependencies

testing frameworks, Creating a Test Class

testing object interactions, Testing object interactions

Up button, Enabling Hierarchical Navigation, How hierarchical navigation works
update(…) method, Inserting and updating rows
Uri class, Firing the intent
Uri.Builder class, Fetching JSON from Flickr
URL class

for making URL from string, Networking Basics

openConnection(), Networking Basics

URLConnection class, Networking Basics
user interfaces

defined by layout, App Basics

for tablets, Two-Pane Master-Detail Interfaces

laying out, Laying Out the UI

UUID.randomUUID() method, Creating the Crime class

V

variable names

conventions for, Generating getters and setters

prefixes for, Generating getters and setters

variables view, Setting breakpoints
versions (Android SDK) (see SDK versions)
versions (firmware), Android SDK Versions
View class

(see also views, widgets)

draw(), Rendering Inside onDraw(Canvas)

getBottom(), Simple Property Animation

getHeight(), Simple Property Animation

getLeft(), Simple Property Animation

getRight(), Simple Property Animation

getTop(), Simple Property Animation

invalidate(), Tracking across motion events

OnClickListener interface, Setting listeners

onDraw(Canvas), Rendering Inside onDraw(Canvas)

onRestoreStateInstance(Parcelable), Challenge: Saving State

onSaveStateInstance(), Challenge: Saving State

onTouchEvent(MotionEvent), Handling Touch Events

setOnTouchListener(…), Handling Touch Events

subclasses, Laying Out the UI, Challenge: From Button to ImageButton

view components, View Components
view hierarchy, The view hierarchy
view layer, Model-View-Controller and Android
view models, Binding to Data
view objects, Model-View-Controller and Android
ViewGroup class, The view hierarchy, Creating a landscape layout
ViewHolder class, ViewHolders and Adapters, Implementing a ViewHolder and an Adapter, Resolving an Implicit Intent
ViewPager class

about, Using ViewPager

internals of, For the More Curious: How ViewPager Really Works

in support library, Creating CrimePagerActivity

views

adding in graphical editor, Adding widgets

creating custom views, Creating a Custom View

creation by RecyclerView, RecyclerView, Adapter, and ViewHolder

custom, Creating a Custom View

invalid, Rendering Inside onDraw(Canvas)

laying out in code, For the More Curious: Laying Out Views in Code

persisting, Challenge: Saving State

simple vs composite, Creating a Custom View

size settings, Making room

touch events and, Handling Touch Events

using fully qualified name in layout, Creating BoxDrawingView

ViewTreeObserver class, Challenge: Efficient Thumbnail Load
virtual devices (see emulator)

W

web content

browsing via implicit intent, The Easy Way: Implicit Intents

displaying within an activity, The Harder Way: WebView

enabling JavaScript, The Harder Way: WebView

web rendering events, responding to, The Harder Way: WebView
WebChromeClient interface

about, Using WebChromeClient to spruce things up

for enhancing appearance of WebView, Using WebChromeClient to spruce things up

onProgressChanged(…), Using WebChromeClient to spruce things up

onReceivedTitle(…), Using WebChromeClient to spruce things up

WebSettings class, The Harder Way: WebView
WebView class

for presenting web content, The Harder Way: WebView

handling rotation, Proper Rotation with WebView

WebViewClient class, The Harder Way: WebView
widgets

about, Laying Out the UI

attributes of, Laying Out the UI

Button, Laying Out the UI, Challenge: From Button to ImageButton

DatePicker, Setting a dialog’s contents

defining in XML, Laying Out the UI

EditText, Defining CrimeFragment’s layout

FrameLayout, Creating a landscape layout

ImageButton, Challenge: From Button to ImageButton

LinearLayout, Laying Out the UI, The view hierarchy

margins, Margins vs padding

padding, Margins vs padding

references, Getting references to widgets

styles and, Styles

from support library, Creating CrimePagerActivity

TextView, Laying Out the UI, Creating a new activity

in view hierarchy, The view hierarchy

as view layer, Model-View-Controller and Android

wiring in fragments, Wiring widgets in a fragment

wiring up, Wiring Up Widgets

wrap_content, android:layout_width and android:layout_height

X

-xhdpi, -xxhdpi, -xxxhdpi suffixes, Adding an Icon
XML

Android namespace, The view hierarchy

referencing resources in, Referencing resources in XML

XML drawables (see drawables)
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.117.81.240