^
, boolean logical exclusive OR 507, 509
truth table 509
,
(comma) formatting flag 499
--
, predecrement/postdecrement 491
truth table 510
!=
, not equals 442
?:
, ternary conditional operator 477
.
dot separator 454
{
, left brace 429
}
, right brace 429
@Override
annotation 630
*
wildcard in a file name 455
*=
, multiplication assignment operator 492
/* */
traditional comment 429
//
, end-of-line comment 429
/=
, division assignment operator 492
, backslash escape sequence 433
"
, double-quote escape sequence 433
, newline escape sequence 433
, carriage-return escape sequence 433
, horizontal tab escape sequence 433
&
, boolean logical AND 507, 509
truth table 508
%=
, remainder assignment operator 492
%d
format specifier 437
%s
format specifier 434
–
(minus sign) formatting flag 498
++
, preincrement/postincrement 491
+=
, addition assignment operator 491
<
, less than 443
<=
, less than or equal 443
<activity>
element launchMode
168
=
, assignment operator 437
-=
, subtraction assignment operator 492
==
to determine whether two references refer to the same object 647
==
, is equal to 442
>
, greater than 443
>=
, greater than or equal to 443
|
, boolean logical inclusive OR 507, 509
truth table 509
0
flag 555
0
format flag 596
100
Destinations 5
abbreviating assignment expressions 491
abs
method of Math
521
absolute value 521
abstract data type (ADT) 595
abstract
keyword 653
abstract method 653, 654, 657, 716
abstract superclass 653
Abstract Window Toolkit Event package 528
addActionListener
method 721
setRolloverIcon
method 721
accelerometer 17
listening 198
access Android services 147
contentDescription
property 69
Explore by Touch 9, 38, 40, 68
TalkBack localization 73
Accessibility APIs 9
accessing Android content providers 15
acquire the lock 753
action bar 80
action
element of the manifest file 106
action to execute 474
ACTION_SEND
constant of class Intent
329
ACTION_VIEW
constant of classIntent
327
ActionEvent
class 713, 714, 718
getActionCommand
method 714, 721
ActionListener
interface 713, 717
actionPerformed
method 713, 716
actionPerformed
method of interface ActionListener
713, 716
activation record 526
Activity
states 80
activity 79
findFragmentById
method 119, 148
getFragmentManager
method 119, 164
getMenuInflater
method 149
getString
method with mulitple arguments 329
getSystemService
method 198
host a Fragment
119
onCreateOptionsMenu
method 118, 149
onOptionsItemSelected
method 118, 150
onPause
method 181
onResume
method 181
onStop
method 181
runOnUiThread
method 258
sent to background 237
setContentView
method 99
setRequestedOrientation
method 148
setVolumeControlStream
method 232, 237
activity
element in AndroidManifest.xml
104
Activity Not Responding (ANR) dialog 277, 349
Activity
templates 45
activity_main.xml
51
ActivityNotFoundException
class 124, 312
Adapter
class 277
adapter class 725
AdapterView
class 277
add
method
ArrayList<T>
588
LinkedList<T>
736
add
method of class FragmentTransaction
375
addActionListener
method
of class AbstractButton
721
of class JTextField
713
addAll
method
Collections
737
List
734
addCallback
method of class SurfaceHolder
251
addFirst
method of LinkedList
736
addItemDecoration
method of class RecyclerView
323
addition compound assignment operator, +=
491
addLast
method of LinkedList
736
addPreferencesFromResource
method of class PreferenceFragment
166
Address Book app xxvi
addToBackStack
method of class FragmentTransaction
376
adjustViewBounds
property of an ImageView
140
AdMob 413
advertising revenue 413
airplane mode 297
AlertDialog.Builder
class 123
algebraic notation 439
in Java Collections Framework 737
alpha (transparency) values 59
alpha
animation for a View
133
alpha
method of class Color
217
alternative-resource naming conventions 70
Amazon Mobile app 413
Analog Clock App exercise 268
analysis 20
Android 2.2 (Froyo) 7
Android 2.3 (Gingerbread) 7
Android 3.x
Honeycomb 8
Android 4.0 (Ice Cream Sandwich) 8
Android 6.0 (Marshmallow)
permissions 175, 184, 189, 203
Android APIs 4
Android app marketplaces 419
Amazon Appstore 419
AndroidPIT 419
Appitalism 419
GetJar 419
Moborobo 419
Opera Mobile Store 419
SlideMe 419
Android Cloud to Device Messaging (C2DM) 7
Android Design Support Library xxix, 126, 127, 278, 279, 314
Android developer documentation xxxii
Android Developers Blog 409
Android device manufacturers xxv
Android Device Monitor 410
Android device type for a project 42
Android for Programmers website xxvi
Android How to Program, 2/e website xxvi
Android Jelly Bean 9
Android KitKat 10
Android Lint 62
Android Lollipop 11
Android Market
language 417
location 418
price 418
Android Marshmallow 12
Android Newsgroups Android Discuss 33
Android Programming Quiz App exercise 171
Android project
values
folder 57
Android SDK xxv, xxviii, xxxvii, xl, 2, 16, 35
versions and API levels 44
Android services access 147
Android Software Development Kit (SDK) xxxix
Android source code and documentation
FAQs 4
licenses 4
Android Studio xxxvii, xxxix, 2, 16, 38, 39
documentation 33
layout editor 38, 39, 40, 46, 48, 49, 51, 54, 62, 69
Screen Record tool 411
Android Support Library xxx, 80, 81, 119, 184, 185, 214
Android TV xxx
Android versions
Android 1.5 (Cupcake) 7
Android 1.6 (Donut) 7
Android 2.0–2.1 (Eclair) 7
Android 2.2 (Froyo) 7
Android 2.3 (Gingerbread) 7
Android 3.0–3.2 7
Android 4.0 (Ice Cream Sandwich) 7
Android 4.1–4.3 7
Android 4.4 7
Android 5 7
Android 6.0 (Marshmallow) 7
Android Virtual Device (AVD) xl, 16
Setting hardware emulation options 30
Android Virtual Device Manager 24
Android Virtual Devices (AVDs) xl, 24
Android Wear xxx
android
XML namespace 187
android:allowBackup
attribute of the manifest application
element 104
android:background
attribute of a TextView
354
android:colorAccent
92
android:colorPrimary
92
android:colorPrimaryDark
92
android:duration
attribute of a translate
animation 134
android:fromXDelta
attribute of a translate
animation 134
android:icon
attribute of the manifest application
element 104
android:id
attribute 56
android:label
attribute of the manifest activity
element 105
android:label
attribute of the manifest application
element 104
android:layout_gravity
attribute 62
android:name
attribute of the manifest activity
element 105
android:screenOrientation
attribute of the manifest activity
element 105
android:startOffset
attribute of a translate
animation 134
android:supportsRtl
attribute of the manifest application
element 104
android:theme
attribute of the manifest application
element 104
android:toXDelta
attribute of a translate
animation 134
android:windowSoftInputMode
attribute of the manifest activity
element 105
android.app
package 79, 118, 119, 123, 349
android.content
package 120, 147, 183, 349, 362
android.content.res
package 120, 122, 148
android.database
package 348
android.database.sqlite
package 348, 367
android.graphics
package 183
android.graphics.drawable
package 160
android.intent.action.MAIN
106
android.intent.category.LAUNCHER
106
android.media
package 231, 232
android.net
package 327
android.os
package 96, 122, 277
android.permission.WRITE_EXTERNAL_PERMISSION
184
android.preference
package 118
android.provider
package 348, 363
android.support.design.widget
package 279
android.support.v4.app
package 118, 119
android.support.v7.app
package 80, 96
android.support.v7.widget
package 312
android.view.animation
package 122
android.view.inputmethod
package 294
android.widget
package 81, 84, 97, 122, 277, 278
Android@Home framework 9
AndroidLicenser 419
AndroidManifest.xml
84, 125, 126
action
element 106
activity
element 104
application
element 104
category
element 106
intent-filter
element 106
manifest
element 104
provider
element 351
anim
folder of an Android project 48, 120, 121
animation xxxi, 115
alpha
animation for a View
133
framework 8
manual 232
options in an XML file 122
rotate
animation for a View
133
scale
animation for a View
133
set
133
thread 232
translate
animation for a View
133
tween 133
View
based 133
animation circular reveal 161
Animation
class 122
setRepeatCount
method 122, 156
Animator
class
circular reveal 123
setDuration
method 123
start
method 123
animator
folder of an Android project 48, 120, 121
AnimatorListenerAdapter
class 162
onAnimationEnd
method 162
annotation @Override
630
anonymous inner class 79, 82, 712, 724
anonymous inner classes 708
ANR (activity not responding) dialog 277, 349
ANR (Application Not Responding) dialog 98, 312
anti-aliasing 207
API (application programming interface) 435, 519
API key (web services) 274
.apk
file (Android application package file) 409
app xxxvii
app development xxxvii
app icon
adding 53
app linking 13
app platforms
Android 420
iPhone 420
Windows 420
app review sites
Android and Me 422
Android App Review Source 422
Android Police 422
AndroidGuys 422
AndroidLib 422
AndroidPIT 422
Androinica 422
AppBrain 422
Appolicious 422
Appstorm 422
AppZoom 422
Best Android Apps Review 422
Phandroid 422
app review video sites
Appolicious 422
Crazy Mike’s Apps 422
Life of Android 422
State of Tech 422
app templates xxix
app
XML namespace 187
AppCompatActivity
class 80, 96, 97
app-driven approach 2
appendWhere
method of a SQLiteQueryBuilder
368
command-line arguments 522
application
element in AndroidManifest.xml
104
Application Not Responding (ANR) dialog 98, 312
application programming interface (API) 519
application resource 15
apply
method of class SharedPreferences.Editor
151, 326
apps in the book xxvi
area of a circle 545
ARGB 215
ARGB color scheme 177
argb
method of class Color
218
ARGB_8888
constant 208
argument promotion 526
arithmetic calculation 439
arithmetic compound
assignment operators 491
arithmetic mean 441
arithmetic operators 439
arithmetic overflow 694
ArithmeticException
class 688, 694
bounds checking 556
ignoring element zero 558
length
instance variable 549
pass an array element to a method 565
pass an array to a method 565
array-access expression 548
array-creation expression 549
array initializer 552
for multidimensional array 574
nested 574
array of one-dimensional arrays 574
getView
method 287
arraycopy
method of class System
583, 585
ArrayIndexOutOfBoundsException
class 556, 558
ArrayList<T>
generic class 586, 730
add
method 588
clear
method 586
get
method 588
indexOf
method 586
size
method 588
trimToSize
method 586
Arrays
class 583
binarySearch
method 583
equals
method 583
fill
method 583
sort
method 583
ART runtime 12
ascending order 583
asList
method of Arrays
735
asset 416
AssetManager
class 120
list
method 157
assets
folder of an Android app 120
assign a value to a variable 437
Assigning superclass and subclass references to superclass and subclass variables 651
assignment operator, =
437, 445
assignment operators 491
assignment statement 437
associate
right to left 487
associativity of operators 440, 445
left to right 445
right to left 440
asynchronous event 694
AsyncTask
class 277, 290, 291, 296, 349
execute
method 289
AsyncTaskLoader
class 349
attribute
of a class 18
AttributeSet
class 250
audio xxxi, 15
audio stream 231
audio volume 232
AudioAttributes
class 232
AudioAttributes.Builder
class 251
setAudioAttributes
method 251
authority (ContentProvider
) 361
auto-unboxing 729
autoboxing 729
automatic backup 13
automatic garbage collection 697
AVD (Android Virtual Device) xl, 16
AWTEvent
class 715
back stack 347, 375, 376, 377, 378
push 376
background
activity sent to 237
background
property of a view 90, 91
backing array 735
backslash () 433
base Uri
of a ContentProvider
361
BaseColumns
interface 363
BasePlusCommissionEmployee
class extends CommissionEmployee
663
beginTransaction
method of class FragmentManager
375
behavior
Bezier curve 212
bidirectional iterator 734
BigDecimal
class 466
BigInteger
class 754
binary file 744
binarySearch
method
of Collections
737
bind data to a ListView
277
bitmap encoding 208
createBitmap
method 208
eraseColor
method 222
recycle
method 208
Bitmap.Config.ARGB_8888
constant 208
BitmapFactory
class 291
decodeStream
method 291
bitwise operators 507
Blackjack App exercise 339
enhanced 339
Blank Activity template 45
blank line 429
block 478
Block Breaker Game App exercise 226
enhanced 226
blue
method of class Color
217
Bluetooth Health Devices 9
bluetooth stylus support 13
body
of a class declaration 429
of a loop 479
of a method 430
of an if
statement 442
Body Mass Index Calculator App exercise 109
book-title capitalization 718
Boolean
class 729
boolean
expression 477
promotions 527
boolean logical AND, &
507, 509
boolean logical exclusive OR, ^
507, 509
truth table 509
boolean logical inclusive OR, |
509
boolean
primitive type 477, 765
Bouncing Ball Game App exercise 268
bounds checking 556
boxing conversion 729
braces ({
and }
) 478, 496, 552
not required 504
brand awareness 413
branding apps
Amazon Mobile 413
Bank of America 413
Best Buy 413
CNN 413
Epicurious Recipe 413
ESPN ScoreCenter 413
NFL Mobile 413
NYTimes 413
Pocket Agent 413
Progressive Insurance 413
UPS Mobile 413
USA Today 413
Wells Fargo Mobile 413
Women’s Health Workouts Lite 413
Brick Game App exercise 267
brittle software 642
broadcast receiver 79
Build.VERSION_SDK_INT
264
bulk operation 730
for an Intent
330
putParcelable
method 376
button 718
Button
class
lines
property 142
textColor
property 142
button label 718
byte-based stream 744
Byte
class 729
byte
keyword 765
byte
primitive type 500
promotions 527
bytecode 431
C2DM (Android Cloud to Device Messaging) 7
calculations 446
Calendar API 9
call-by-reference 567
call-by-value 567
callback methods 348
calling method (caller) 453, 460
camera 5
Cannon Game App exercise 267
canRead
method of File
746
Canvas
class 183
drawBitmap
method 209
drawCircle
method 247
drawLine
method 244
drawRect
method 258
drawText
method 259
canWrite
method of File
746
Car Payment Calculator App exercise 109
Card Game Apps exercise 340
card games 559
card shuffling
Fisher-Yates 562
carriage return 433
carrier billing 412
case-insensitive sort 323
case
keyword 504
case sensitive 429
casino 531
cast
downcast 651
catch
a superclass exception 696
an exception 689
catch
block 692, 692, 694, 697, 700, 703
clause 692
keyword 692
Catch
block 558
catch-or-declare requirement 695
Catching Exceptions Using Class Exception
exercise 706
Catching Exceptions Using Outer Scopes exercise 706
Catching Exceptions with Superclasses exercise 706
category
element of the manifest file 106
cd
to change directories 431
ceil
method of Math
521
cell in a GridLayout
84
Celsius 726
equivalent of a Fahrenheit temperature 545
change directories 431
char
keyword 765
promotions 527
character
constant 506
character-based stream 744
Character
class 729
character string 430
characteristics of great apps 31
checkbox 718
checked exception 695
check-in 421
circular reveal animation 161
circular reveal Animator
123
circumference 449
class
keyword 453
data hiding 459
declaration 429
declare a method 452
default constructor 463
field 458
file 431
get method 601
instance variable 20, 458, 521
instantiating an object 452
name 429
set method 601
class-average problem 479, 480, 484, 485
class cannot extend a final class 670
.class
file 431
separate one for every class 599
class instance creation expression 454, 464
class library 4
class method 520
class name
fully qualified 458
classwide information 614
classes
ActivityNotFoundException
124, 312
Adapter
277
AdapterView
277
AlertDialog
123
AlertDialog.Builder
123
Animation
122
AnimatorListenerAdapter
162
ArithmeticException
688
ArrayIndexOutOfBoundsException
556, 558
Arrays
583
AssetManager
120
AsyncTaskLoader
349
AttributeSet
250
AWTEvent
715
BigDecimal
466
BigInteger
754
BitmapFactory
291
Boolean
729
Byte
729
Canvas
183
Character
729
Color
217
ContentResolver
183, 349, 361, 366, 369, 370, 372, 373, 393, 399
ContentUris
362
Context
147
CoordinatorLayout
126
Cursor
348
CursorFactory
364
CursorLoader
349
DialogInterface
124
Double
729
Drawable
160
EnumSet
613
Error
695
EventListenerList
717
Exception
694
ExecutionException
756
Executors
749
File
745
FileInputStream
745
FileOutputStream
745
FileReader
745
FileWriter
745
Float
729
FloatingActionButton
278
FlowLayout
711
Formatter
745
Fragment
118
FragmentTransaction
119, 347, 375, 376
FrameLayout
235
Handler
122
HashMap
741
HashSet
740
Hashtable
741
HttpURLConnection
291
IndexOutOfRangeException
558
InputMethodManager
294
InputMismatchException
689
InputStream
160
Integer
729
InterruptedException
750
JComboBox
722
JSONArray
277
JSONObject
276
KeyEvent
718
LayoutInflater
119
LinearLayoutManager
313
LinkedList
730
ListPreference
120
Long
729
Math
520
MediaStore
183
MediaStore.Images.Media
183
MenuInflater
149
MotionEvent
183, 210, 231, 262
MouseAdapter
725
MouseEvent
717
MultiSelectListPreference
120
ObjectInputStream
745
ObjectOutputStream
745
Paint
183
Path
183
Preference
120
PreferenceFragment
118, 120, 166
PreferenceManager
120, 146, 147
PrintHelper
214
R
99
R.drawable
99
R.id
99
R.layout
99
R.string
99
RecyclerView.Adapter
313, 323, 351
RecyclerView.ItemDecoration
313, 323, 351
RecyclerView.LayoutManager
313
RecyclerView.ViewHolder
313
RelativeLayout
50
Resources
148
RuntimeException
695
ScrollView
357
Sensor
182
SensorEvent
201
SensorManager
198
SharedPreferences
120, 311, 321
SharedPreferences.Editor
120, 151, 312, 325, 326
Short
729
SQLiteDatabase
348
SQLiteOpenHelper
348
SQLiteQueryBuilder
367
StackTraceElement
703
SwingWorker
754
TreeMap
741
TreeSet
740
UnsupportedOperationException
735
UriMatcher
365
ViewAnimationUtils
123
ViewGroup
357
CLASSPATH
environment variable 432
clear
method
of ArrayList<T>
586
of List<T>
735
click a button 709
click the mouse 721
click the scroll arrows 724
client
of an object 462
client area 39
client code 650
clone
method of Object
647
cloning objects
deep copy 647
shallow copy 647
close a window 709
cloud computing 7
code file 416
code highlighting xxxi, 2
code license xxxiii
code reuse 623
code walkthrough 3
code-completion 48
code-completion window 55
code-folding xxxix
shuffle 160
collection hierarchy 729
Collection
interface 729, 732, 737
contains
method 732
iterator
method 732
addAll
method 737
binarySearch
method 737
copy
method 737
fill
method 737
max
method 737
min
method 737
reverse
method 737
reverseOrder
method 738
collections framework 728
College Loan Payoff Calculator App exercise 109
collision detection 232, 246, 255
color 183
hue 83
shade 83
Color
class 217
alpha
method 217
argb
method 218
blue
method 217
green
method 217
red
method 217
color
folder of an Android project 48, 120, 121
color state list 123
color state list resource 131
color state list resource file 123
colorAccent
92
colorPrimary
92
colorPrimaryDark
92
colors.xml
131
column 573
columnCount
property of a GridLayout
86
columns of a two-dimensional array 573
combo box 722
comma (,
) formatting flag 499
comma-separated list
of arguments 434
of parameters 523
command button 718
command line 430
command-line argument 522
Command Prompt 430
command window 430
comment
end-of-line (single-line), //
429, 430
single line 430
CommissionEmployee
class derived from Employee
662
commit
method of class FragmentTransaction
375
commit
method of class SharedPreferences.Editor
152
company domain name used in a package 42
Comparable<T>
interface 682, 737
compareTo
method 737
Comparator
interface 737
compare
method 738
Comparator
object 741
Comparator<String>
object
String.CASE_INSENSITIVE_ORDER
323
compare
method of interface Comparator
738
compareTo
method
of Comparable
737
comparison operator 682
compilation error 429
compile 431
compile-time type safety 728
compiler error 429
compiling an application with multiple classes 455
compiling apps 407
component of an array 548
Component Tree window in Android Studio 47, 77, 81, 86, 141
compound assignment operators 491
compound interest 497
computer-assisted instruction (CAI) 546
computer-assisted instruction (CAI): Reducing Student Fatigue 546
computer-assisted instruction (CAI): Varying the Types of Problems 546
Computer Assisted Instruction App exercise 172
computer-assisted instruction (CAI)
exercise 172
computers in education 546
concatenate strings 616
concatenation 524
concrete class 653
concrete subclass 658
Concurrency API 748
concurrent documents and activities 12
concurrent operations 747
concurrent programming 748
condition 442
truth table 508
conditional expression 477
conditional operator,?
: 477
truth table 509
Configuration
class 122, 148, 149
orientation
instance variable 122
confusing the equality operator ==
with the assignment operator =
445
consistent state 601
constant 618
in an interface 682
Math.PI
449
constant integral expression 500, 506
constant variable 506, 553, 618
must be initialized 553
Constants
MODE_PRIVATE
322
MODE_WORLD_READABLE
322
MODE_WORLD_WRITABLE
322
call another constructor of the same class using this
604
multiple parameters 465
no argument 604
overloaded 601
parameter list 464
Constructor failure exercise 706
constructors cannot specify a return type 464
consume an event 713
Container
class
setLayout
method 711
contains
method
of Collection
732
contains
method of class ArrayList<T>
586, 588
containsKey
method of Map
743
content provider 79
contentDescription
property 69
contentDescription
property of a View
140
ContentProvider
base Uri
361
ContentProvider
authority 361
ContentProvider
class 348, 365
delete
method 372
getType
method 367
insert
method 369
onCreate
method 366
query
method 367
update
method 371
ContentResolver
class 183, 349, 361, 366, 369, 370, 372, 373, 393, 399
delete
method 399
insert
method 393
update
method 393
ContentUris
class 362
Context
class 147
getSharedPreferences
method 322
getSystemService
method 294
startActivity
method 327
ContextWrapper
class
continue
statement 507
control statement 475
control variable 479, 494, 495
controlling expression of a switch
504
controls 708
Cooking with Healthier Ingredients App exercise 403
coordinating efforts between separate apps 105
CoordinatorLayout
class 126
copy
method of Collections
737
copying objects
deep copy 647
shallow copy 647
core package 431
corners
element of a shape
354
cos
method of Math
521
cosine 521
counter 479
counter-controlled repetition 479, 480, 486, 494, 495
Country Quiz App exercise 171
CraigsList 301
craps (casino game) 172, 531, 546
Craps Game App exercise 172
modification 172
crash report 419
create a new layout 144
create a package 618
create an object of a class 454
Create New Project dialog 41, 85, 86, 126, 184, 233, 279, 314, 350
createBitmap
method of class Bitmap
208
createChooser
method of class Intent
330
createCircularReveal
method of class ViewAnimationUtils
123, 162
createFromStream
method of class Drawable
160
creating a dimension resource 58
creating and initializing an array 551
creative commons public license 274
credit limit on a charge account 515
Crossword Puzzle Generator App exercise 300
cryptographic key 407
CT
Google Play and App Business Issues 405
<Ctrl>-d 503
ctrl key 503
<Ctrl>-z 503
Cursor
class 348
getColumnIndex
method 387
getLong
method 387
getString
method 387
moveToPosition
method 387
setNotificationUri
method 369
CursorFactory
class 364
CursorLoader
class 349
custom subclass of View
248
custom view 182
customize the keyboard 358
Daily Deals Mashup App exercise 301
dark keyboard 77
data binding 277
Data Binding support library 100
data hiding 459
data structure 548
database
version number 364
date 528
Date
class exercise 621
Daydream 10
DDMS perspective
LogCat tab 124
dealing 559
debugging
decimal integer formatting 437
decision 442
declaration
class 429
method 430
declare a method of a class 452
decodeStream
method of class BitmapFactory
291
decrement of a control variable 494
decrement operator, --
491
deep copy 647
default
case in a switch
504, 506
default constructor 463, 607, 629
default exception handler 703
default initial value 461
default package 458
default preferences 146
default resources 70
default value 461
define a new style 353
Deitel Buzz Online Newsletter 424
Deitel Facebook page 421
Deitel Training 425
delegation event model 715
delete
method of a ContentProvider
372
delete
method of a ContentResolver
399
delete
method of class SQLiteDatabase
373
density-independent pixels
dp
58
dependencies
adding to project 314
deserialized object 747
design preview in layout XML editor 48
design process 20
Design tab in the layout editor 39
developer documentation
Core App Quality 407
Keeping Your App Responsive 33
Launch Checklist 407
Localization Checklist 407
Performance Tips 33
Signing Your Applications 409
Tablet App Quality 407
developer options 10
developer registration 415
device configuration 15
Device Screen Capture window 410
dialog
negative action 123
neutral action 123
positive action 123
DialogFragment
class 119, 164, 165
onCreateDialog
method 164
show
method 164
DialogInterface
class 124
DialogInterface.OnClickLis tener
interface 124, 165
diameter 449
dice game 531
digit 436
digital certificate 409
Digital Clock App exercise 268
digitally sign your app 409
digits
property of an EditText
90
@dimen
resource 58
dimens.xml
139
creating 58
Direct Share 13
name 745
disconnect
method of class HttpURLConnection
291
disk I/O completion 694
dispatch
an event 717
display a line of text 430
display output 446
distance between values (random numbers) 530
divide-and-conquer approach 520
divide by zero 688
divider
property of a LinearLayout
355
division compound assignment operator, /=
492
do...while
repetition statement 476, 499
document a program 428
documentation
Android Design 33
App Components 32
Class Index 32
Data Backup 33
Debugging 33
Getting Started with Publishing 33
Google Play Developer Distribution Agreement 33
Launch Checklist (for Google Play) 33
Managing Your App’s Memory 33
Package Index 32
Security Tips 33
Tools Help 33
Using the Android Emulator 32
doInBackground
method of class AsyncTask
290, 296
dollar signs ($
) 429
domain name used in a package 42
Doodlz app xxvi
Doodlz App exercise 226
dot (.
) separator 454, 499, 520, 614
(double)
cast 487
Double
class 729
double equals, ==
445
double-precision floating-point number 466
double
primitive type 436, 465, 466, 484, 765
promotions 527
double-selection statement 476
downcast 668
downcasting 651
downloading source code xxxii
dp
(density-independent pixels) 58
drag event 212
drag the scroll box 724
draw
circles 183
lines 183
text 183
Drawable
class 160
createFromStream
method 160
drawable
folder of an Android project 49
Drawable
resource
shape
element 354
drawBitmap
method of class Canvas
209
drawCircle
method of class Canvas
247
drawing characterstics 183
color 183
font size 183
line thickness 183
drawLine
method of class Canvas
244
drawPath
method of class Canvas
209, 213
drawRect
method of class Canvas
258
drawText
method of class Canvas
259
drive sales 413
driver class 453
drop-down list 722
dummy value 484
Duplicate Elimination 591
dynamic binding 667
dynamic resizing 548
e
method of class Log
157
echo character of class JPasswordField
709
edit
method of class SharedPreferences
151, 325
Editable
interface 96
EditText
digits
property 90
input type 87
maxLength
property 90
restrict maximum number of digits 81
element of an array 548
elevation 127
elevation
property of a view 83, 90, 91
eligible for garbage collection 617
eliminate resource leaks 697
Employee
abstract superclass 657
Employee
class hierarchy test program 665
Employee
class that implements Payable
677
empty statement (a semicolon, ;
) 445
empty string 714
gestures 17
emulator functionality 17
emulator gestures and controls 17
encapsulation 20
“end of data entry” 484
end-of-file (EOF)
indicator 503
marker 744
end-of-line (single-line) comment, //
429, 430
End User License Agreement (EULA) 407
enhanced for
statement 563
Enhancing Class Time2
exercise 620
Enter (or Return) key 716
enum
534
constant 611
constructor 611
declaration 611
EnumSet
class 613
keyword 534
values
method 612
enumeration 534
enumeration constant 534
EnumSet
class 613
range
method 613
environment variable
CLASSPATH
432
PATH
431
equal likelihood 529
equality operators 442
equals
method
of class Arrays
583
of class Object
647
eraseColor
method of class Bitmap
222
Error
class 695
escape character 433
, backslash 433
"
, double-quote 433
, horizontal tab 433
Euclid’s Algorithm 545
event classes 715
event-dispatch thread (EDT) 753
event driven 709
event handling 79, 709, 712, 716
event source 713
event ID 718
adapter class 725
interface 712, 713, 716, 717, 725
event object 715
event registration 713
EventListenerList
class 717
EventObject
class getSource
method 714
events 4
examination-results problem 489
Exception
class 694
handler 558
handling 556
IndexOutOfRangeException
558
parameter 559
exceptions handler 692
exceptions parameter 692
execSQL
method of class SQLiteDatabase
364
executable components
activity 79
broadcast receiver 79
content provider 79
service 79
execute
method of class AsyncTask
289
execute
method of the Executor
interface 749, 751, 752
ExecutionException
class 756
Executor
interface 749
Executors
class 749
newCachedThreadPool
method 750
ExecutorService
interface 749
shutdown
method 752
exists
method of File
746
exit
method of class System
697
exp
method of Math
521
Expense Tracker App exercise 403
explicit conversion 487
exponential method 521
exponentiation operator 499
expression 437
extend a class 623
extensibility 650
Extensible Markup Language (XML) 40
externalizing resources 56
FAB (floating action button) 278
Fabric (Twitter’s mobile development platform) 336
face detection 9
Deitel 421
Deitel page 421
Fahrenheit 726
equivalent of a Celsius temperature 545
fatal error 479
fatal logic error 479
fault tolerant 437
fault-tolerant program 558
Favorite Websites App exercise 338
featured image 409
Fibonacci series 592
field 458
default initial value 461
field of a class 535
field width 498
file 744
File
class 745
canRead
method 746
canWrite
method 746
exists
method 746
File
methods 746
getAbsolutePath
method 746
getName
method 746
getParent
method 746
getPath
method 746
isAbsolute
method 746
isDirectory
method 746
lastModified
method 746
length
method 746
list
method 746
File
methods 746
file processing 745
FileInputStream
class 745, 747
FileOutputStream
class 745, 747
FileReader
class 745
FileWriter
class 745
fill
method
of class Collections
737
final
class 670
classes and methods 670
keyword 506, 521, 553, 618, 670
local variable 724
method 670
variable 553
final
local variable for use in an anonymous inner class 328
final value 495
finalize
method 647
finally
clause 697
keyword 692
financial transaction 415
findFragmentById
method of class Activity
119, 148
Fireworks Designer App exercise 268
Fisher-Yates shuffling algorithm 562
fixed text 437
in a format string 434
Flag Quiz Game app xxvi
flag value 484
Flickr Searches App exercise 338
enhanced 338
float
primitive type 436, 465, 466, 765
promotions 527
Float
class 729
floating action button (FAB) 278
floating-point constant 497
floating-point literal 466
double
by default 466
floating-point number 465, 483, 484, 486
division 487
double precision 466
double
primitive type 465
float
primitive type 465
single precision 466
FloatingActionButton
class 127, 278
hide
method 324
show
method 324
floor
method of Math
521
flow of control 487
FlowLayout
class 711
focus 709
folders
assets
120
res/drawable
354
font size 183
for
repetition statement 476, 495, 498
enhanced 563
header 496
nested 555
format
method of class NumberFormat
100
format
method of class String
596
format specifier
multiple in a String
resource 129
numbering in a String
resource 129
format specifiers 434
%.2f
for floating-point numbers with precision 488
%d
437
%s
434
format string 434
formatted output
,
(comma) formatting flag 499
%f
format specifier 467
–
(minus sign) formatting flag 498
comma (,
) formatting flag 499
field width 498
floating-point numbers 467
grouping separator 499
left justify 498
minus sign (–
) formatting flag 498
precision 468
right justification 498
Formatter
class 745
Fortune Teller App exercise 226
forums 33
Android Forums 33
Stack Overflow 33
Fractal App exercise 227
fragile software 642
getActivity
method 156
getLoaderManager
method 382
onActivityCreated
method 237, 382
onAttach
method 182, 217, 382, 389, 397
onCreate
method 119
onCreateOptionsMenu
method 119, 201
onCreateView
method 119, 154, 237
onDetach
method 182, 217, 382, 389, 397
onOptionsItemSelected
method 119, 201
onPause
lifecycle method 199
onRequestPermissionsResult
method 204
onResume
lifecycle method 198
requestPermissions
method 203, 204
setArguments
method 376
setHasOptionsMenu
method 197
shouldShowRequestPermissionRationale
method 203
Fragment
layout 137
Fragment
lifecycle 182, 382, 389, 397
fragment lifecycle 119
Fragment
lifecycle methods 217
FragmentActivity
class
getSupportFragmentManager
method 119, 148, 150
FragmentManager
class 119, 347
beginTransaction
method 375
getFragmentByTag
method 164
popBackStack
method 375
FragmentTransaction
class 119, 347, 375, 376
add
method 375
addToBackStack
method 376
commit
method 375
replace
method 376
FrameLayout
class 235
free app 411
Froyo (Android 2.2) 7
Fullscreen Activity template 45
fully qualified class name 458
fully qualify a custom View
’s class name in an XML layout 182
function 520
future proof 32
Game of Snake App exercise 227
game playing 528
games 31
gaming console 5
garbage collection 748
garbage collector 613, 614, 694, 697
general class average problem 483
generalities 650
generic class 586
gesture 5
double tap 5
double touch 5
drag 5
long press 5
pinch 5
pinch zoom 5
Swipe 5
tap 5
touch 5
get a value 462
get
method
of class ArrayList<T>
588
of interface List<T>
732
of interface Map
743
getAbsolutePath
method of class File
746
getActionCommand
method of class ActionEvent
714, 721
getActionIndex
method of class MotionEvent
211
getActionMasked
method of class MotionEvent
210
getActivity
method of class Fragment
156
getAll
method of class SharedPreferences
323
getAssets
method of class ContextWrapper
157, 160
getClass
method of Object
648, 669
getClassName
method of class StackTraceElement
703
getColumnIndex
method of class Cursor
387
getConfiguration
method of class Resources
148, 149
getDefaultSensor
method of class SensorManager
198
getDouble
method of class JSONObject
298
getFileName
method of class StackTraceElement
703
getFragmentByTag
method of class FragmentManager
164
getFragmentManager
method of class Activity
119, 164
getHolder
method of class SurfaceView
251
getItemCount
method of class RecyclerView.Adapter
334, 387
getItemID
method of class MenuItem
201
getJSONArray
method of class JSONObject
298
getJSONObject
method of class JSONArray
298
getLastPathSegment
method of class Uri
368
getLineNumber
method of class StackTraceElement
703
getLoaderManager
method of class Fragment
382
getLong
method of class Cursor
387
getLong
method of class JSONObject
298
getMenuInflater
method of class Activity
149
getMessage
method of class Throwable
703
getMethodName
method of class StackTraceElement
703
getName
method of class Class
648, 669
getName
method of class File
746
getParent
method of class File
746
getPassword
method of class JPasswordField
714
getPath
method of class File
746
getPointerCount
method of class MotionEvent
212
getReadableDatabase
method of class SQLiteOpenHelper
369
getResources
method of class Activity
148, 149
getSelectedIndex
method of class JComboBox
725
getSharedPreferences
method of class Context
322
getSource
method of class EventObject
714
getStackTrace
method of class Throwable
703
getStateChange
method of class ItemEvent
725
getString
method of class Activity
329
getString
method of class Cursor
387
getString
method of class Fragment
151, 156
getString
method of class JSONObject
298
getString
method of class SharedPreferences
327
getStringSet
method of class SharedPreferences
151
getSupportFragmentManager
method of class FragmentActivity
119, 148, 150
getSystemService
method of class Context
294
getSystemService
method of clsdd Activity
198
getTag
method of class View
278
getType
method of a ContentProvider
367
getView
method of class ArrayAdapter
287
getWritableDatabase
method of class SQLiteOpenHelper
370
getX
method of class MotionEvent
212
getY
method of class MotionEvent
212
Go to next state button 66
Google Maps 301
Google APIs 4
Google Cloud Messaging 7
Google Maps 5
Google Payments merchant account 412, 414
Google Play 13, 406, 412, 415, 422
countries 418
crash report 419
high-resolution app icon 416
promotional graphic 416
publish 416
Publish an Android App on Google Play 416
publisher account 414
screenshots 416
Google Play Developer Console 419
Google Play Developer Program Policies 415
Google Wallet 412
Google+ 309
goto
elimination 475
goto
statement 475
Gradle build system 184
graph information 555
Graphical Layout editor in the Android Developer Tools 40
graphical user interface (GUI) 682, 708
graphics xxxi, 15
graphics processing unit (GPU) xl
gravity
property of a TextView
60, 91
gravity sensor 182
greatest common divisor (GCD) 545
green guide lines in layout editor 62
green
method of class Color
217
GridLayout
columnCount
property 86
layout:column
of a view 87
layout:columnSpan
of a view 87
layout:row
of a view 87
rowCount
property 86
useDefaultMargins
property 86
grouping separator (formatted output) 499
guarding code with a lock 753
“guess the number” game 545, 726
GUI
layout 48
view (component) 48
GUI (Graphical User Interface) 682
component 708
GUI component
view 39
GUI components
EditText
81
naming convention 85
programmatically create 119
ScrollView
357
ViewGroup
357
GUI design 31
screen type 49
guide lines in layout editor 62
gyroscope sensor 182
handle an exception 689
Handler
class 122
Hangman Game App exercise 226
hardware accelerated execution manager (HAXM) xl
hardware support 15
hash table 740
hashCode
method of Object
648
HashMap
class 741
keySet
method 743
HashSet
class 740
Hashtable
class 741
hashtag
421
hasNext
method
of class Scanner
504
of interface Iterator
732, 735
hasPrevious
method of ListIterator
735
height of a table row 84
“hidden” fields 535
hide
method of class FloatingActionButton
324
hide the soft keyboard 324
hideSoftInputFromWindow
method of class InputMethodManager
294
hierarchical parent of an Activity
168
hint
property of a TextView
89
Holo user interface 8
horizontal tab 433
Horse Race with Cannon Game App exercise 268
host a Fragment
in an Activity
119
HourlyEmployee
class derived from Employee
660
HousingMaps.com 301
HttpURLConnection
class 291
disconnect
method 291
openConnection
method 291
hues of a color 83
HugeInteger
Class exercise 621
HyperText Transfer Protocol (HTTP) 274
i-Newswire 423
icon design firms
99designs 408
Elance 408
glyphlab 408
Iconiza 408
id
property of a layout or component 55
Idiomatic Expressions
Translator Mashup App exercise 301
IEEE 754 (grouper.ieee.org/groups/754/
) 765
if
single-selection statement 442, 476, 500
if...else
double-selection statement 476, 486, 500
ignoring array element zero 558
IllegalArgumentException
class 595
images xxxi
ImageView
class
adjustViewBounds
property 140
scaleType
property 140
imeOptions
of an EditText
358, 359
immersive mode 233, 258, 264, 265
immutable object 616
implement an interface 649, 671, 678
implementation of a function 658
implicit conversion 487
import
declaration 435, 436, 458
in-app billing 414
security best practices 414
<include>
element in a layout XML file 127
increment
a control variable 495
expression 507
of a control variable 494
operator, ++ 492
increment and decrement operators 492
indefinite repetition 484
indentation 478
index 556
index (subscript) 548
index of a JComboBox
724
index zero 548
indexOf
method of class ArrayList<T>
586
IndexOutOfRangeException
class 559
infinite recursion 647
infinite series 516
inflate
method of class LayoutInflater
154
inflate
method of class MenuInflater
149
inflate the GUI 252
inflating a GUI 99
examples 624
hierarchy for university CommunityMembers
624
initial value of control variable 494
initialization at the beginning of each repetition 489
initialize a variable in a declaration 436
initializer list 552
initializing two-dimensional arrays in declarations 575
inlining method calls 605
in-memory database 364
inner class 712
anonymous 724
innermost set of brackets 558
input data from the keyboard 446
input/output package 528
input type of an EditText
87
InputMethodManager
class 294
hideSoftInputFromWindow
method 294
InputMismatchException
class 689, 691
setImageDrawable
method 160
inputType
of an EditText
358, 359
insert
method of a ContentProvider
369
insert
method of a ContentResolver
393
insert
method of class SQLiteDatabase
370
insertImage
method of class MediaStore.Images.Media
183
insertion point 585
instance 19
instance (non-static
) method 615
instance of a class 459
instance variable 20, 458, 459, 466, 521
instanceof
operator 668
instantiating an object of a class 452
int
primitive type 436, 484, 492, 500, 765
promotions 527
integer 434
array 552
division 483
quotient 439
value 436
Integer
class 729
integer division 439
integerPower
method 544
integral expression 506
Intel HAXM emulator xl
IntelliJ® IDEA xxxix
ACTION_SEND
constant 329
ACTION_VIEW
constant 327
Bundle
330
createChooser
method 330
putExtra
method 330
resolveActivity
method 124
intent extras 330
intent filter 124
intent-filter
element in AndroidManifest.xml
106
intents
coordinating efforts between separate apps 105
launching activities 106
interest rate 497
declaration 671
implementing methods in Java 102
interface
keyword 671
Interfaces 671
BaseColumns
363
Comparator
737
DialogInterface.OnClick Listener
124, 165
Editable
96
Executor
749
ExecutorService
749
Iterator
730
KeyListener
718
ListIterator
730
LoaderManager.LoaderCallbacks
349
MouseListener
717
ObjectInput
747
ObjectOutput
747
OnLongClickListener
327
OnSeekBarChangeListener
101
SeekBar.OnSeekBarChangeListener
82, 97, 218
SensorEventListener
200
Serializable
682
SortedMap
741
SortedSet
741
SurfaceHolder.Callback
232, 251, 261
SwingConstants
682
View.OnClickListener
156
View.OnLongClickListener
327
WindowListener
725
internationalization 39, 40, 69, 81
Internet public relations resources
ClickPress 423
eReleases 423
Marketwired 423
Mobility PR 423
Newswire 423
openPR 423
PR Leap 423
PRLog 423
PRWeb 423
interrupt
method of class Thread
750
InterruptedException
class 750
intrinsic lock 752
invalidate
method of class View
208
invoke a method 462
invoke a REST web service 296
is-a relationship 623
isAbsolute
method of File
746
isDirectory
method of File
746
isEmpty
method
Map
744
ItemEvent
class
getStateChange
method 725
iteration 482
iteration (looping)
of a for
loop 557
Iterator
interface 730
hasNext
method 732
next
method 732
remove
method 732
iterator
method of Collection
732