Note: Page numbers followed by b, f, or t indicate material in boxes, figures, or tables, respectively.
actionBarHeight
variable, 263
activities
Activity
class, 141, 223, 224, 227, 251, 252, 279, 280, 303, 306, 326, 345, 346, 436, 515
activity_main.xml file, 8, 11, 12b, 40, 44, 69, 70, 132, 133–134b, 174, 175b, 229, 233b, 479, 491, 540, 600, 652, 653b
Photo app
Web Content app
Version 3, 527b
activity_maps.xml
file, 393b
AdapterView
class, 532
add
method, 365
of FragmentTransaction
class, 365
addApi
method, 436
addConnectionCallbacks
, 436
addOnConnectionFailed Listener interface
, 436
Address
class, 409t
addToBackStack
method, 354
addView
method, 263
Advanced Encryption Standard (AES) model, 619
advertising, 599
afterTextChanged
method, 76
Android Application Package (APK), 34
Android apps, 2
development environment for, 3
Android development framework, 298
Android framework, 235
Android market, 2
Android operating system, 2
Android phones, 2
compiler error flagged by, 26b
Android Studio environment, 181
android.content.pm
package, 386
android.content.res
package, 222
android:imeOptions
attribute, 353
android:inputType
, 73
android:layout_weight
XML attribute
of LinearLayout
, 343
android:layout_width
attribute, 343
android.location
package, 440
AndroidManifest.xml file, 7, 30, 31b, 44, 45b, 144b, 186–187b, 198b, 203b, 222, 227, 232, 242, 261, 302, 352, 393–394b, 412–413b, 418b, 440, 541b, 570–571b, 605–606b
android.media
package, 325
android:orientation
attribute, 233
android.os
package, 522
android:screen Orientation
, 222
android:theme
, 69
android.view
package, 287
animation, 155
XML elements and corresponding classes, 156t
BackgroundFragment
class, 365b
beforeTextChanged
method, 76
beginTransaction
method, 354
BIOS menu, 18
Callback method, 251
camera app (Photo app), running inside tablet
cancel
method, 314
Candy Store app
Chronometer
class, 589
Color
class, 263
columnSpec
, 105
com.google.android.gms.maps
package, 395t
com.google.android.gms.maps.model
package, 395t
commit
method, 354
Configuration
reference, 223
constant values
DataActivity
class, 142, 145, 148, 159, 163
goBack
method in, 160b
of Mortgage Calculator app
updateMortgageObject
method in, 165b
defensive programming, 73
DELTA_TIME
constant, 318
density
field, 263
device orientation, management of, 222
distanceToDestination
method, GPS app, 447
Document Type Declaration (DTD) document, 510
DOM parser. Document Object Model (DOM) parser
Done
key, 353
DoubleTapHandler
object, 287
drawArc
method, 305
drawBitmap
methods, 306
drawCircle
method, 305
drawing bitmaps, 302
drawing shapes, 302
DTDHandler
interface, 512t
Duck Hunting app
EditText
, 44, 46, 48, 50, 53, 64, 66, 70, 71, 73, 75, 78, 181, 371
element content, 10
email (Sending), 499
emulator, running app inside, 18–23
GPS app, Version 2, 453f
Show A Map app
Encryption app
findFragmentById
method, 356
findFragmentByTag
method, 365
fireBullet
method, 320
FloatingActionButton
, 174
for
loop, 261
getActivity
and getView
methods of, 357t
fragment_ad.xml
file, 607b
fragment_game_control.xml file
fragment_game_state.xml file, 353b
FragmentManager abstract
class, 353
FragmentManager
class, 353
methods of, 354t
GestureDetector.OnDoubleTapListener
, 278, 278t, 279, 280, 282, 284
GestureDetector.OnGestureListener
, 278, 278t, 279, 280, 284, 287
GestureDetector.SimpleOnGestureListener
class, 284, 285, 287, 320
getActivity
method, 357
of Fragment
class, 357t
getContext
method, 331
getCurrentFocus
method, of Activity
class, 375
getDefaultSharedPreference
method of PreferenceManager
class, 163b
getElapsedRealtimeNanos
method, 456
getFragmentManager
method, 353, 355
of Activity
class, 354t
getNumberOfParts
, 259
getSystemService
method, of Context
class, 375t
getView
methods, of Fragment
class, 357t
goBack
method, 154
in DataActivity
class, 160b
Google, 2
Google Maps
GoogleApiClient abstract
class, 435
Hangman app
inflating the XML, 18
inheritance hierarchy
Input Method Editor, 353
InputMethodManager
class, 375, 376t
hideSoftInputFromWindow
method of, 375t
InputMethodManager
reference, 374
labelHeight
parameter, 263
landscape Strings
, 229
layout manager classes, 47
LayoutInflater
parameter, 345
LayoutParams
object, 256
leftMargin
parameter, 258
life-cycle methods
Logcat output
MainActivity
class, 6, 16–18, 17b, 25, 40, 70, 73, 100, 111, 142, 145, 148, 159, 163, 174, 229, 234, 252–254, 261, 306, 318, 320, 327, 346, 355, 357, 359, 367, 369, 370, 434, 440, 447, 456
Candy Store app
edits in, replacing activity_main with activity_data, 140b
Encryption app
Hangman app
onCreate
method in, 165b
Photo app
Stopwatch app
text view, setting font size of, 653b
TicTacToe app
MainActivity.java, generated code inside, 175b
MapsActivity
class
maps (displaying), 391
MarginLayoutParams
reference, 242
match_parent
value, 45
MatchingUtility
class, 419
mCallbacks
instance variable, 370
measure
method, 237
Model-View-Controller, 287
modified dimens.xml file, 13b
modified HelloAndroid app, 224
modified MainActivity
class, 26b
modified string.xml file, 14b
modified styles.xml file, 15b
modifyData
method in MainActivity
class, 159b
Mortgage Calculator app
onCreate
method, 17, 227, 229, 232, 234, 241, 253, 263, 266, 320, 351, 355, 365
onCreateOptionsMenu
method, 178
onDetach
method, 370
OnDouble-TapListener
interface, 287
onDoubleTap
method, 283
onDraw
method, 299, 300, 303, 305, 315, 316, 318, 319, 320, 322, 331
of GameView
class, Duck Hunting app Version 2, 323
onLayout
method, 306
onLocationChanged
method, 456
onOptionsItemSelected
method, 178
onPause
method, 456
onSingleTapUp
method, 283
onStart
method, 361
onTextChanged
method, 76
onTouchEvent
method, 278–280, 282, 283, 287, 288, 320
of Activity
class, 285
Paint
object, 303
params
, 258
parent
style, 64
parseFloat
, 71
parseInt
methods, 71
persistent data (using a local database), 188
persistent data (using preferences), 161
Photo app, 464
playHitSound
method, 330
of MainActivity
class, 330
portrait
, 229
postInvalidate
method, 315
PreferenceFragment
, 341
pseudo-code, 265
public static
inner class, 47
public static
inner interface, 251
PuzzleView
constructor, 261
rawQuery
method, 194
R.drawable.nameOfFile
, 300
Really Simple Syndication (RSS) feed, 510
Rect
class
Rect
constructor, 301
RectF
class, 305
red_thumb.xml
file, 479
relational database management system (RDBMS), 174
reset_button.xml
file, 589
SAX parser. Simple API for XML (SAX) parser
scale
variable, 303
schedule
method, 314
scheduleAtFixedRate
method, 314
screen
screenHeightDp
stores, 224
SCREENLAYOUT_SIZE_LARGE
, 223
SCREENLAYOUT_SIZE_NORMAL
constants, 223
SCREENLAYOUT_SIZE_SMALL
constants, 223
SCREENLAYOUT_SIZE_XLARGE
, 223
screenSize
value, 228
SeekBar
class, 478
selectById
method, 194
selected menu-related methods, 179t
sendEmail
method, 499
sending an email, 499
separate method, 241
setCannonAngle
method, 320
setDoubleTapListener
, 285
setEnabled
method, 100
setFontSizeToFitInView static
method, 289
setInterval
method, 455
setLayoutMargins
method, 242
setLayoutParams
method, 258
of View
class, 259t
setMargins
method, 235t
setNegativeButton
, 111
setNeutralButton
, 111
setOn-TouchListener
method
setPadding
, 53
setPositiveButton
, 111
setResult
Method
of GameResultFragment
class, Hangman app, Version 4, 364
setShowAsAction
, 177t
setSmallestDisplacement
method, 456
setSupportActionBar
of AppCompatActivity
class, 179t
setTitle
method, 176
setUpFragmentGui
method, 359
setUpGui
method, 241
SharedPreference
interface, selected methods of, 163t
SharedPreference.Editor
interface, selected methods of, 162t
sharing data (among activities), 150
Show A Map app, running inside tablet partial output of, 99, 100b
ShowAsAction
attribute, 177t
single tap, 277
singleton class, 150
slide_from_left.xml file, 158b
smartphones, 1
SPACING_HORIZONTAL
constant, 236
SPACING_VERTICAL
constant, 236
Spec
, 105
SQL syntax, 174
SQL table for candies, 189t
SQLiteOpenHelper
class, 190
selected methods of, 194t
stacking order, 265
start_button.xml
file, 589
static
methods, 300
static onKeyListener
interface, 75
status bar
String landscape
, 229
String MainActivity
, 25
String word
, 340
strings.xml file, 13b, 14b, 51–52, 52b, 62b, 135b, 177b, 184b, 229, 231b, 234b, 350b, 415b, 449b, 601b, 627b
styles
temperature widget app
TextAppearance
, 64
TextView
, 12, 44–45, 46, 48, 50, 61, 66, 70, 115, 181, 229, 250, 251, 256–259, 261, 263, 266, 275, 350, 453, 649, 650t
TicTacToe app
timeToDestination
method, GPS app, 447
Tip Calculator app
Update
method, 97
18.118.19.207