Index

Symbols

^, boolean logical exclusive OR 578, 580

truth table 580

, (comma) formatting flag 570

--, predecrement/postdecrement 562

-, subtraction 510, 511

!, logical NOT 578, 581

truth table 581

!=, not equals 513

?:, ternary conditional operator 548

. dot separator 525

{, left brace 500

}, right brace 500

@Override annotation 701

* wildcard in a file name 526

*, multiplication 510, 511

*=, multiplication assignment operator 563

/, division 510, 511

/* */ traditional comment 500

//, end-of-line comment 500

/=, division assignment operator 563

, backslash escape sequence 504

", double-quote escape sequence 504

, newline escape sequence 504

, carriage-return escape sequence 504

, horizontal tab escape sequence 504

&, boolean logical AND 578, 580

&&, conditional AND 578, 579

truth table 579

%, remainder 510, 511

%=, remainder assignment operator 563

%d format specifier 508

%f format specifier 520, 538

%s format specifier 505

(minus sign) formatting flag 569

+, addition 510, 511

++, preincrement/postincrement 562

+=, addition assignment operator 562

<, less than 514

<=, less than or equal 514

=, assignment operator 508

-=, subtraction assignment operator 563

== to determine whether two references refer to the same object 718

==, is equal to 513

>, greater than 514

>=, greater than or equal to 514

|, boolean logical inclusive OR 578, 580

||, conditional OR 578, 579

truth table 580

Numerics

0 flag 626

0 format flag 667

0-click NFC Peer-to-Peer Sharing 16

15 Puzzle App exercise 245

3D Art app xxii

3D graphics xxi, xxii, 14

3D motion processing 14

3D stack 14

3G network 13

A

abbreviating assignment expressions 562

abs method of Math 592

absolute path 816, 817

absolute value 592

abstract class 724, 725, 743

abstract data type (ADT) 666

abstract keyword 724

abstract method 724, 725, 728, 787

abstract superclass 724

Abstract Window Toolkit Event package 599

AbstractButton class 789, 792

addActionListener method 792

setRolloverIcon method 792

accelerometer xxi, 21

accelerometer sensor 250, 259

access a color resource 137

access a non-standard library 323

access a predefined color resource 137

access a resource value 139

@color/ 139

@dimen/ 140

@string/ 139

access Android services 142

access modifier 524, 530

private 530, 669

protected 669, 696

public 524, 669

accessibility 41, 47

Accessibility API 17

accessing Android content providers 19

Accounts Payable System Modification exercise 756

ACCURACY_COARSE constant of class Criteria 330

ACCURACY_FINE constant of class Criteria 330

ACCURACY_HIGH constant of class Criteria 330

ACCURACY_LOW constant of class Criteria 330

ACCURACY_MEDIUM constant of class Criteria 330

acquire method of class WakeLock 332

acquire the lock 824

action 547, 550

action bar 12, 13, 14, 250, 252, 426, 429

action element of the manifest file 153

action to execute 545

ACTION_APPWIDGET_UPDATE 433, 488

ACTION_GET_CONTENT constant of class Intent 376

ACTION_VIEW constant of classIntent 151

ActionBar class 432, 435, 437

selectTab method 437

ActionEvent class 784, 785, 789

getActionCommand method 785, 792

ActionListener interface 784, 788

actionPerformed method 784, 787

actionPerformed method of interface ActionListener 784, 787

activation record 597

activity 14, 45

is shut down 200

Activity and Task Design Guidelines 45

Activity chooser 376

Activity chooser dialog 352, 355

Activity class 101, 113, 364, 366, 371, 375, 376, 390

finish method 300

getFragmentManager method 435

getIntent method 300, 306

getMenuInflater method 297

getPreferences method 230

getString method 150

getSystemService method 148, 258

lifecycle 14

lifecycle methods 194

onActivityResult method 407

onCreate method 115, 199, 231, 300, 435

onCreateOptionsMenu method 164, 261

onDestroy method 194, 199, 200

onOptionsItemSelected method 164, 263

onPause method 194, 199, 200

onRestoreInstanceState method 436

onResume method 231, 295, 437

onSaveInstanceState method 115, 120, 381, 385, 390, 436

onStart method 231

onStop method 296, 332

onTouchEvent method 194, 200

receiving results from another Activity 355

RESULT_CANCELED constant 366

RESULT_OK constant 366

runOnUiThread method 214, 404, 405

sendBroadcast method 439

sent to background 200

setContentView method 117

setResult method 414

setVolumeControlStream method 195

startActivity method 355

startActivityForResult method 355, 364, 370, 375, 390

startManagingCursor method 297

activity element of the manifest file

android:label attribute 153

android:name attribute 153

android:screenOrientation attribute 186, 227

android:theme attribute 323, 326

android:windowSoftInputMode attribute 153

AndroidManifest.xml activity element 186

activity fragment 14

Activity Not Responding (ANR) dialog 287

activity stack 45

Activity>default para font> class

onCreate method 294

ActivityNotFoundException class 151, 364

Adapter class xxi, 195, 287

adapter class 796

AdapterView class xxi, 287, 298

AdapterView.OnItemClickedListener interface 294

AdapterView.OnItemClickListener interface 298

onItemClick method 298

AdapterView.OnItemLongClickListener interface 429

AdaptiveMulti-Rate Wideband encoding (AMR-WB) 12

adb (Android Debug Bridge) xxxix

add a class to a project 198

add method

ArrayList<T> 659

LinkedList<T> 807

List<T> 803, 805

addActionListener method

of class AbstractButton 792

of class JTextField 784

addAll method

Collections 808

List 805

addCallback method of class SurfaceHolder 205

addFirst method of LinkedList 807

adding components to a row 101

addition 510, 511

addition compound assignment operator, += 562

addLast method of LinkedList 807

Address Book app xxi, 21

Address Book App exercise 316

AdMob 59, 60

ADT (Android Development Tools Plugin) xxi, 6, 20

ADT (Android Development Tools) 75, 76

Plugin for Eclipse xxxi, xxxiii

ADT Plugin 75, 100

ADT Plugin for Eclipse 49, 54

ADT Plugin tools 101

Advanced Audio Coding (AAC) 12

advertising revenue 60

AlarmManager class 433

AlertDialog class 132, 142, 147, 250

custom GUI for user input 355

AlertDialog,Builder class setMultiChoiceItems method 185

AlertDialog.Builder class 132, 147

setItems method 185

algebraic notation 511

algorithm 545, 550

in Java Collections Framework 808

align text center_vertical 108

aligning text center 107

alpha 253

alpha (transparency) values 86

alpha animation 239

alpha animation for a View 171

alpha method of class Color 263

alphabetical order 129

altitude 324, 330

Amazon Mobile app 59

Analog Clock App exercise 221

analysis 24

android xxxviii

Android 2.2 (Froyo) 7

Android 2.3 330

overscroll 286

Android 2.3 (Gingerbread) 10

Android 2.3.3 10

Android 3.x 7, 227, 250, 252, 411, 430

action bar 250, 426, 429

android:resizeMode attribute of a menu item 433

DialogFragment class 427, 428

fragment 427, 428

Fragment class 427, 428

FragmentManager class 429

FragmentTransaction class 429

holographic theme 250, 252

Honeycomb 12

JsonReader 426

ListFragment class 427, 428

property animation 171

resizable app widget 427

SQLiteOpenHelper class’s onDowngrade method 313

tabbed navigation 426

Android 4.0 (Ice Cream Sandwich) 15

Android APIs 5

Android app marketplaces 57

Amazon Appstore 58

AndAppStore 58

Androidguys 58

Andspot Market 58

GetJar 58

Handango 58

Mplayit 58

PocketGear 58

Shop4Apps 58

SlideMe 58

Youpark 58

Zeewe 58

Android Application Error Reports 9, 63

Android application package file (.apk file) 55

Android Beam 17

Android Best Practices Resource Center (www.deitel.com/AndroidBestPractices/) xxiii, xxvi, 34

Android Cloud to Device Messaging (C2DM) 9

Android Content Guidelines 57

Android Debug Bridge (adb) xxxix

Android developer documentation (developer.android.com) xxvi

Android Developer’s Guide 42

Android Development Tools (ADT) 75, 76

Plugin for Eclipse xxxi, xxxiii

Android Development Tools (ADT)

Plugin xxi, 6, 20

Android Device Chooser window 321

Android device manufacturers xx

Android emulator xxxvi, xxxix, 20, 319, 322

Android for Programmers website xxi, xxxi

Android Icon Templates Pack 44

Android Manifest Editor 49

Android Maps APIs xxiii

Android Market 3, 4, 17, 18, 33, 40, 48, 51, 59, 64

developer profile 3

filter 42, 43

language 56

location 57

locations 57

price 57

promotional graphic 56

publish 48, 55

publisher account 61

screenshots 55

Upload Application 55

upload assets 55

Android Market Content Policy for Developers 48

Android Market Developer Console 63

Android Market Developer Distribution Agreement 3

Android NDK 9

Android Newsgroups

Android Discuss 3

Android predefined color 137

Android Programming Quiz App exercise 189

Android project

res folder 80, 87

value folder 87

Android Resource Center

www.deitel.com/android/ xxvi, 34

Android SDK xxxi, xxxiii, xxxvi, 2, 20

Android SDK 2.x xix, xxiii

Android SDK 3.x 20

Android SDK and AVD Manager 322

Android SDK Manager xxxiv

Android SDK versions and API levels 79

Android service to inflate a layout 146

Android services access 142

Android Software Development Kit (SDK) xxxiii

Android source code and documentation

FAQs 5

licenses 5

philosophy and goals 5

source code 4, 5

Android User Interface Guidelines 44

Android versions

Android 1.6 (Donut) 6

Android 2.0–2.1 (Eclair) 6

Android 2.2 (Froyo) 7

Android 2.3 (Gingerbread) 7

Android 3.0 (Honeycomb) 7

Android 4.0 (Ice Cream Sandwich) 7

Android Virtual Device (AVD) xxxvi, 21, 24, 27, 28, 75, 95

Setting hardware emulation options 33

Android Virtual Device Manager xxxvi

android:adjustViewBoundsattribute of an ImageView 169

android:background attribute 94 of a TextView 289

android:drawableBottom attribute 358

android:drawableLeft attribute 358

android:drawableRight attribute 358

android:drawableTop attribute 358

android:duration attribute of a translate animation 171

android:fromXDelta attribute of a translate animation 171

android:gravity attribute 94

android:hardwareAccelerated of the appliiication element 227

android:hint attribute of an EditText 139

android:icon attribute of an item element 293

android:icon of the application element 152

android:id attribute 94

android:imeOptions attribute of an EditText 139, 292

android:inputType attribute 292

android:inputType attribute of an EditText 292

android:label of the activity element 153

android:label of the application element 152

android:layout_below attribute 95

android:layout_centerHorizontal attribute 94

android:layout_column attribute of a component 107

android:layout_height attribute 94

fill_parent value 94

wrap_content value 94

android:layout_span attribute 139

android:layout_span attribute of a component 107

android:layout_width attribute 94

match_parent value 94

wrap_content value 94

android:marginTop attribute 94

android:minSdkVersion attribute 227, 430

android:name of the activity element 153

android:orderInCategory attribute of an item element 293

android:resizeMode attribute of a menu item 433

android:screenOrientation attribute 196

android:screenOrientation of the activity element 186, 227

android:showAsAction attribute 429

android:showAsAction attribute of a menu item 432

android:singleLine attribute of an EditText 359

android:src attribute 95

android:startOffset attribute of a translate animation 171

android:stretchColumns attribute of a TableLayout 104, 133, 139

android:targetSdkVersionattribute 252

android:text attribute 94

android:textColor attribute 94

android:textOff attribute of class ToggleButton;ToggleButton class

android:textOff attribute 326

android:textOn attribute of class ToggleButton;ToggleButton class

android:textOn attribute 326

android:textSize attribute 94

android:textStyle attribute 94

android:theme attribute of the activity element 323, 326

android:theme of the application element 186

android:thumb attribute of a SeekBar 253

android:title attribute of an item element 293

android:titleCondensed attribute of an item element 293

android:toXDelta attribute of a translate animation 171

android:windowSoftInputMode of the activity element 153

android.animation package 226

android.app package 113, 142, 250, 287, 428, 429

android.appwidget package 429

android.content package 132, 142, 251, 429, 430

android.content.res package 164, 175

android.database package 287

android.database.sqlite package 287

android.graphics package 196, 251

android.graphics.drawable package 164, 357

android.hardware package 250, 396

android.intent.action.CHOOSER 376

android.location package 324

android.media package 195, 356

android.net package 142

android.os package 113, 164, 287, 324

android.permission

ACCESS_FINE_LOCATION 326

ACCESS_MOCK_LOCATION 326

INTERNET 326

WAKE_LOCK 326

android.provider package 355

android.text package 114

android.util package 164, 204, 430

android.view package 142, 164, 194, 195, 287, 396

android.view.animation package 164

android.view.inputmethod package 142

android.widget package 81, 114, 142, 251, 286, 287, 324, 326, 356

AndroidLicenser 57

AndroidManifest.xml 44, 49, 132, 152, 323, 325, 357, 397

action element 153

application element 152, 153, 186

category element 153

describing multiple activities 286

intent-filter element 153

manifest element 152

permissions 50

receiver element 430

service element 430

uses-sdk element 152

animate method of class View 226, 239

animateTo method of class MapController 333

animation xxi, xxiii, 226

alpha animation for a View 171, 239

AnimatorListener 239

cancel 226

duration 226, 239

end 226

framework 15

interpolator 226

lifecycle events 226

LinearInterpolator 240

location 239

manual 195

options in an XML file 164, 187

repeat 226

rotate animation for a View 171

rotation 239

scale 239

scale animation for a View 171

set 171

start 226

thread 195

TimeInterpolator class 239

translate animation for a View 171

translation 239

tween 171

View based 171

Animation class 164

setRepeatCount method 164, 175

AnimationListener interface 235

onAnimationCancel method 235

onAnimationEnd method 235

AnimationUtils class 164, 175

loadAnimation method 164, 175

Animator class 240

cancel method 235

AnimatorListener interface 226, 239

onAnimationEnd method 240

onAnimationStart method 240

AnimatorListenerAdapter class 226, 240

AnimatorUpdateListener interface 226

annotation @Override 701

anonymous inner class 101, 783, 795

anonymous inner classes 779

ANR (activity not responding) dialog 116, 144, 195, 287

ant.apache.org/ xxxix

anti-aliasing 270

Apache Ant xxxix

API (application programming interface) 9, 506, 590

Apps on external storage 9

Camera and Camcorder 9

Data backup 9

Device policy management 9

Graphics 9

Media framework 9

UI framework 9

API documentation (download.oracle.com/javase/6/docs/api/) 599

API key 321

.apk file (Android application package file) 53, 55

app xxxi

app design resources 42

app development xxxi

app permissions 323

requesting 326

app platforms

Bing 69

BlackBerry 69

Chrome 69

Facebook 69

Foursquare 69

Google 69

Gowalla 69

iPhone 69

LinkedIn 69

Symbian 69

Twitter 69

webOS 69

Windows Mobile 69

Yahoo 69

app review and recommendation sites

Android and Me 66

Android App Review Source 65

Android Police 66

Android Tapp 18, 65

AndroidGuys 66

AndroidLib 18, 66

AndroidZoom 18, 65

Androinica 65

AppBrain 18, 65

Appolicious 18, 65

AppStoreHQ 65

Best Android Apps Review 65

doubleTwist 18

mplayit 18

Phandroid 66

App Widget xxi, 427

adding to home screen 428

layout 433

resizable 427

app-driven approach xxiii, 2

application 499, 500, 524

command-line arguments 593

application element of the manifest file 152, 153, 186

android:hardwareAccelerated attribute 227

android:icon attribute 152

android:label attribute 152

android:theme attribute 186

Application Not Responding (ANR) dialog 116, 144

application programming interface (API) 590

Application Programming Interfaces (APIs) 9

application resource 19

application resources (developer.android.com/guide/topics/resources/index.html) 87

apply method of class SharedPreferences 439

apply method of class SharedPreferences.Editor 146

apps in the book xxi

AppWidgetProvider class 429, 433, 487, 490

area of a circle 616

argb method of class Color 264

ARGB_8888 constant 271

argument promotion 597

argument to a method 501, 526

arithmetic calculation 510

arithmetic compound assignment operators 562

arithmetic mean 512

arithmetic operators 510

arithmetic overflow 765

ArithmeticException class 759, 765

arrange GUI components into rows and columns 101

array 619, 815

bounds checking 627

ignoring element zero 629

length instance variable 620

pass an element to a method 636

pass an array to a method 636

array-access expression 619

array-creation expression 620

array initializer 623

for multidimensional array 645

nested 645

array of one-dimensional arrays 645

ArrayAdapter class 356, 362, 366, 368, 371, 373, 379

getView method 369

remove method 378

arraycopy method of class System 654, 656

ArrayIndexOutOfBoundsException class 627, 629

ArrayList class 164

ArrayList<T> generic class 657, 801

add method 659

clear method 657

contains method 657, 659

get method 659

indexOf method 657

remove method 657, 659

size method 659

trimToSize method 657

Arrays class 141, 654

asList method 806, 806

binarySearch method 654

equals method 654

fill method 654

sort method 144, 145, 654

arrays.xml resource file 432

ascending order 654

asList method of Arrays 806, 806

asset 55

AssetManager class 164

list method 175

assets folder of an Android app 163

assign a value to a variable 508

Assigning superclass and subclass references to superclass and subclass variables 722

assignment operator, = 508, 516

assignment operators 562

assignment statement 508

associate

right to left 558

associativity of operators 511, 516

left to right 516

right to left 511

asynchronous event 765

AsyncTask class 287, 295, 296, 297, 300, 301, 302, 404, 405, 406, 481

execute method 295

AtomicBoolean class 250, 257

attribute 14

in the UML 24

of a class 22

of an object 24

Attributes

android:background 94

android:drawableBottom 358

android:drawableLeft 358

android:drawableRight 358

android:drawableTop 358

android:gravity 94

android:id 94

android:layout_below 95

android:layout_centerHorizontal 94

android:layout_height 94

android:layout_width 94

android:marginTop 94

android:src 95

android:text 94

android:textColor 94

android:textSize 94

android:textStyle 94

AttributeSet class 204

audio xxi, xxiii, 19

audio effects API 12

audio library access xxi

audio stream

music 205

audio streams 195

music 195

audio volume 195

AudioManager class 195, 205

auto-unboxing 800

autoboxing 800

auto-discovery 7

auto-focus 13

automatic garbage collection 768

AVD(Android Virtual Device) xxxvi, 21, 24, 27, 28, 75

sending GPS data to 322

transfering music and photos 353

average 512, 550, 553

AWTEvent class 786

B

background

activity sent to 200

background process 116

Background property of a layout or component 86

backing array 806

backslash () 504

backward compatibility 13

Bank of America app 59

bar chart 625, 626

bar of asterisks 625, 626

barometer sensor 14

BasePlusCommissionEmployee class extends CommissionEmployee 734

battery

conserve 331

battery life 324

bearing 319, 328, 330, 338, 341

BearingRequired method of class Criteria 330

bearingTo method of class Location 333

Before You Begin xxxi

beginArray method of class JsonReader 469, 474

beginObject method of class JsonReader 469, 472, 474

beginTransaction method 442

behavior of a class 22

best practices xxiii, 42

bezier curve 275

bidirectional iterator 805

BigDecimal class 537

BigInteger class 825

binary file 815

binary operator 508, 510, 581

binarySearch method

of Arrays 654, 656

of Collections 808

Bitmap class 196, 251, 267

bitmap encoding 271

compress method 278

createBitmap method 271

eraseColor method 267

Bitmap.Config.ARGB_8888 constant 271

BitmapDrawable class 357

BitmapFactory class 356

decodeStream method 388, 473

BitmapFactory.Options class 356

bitwise operators 578

Blackjack App exercise 156

enhanced 157

blank line 500

block 549

Block Breaker Game App exercise 281

enhanced 281

blogging 64

blue method of class Color 263

Bluetooth xxii, xxiii, 8, 13

tethering 13

Bluetooth Advanced Audio Distribution Profile (A2DP) 15

Bluetooth Health Device Profile (HDP) 16

body

of a class declaration 500

of a loop 550

of a method 501

of an if statement 513

Body Mass Index Calculator App exercise 126

book-title capitalization 789

Boolean

class 800

boolean

expression 548

promotions 598

boolean logical AND, & 578, 580

boolean logical exclusive OR, ^ 578, 580

truth table 580

boolean logical inclusive OR, | 580

boolean primitive type 548, 836

Bouncing Ball Game App exercise 221

bounds checking 627

boxing conversion 800

braces ({ and }) 549, 567, 623

not required 575

brand awareness 59

branding apps

Amazon Mobile 59

Bank of America 59

Best Buy 59

Epicurious Recipe 59

ESPN ScoreCenter 59

ING Direct ATM Finder 60

Men’s Health Workouts 60

NFL Mobile 60

NYTimes 60

Pocket Agent 60

Progressive Insurance 60

UPS Mobile 60

USA Today 60

Wells Fargo Mobile 60

break statement 575, 578

Brick Game App exercise 220

brittle software 713

broadcast Intent 430

BroadcastReceiver class 429, 430, 487

Browser 13

built-in content providers 355

bulk operation 801

Bundle class 113, 117, 120

for an Intent 299

getDouble method 118

getLong method 300

getString method 118

button 789

Button class 132, 142

button label 789

byte-based stream 815

Byte class 800

byte keyword 836

byte primitive type 571

promotions 598

bytecode 502

C

C2DM (Android Cloud to Device Messaging) 9

calculations 517

Calendar API 16

call-by-reference 638

call-by-value 638

calling method (caller) 524, 531

CamcorderProfile classes 9

Camera 13

camera 6, 11, 393

color effects 412

reconfigure 412

Camera API xxiii, 12

Camera class 396, 410

open method 413

setParameters method 412, 414

setPreviewDisplay method 414

startPreview method 414

stopPreview method 414

camera controls 8

CAMERA permission 397

camera preview 414

Camera Preview API 9

camera settings 8

Camera.Parameters class 396, 410, 412

setColorEffect method 412, 414

setPreviewSize method 414

Camera.PictureCallback class 396, 414, 415

onPictureTaken method 414

Camera.ShutterCallback class 415

Camera.Size class 410

cancel method of class Animator 235

Cannon Game app xxi, 21

Cannon Game App exercise 220

enhanced 390

canRead method of File 817

Canvas class 196, 251, 343

drawBitmap method 272

drawCircle method 213

drawLine method 213

drawPath method 272, 276

drawRect method 213

drawText method 213

rotate method 341

canWrite method of File 817

capturing high-quality audio 12

Car Payment Calculator App exercise 126

Card Game Apps exercise 157

card games 630

card shuffling

Fisher-Yates 633

carriage return 504

carrier billing 59

case-insensitive sort 144

case keyword 575

case sensitive 500

casino 602

cast

downcast 722

operator 558, 598

catch

a superclass exception 767

an exception 760

catch

block 763, 763, 765, 768, 771, 774

clause 763

keyword 763

Catch block 629

catch-or-declare requirement 766

Catching Exceptions Using Class Exception exercise 777

Catching Exceptions Using Outer Scopes exercise 777

Catching Exceptions with Superclasses exercise 777

category element of the manifest file 153

cd to change directories 502

ceil method of Math 592

cell in a TableLayout 101

Celsius 797

equivalent of a Fahrenheit temperature 616

center text 107

center_vertical value of the Gravity property of a component 108

chain method calls 226

change directories 502

changeCursor method of class CursorAdapter 296, 297

char

keyword 836

primitive type 507, 571

promotions 598

character

constant 577

character-based stream 815

Character class 800

character string 501

characteristics of great apps 40

checkbox 789

checked exception 766

Checkers App exercise 246

check-in 64

Chess App exercise 246

circumference 520

class 18, 23, 101

class keyword 524

constructor 525, 534

data hiding 530

declaration 500

declare a method 523

default constructor 534

field 529

file 502

get method 672

instance variable 23, 529, 592

instantiating an object 523

name 500

set method 672

class-average problem 550, 551, 555, 556

class cannot extend a final class 741

Class class 719, 740

getName method 719, 740

.class file 502

separate one for every class 670

class hierarchy 694, 725

class instance creation expression 525, 535

class keyword 500, 524

class library 5

class method 591

class name

fully qualified 529

class variable 592, 685

classwide information 685

Classes 227

AbstractButton 789, 792

ActionBar 432, 435, 437

ActionEvent 784, 785, 789

Activity 101, 113

ActivityNotFoundException 151, 364

Adapter 287

AdapterView 287

AlarmManager 433

AlertDialog 132, 142

AlertDialog.Builder 132

Animation 164

AnimationUtils 164, 175

Animator 240

AnimatorListenerAdapter 226, 240

AppWidgetProvider 429, 433, 487, 490

ArithmeticException 759

ArrayAdapter 356, 368, 373, 379

ArrayIndexOutOfBoundsException 627, 629

ArrayList 164

ArrayList<T> 657, 657, 659, 801, 801

Arrays 141, 654

AssetManager 164

AsyncTask 287, 295, 300, 481

AtomicBoolean 250, 257

AttributeSet 204

AudioManager 195, 205

AWTEvent 786

BigDecimal 537

BigInteger 825

Bitmap 196, 251, 267

BitmapDrawable 357

BitmapFactory 356

BitmapFactory.Options 356

Boolean 800

BroadcastReceiver 429, 430, 487

Bundle 113, 117, 120

Button 132, 142

Byte 800

Camera 396, 410

Camera.Parameter 410

Camera.Parameters 396

Camera.PictureCallback 396, 414, 415

Camera.ShutterCallback 415

Canvas 196, 251

Character 800

Class 719, 740

Collections 164, 801

Color 263

ComponentName 490

ContentResolver 251, 278

ContentValues 310

ContentValues class 278

Context 142, 403

Criteria 324

Cursor 287

CursorAdapter 287, 295

CursorFactory 312

Dialog 250

DialogFragment 427, 428, 456, 458

DialogInterface 142

Display 325

Double 800

Drawable 164, 179

EditText 101, 114

EnumSet 684

Error 766

EventListenerList 788

Exception 765

ExecutionException 827

Executors 820

File 403, 816

FileInputStream 396, 816

FileOutputStream 395, 816

FileReader 816

FileWriter 816

Float 800

FlowLayout 782

Formatter 816

Fragment 427, 428, 435, 449, 456, 459, 480

FragmentManager 429, 435

FragmentTransaction 429

FragmentTransactions 431

FrameLayout 197, 326, 431

GeoPoint 324

GestureDetector.SimpleGestureListener 201

GestureDetector.SimpleOnGestureListener 195

Handler 164

HashMap 165, 812

HashSet 811

Hashtable 812

ImageView 75, 89

IndexOutOfRangeException 629

InputMethodManager 142

InputMismatchException 760

InputStream 164, 179, 187

InputStreamReader 468, 483

Integer 800

Intent 132, 142, 151

IntentService 489

InterruptedException 821

JButton 789, 792

JComboBox 793

JComponent 788, 793

JPasswordField 780, 785

JsonReader 426, 430, 468, 472, 481

JTextComponent 780, 783

JTextField 780, 784, 787

KeyEvent 789

LayoutInflater 132, 142

LayoutParams 338

LinearInterpolator 240

LinkedList 801

ListActivity 287

ListFragment 427, 428, 449

ListView 286

Location 324

LocationManager 324

Log 164, 179

Long 800

MapActivity 324

MapView 324

Math 591

MediaController 396

MediaPlayer 356, 383

MediaPlayer.OnCompletionListener 396

Menu 164, 182

MenuInflater 287, 297

MotionEvent 194, 200, 251, 273

MouseAdapter 796

MouseEvent 788

NotSerializableException 395

ObjectAnimator 226

ObjectInputStream 396, 404, 816

ObjectOutputStream 395, 405, 816

OutputSteam 395

OutputStream 251, 278

Paint 196

Path 251

PendingIntent 429, 490

PowerManager 324

Projection 344

R 117

R.color 137

R.drawable 117

R.id 117, 118

R.layout 117

R.string 117

Random 599, 600

RelativeLayout.LayoutParams 238

RemoteViews 472, 487, 490, 492

Resources 175

RuntimeException 766

Scanner 507, 528

ScrollView 131

SeekBar 99, 101, 114

Sensor 250

SensorEvent 261

SensorManager 250, 257, 258

SharedPreferences 132, 142, 143, 231

SharedPreferences.Editor 132, 146

Short 800

SimpleCursorAdapter 295

SoundPool 195, 205

SQLiteDatabase 287

SQLiteOpenHelper 287

StackTraceElement 774

SurfaceHolder 195, 205

SurfaceView 195, 205, 398

SwingWorker 825

TableLayout 101, 133

TableRow 101

TextView 75, 86, 101, 114

Thread 195, 216

Throwable 765, 774

Toast 251, 278, 322

ToggleButton 319, 324

TransitionDrawable 357, 388

TreeMap 812

TreeSet 811

UnsupportedOperationException 806

Uri 142, 151

ValueAnimator 226

VideoView 393, 395, 396

View 195

ViewGroup 131

ViewPropertyAnimator 226, 239

WakeLock 324

CLASSPATH

environment variable 503

clear method

of ArrayList<T> 657

of List<T> 806

clear method of class SharedPreferences.Editor 150

click a button 780

click the mouse 792

click the scroll arrows 795

client

of an object 533

client code 721

clone method of Object 718

cloning objects

deep copy 718

shallow copy 718

close a window 780

close method of class SQLiteOpenHelper 309

closed tour 246

code file 55

code highlighting xxv, 2

code license xxii

code reuse 694

code walkthrough 2

code.google.com/android/maps-api-tos.pdf xxiii

coin tossing 600, 616

collection xxi, 656, 799

shuffle 179

collection hierarchy 800

Collection interface 800, 800, 803, 808

contains method 803

iterator method 803

Collections class 164, 801

addAll method 808

binarySearch method 808

copy method 808

fill method 808

max method 808

min method 808

reverse method 808

reverseOrder method 809

shuffle method 164, 808, 810

sort method 808

collections framework 799

College Loan Payoff Calculator App exercise 126

collision detection 207, 209

color 196, 253

transparent 140

Color class 263

alpha method 263

argb method 264

blue method 263

green method 263

red method 263

color effects 412

color element representing a color resource 135

color resource

predefined 137

Color Swiper App exercise 423

enhanced 496

colors.xml 134, 166

column 644

columns in a TableLayout 101

numbered from 0 107

columns of a two-dimensional array 644

com.google.android.maps package 324

combo box 793

comma (,) formatting flag 570

comma-separated list

of arguments 505

of parameters 594

command button 789

command line 501

command-line argument 593

Command Prompt 501

command window 501

comment

end-of-line (single-line), // 500, 501

single line 501

CommissionEmployee class derived from Employee 733

commit method of class FragmentTransaction 442

Comparable<T> interface 753, 808

compareTo method 808

Comparator interface 808

compare method 809

Comparator object 812

Comparator<String> object

String.CASE_INSENSITIVE_ORDER 144

compare method of interface Comparator 809

compareTo method of Comparable 808

comparison operator 753

Compass xxi

compatibility 42

compatibility package 428

compatible device 42

compilation error 500

compile 502

compile-time type safety 799

compiler error 500

compiling an application with multiple classes 526

compiling apps 50

component 22

component of an array 619

ComponentName class 490

composition 679, 694

compound assignment operators 562

compound interest 568

CompoundButton.OnCheckedChange Listener interface 324, 329, 336

compress method of class Bitmap 278

computer-assisted instruction (CAI) 617

computer-assisted instruction (CAI): Reducing Student Fatigue 617

computer-assisted instruction (CAI): Varying the Types of Problems 617

Computer Assisted Instruction app exercise 190

computer-assisted instruction (CAI) exercise 190

computers in education 617

concatenate strings 687

concatenation 595

concrete class 724

concrete subclass 729

Concurrency API 819

concurrent garbage collector 14

concurrent operations 818

concurrent programming 819

ConcurrentLinkedQueue 227

ConcurrentLinkedQueue interface 227

condition 513

conditional AND, && 578, 580

truth table 579

conditional expression 548

conditional operator, ?: 548

conditional OR, || 578, 579

truth table 580

confusing the equality operator == with the assignment operator = 516

connection state 20

conserve battery power 331

consistent state 672

constant 689

in an interface 753

Math.PI 520

constant integral expression 571, 577

constant variable 577, 624, 689

must be initialized 624

Constants

MODE_PRIVATE 144

MODE_WORLD_READABLE 144

MODE_WORLD_WRITABLE 144

constructor 525, 534

call another constructor of the same class using this 675

multiple parameters 536

no argument 675

overloaded 672

parameter list 535

Constructor failure exercise 777

constructors cannot return a value 535

consume an event 784

Contacts 13

contain other Views 131

Container class

setLayout method 782

contains method

of Collection 803

contains method of class ArrayList<T> 657, 659

containsKey method of Map 814

content provider 354

content providers

audio 355

built-in 355

images 355

ContentResolver class 251, 278

insert method 278

ContentValues class 278, 310

put method 278

Context class 142, 233, 403

Context.LAYOUT_INFLATER_SERVICE 146

getSharedPreferences method 144

getSystemService method 146

startActivity method 132, 151

Context menu 45

Context.LAYOUT_INFLATER_SERVICE constant 146

Context.SENSOR_SERVICE constant 259

ContextWrapper class

getAssets method 175, 179

getResources method 175

continue statement 578, 578

control 21

control statement 546

control variable 550, 565, 566

controlling expression of a switch 575

controls 779

Cooking with Healthier Ingredients App exercise 316

copy method of Collections 808

copying objects

deep copy 718

shallow copy 718

core package 502

corners element of a shape 289

cos method of Math 592

cosine 592

counter 550

counter-controlled repetition 550, 551, 557, 565, 566

Country Quiz App exercise 189

Craigslist 9

CraigsList (www.craigslist.org) 496

craps (casino game) 190, 602, 617

Craps Game App exercise 189

modification 190

create a layout XML file 140, 170

create a package 689

create a resource file 134, 166

create an object of a class 525

Create New Android String dialog 87

createBitmap method of class Bitmap 271

createChooser method of class Intent 376

createFromStream method of class Drawable 164, 179

creating a database 309

creating and initializing an array 622

credit limit on a charge account 586

Criteria class 324, 330

ACCURACY_COARSE 330

ACCURACY_FINE 330

ACCURACY_HIGH 330

ACCURACY_LOW 330

ACCURACY_MEDIUM 330

BearingRequired method 330

NO_REQUIREMENT 330

POWER_HIGH 330

POWER_LOW 330

POWER_MEDIUM 330

setAccuracy method 330

setAltitudeRequired method 330

setCostAllowed method 330

setPowerRequirement method 330

Crossword Puzzle Generator App exercise 317

enhanced 496

cryptographic key 50

<Ctrl>-d 574

ctrl key 574

<Ctrl>-z 574

cursor 501, 503

Cursor class 287, 302, 312

deactivate method 296, 297

deactivated Cursor 297

getColumnIndex method 302

getColumnIndexOrThrow method 302

getString method 302

life-cycle 297

moveToFirst method 302

requery method 297

Cursor visible property of an EditText 109

CursorAdapter class 287, 295

changeCursor method 296, 297

getCursor method 296

CursorFactory class 312

custom subclass of View 201

custom view 194

customizable Home screens 12

D

Daily Deals Mashup App exercise 348, 497

Dalvik Debug Monitor Service (DDMS) 54, 164

Dalvik Virtual Machine 7

data binding 287

data cost 330

data hiding 530

data structure 619

database

creating 309

opening 309

upgrading 309

version number 312

date 599

Date class exercise 692

date/time picker 14

DDMS (Dalvik Debug Monitor Server) 54, 164

sending GPS data to an AVD 322

DDMS perspective 322

GPX tab 323

LogCat tab 164

deactivate method of class Cursor 296, 297

deactivated Cursor 297

dealing 630

debug certificate 321

debugging 51

logging exceptions 164, 179

decimal integer formatting 508

decision 513

declaration

class 500

import 506, 507

method 501

declare a method of a class 523

decodeStream method of class BitmapFactory 388, 473

decrement of a control variable 565

decrement operator, -- 562

deep copy 718

default case in a switch 575, 577

default constructor 534, 678, 700

default exception handler 774

default initial value 532

default package 529

default value 532

Deitel Resource Centers (www.deitel.com/ResourceCenters.html) xxvi, 34

Deitel Web site (www.deitel.com) xxxix

Deitel® Buzz Online Newsletter (www.deitel.com/newsletter/subscribe.html) xxxix, 34, 493

Deitel® Training (www.deitel.com/training) 493

delegation event model 786

delete method of class SQLiteDatabase 312

density 44

density-independent pixels (dp or dip) 88, 88, 89, 135

deserialized 396

deserialized object 818

design process 24

designing for multiple devices 43

designing for performance 42

designing for responsiveness 42

designing for seamlessness 42

Dev Guide 42, 50

developer documentation 69

Android Compatibility 69

Android Emulator 70

Android FAQs 70

Android Market Content Policy for Developers 70

Android User Interface Guidelines 70

AndroidManifest.xml File Element 69

Application Fundamentals 69

Common Tasks and How to Do Them in Android 70

Designing for Performance 69

Designing for Responsiveness 70

Designing for Seamlessness 70

Icon Design Guidelines, Android 2.0 70

In-app Billing 70

Localization 47, 70

Manifest.permission Summary 69

Market Filters 70

Preparing to Publish: A Checklist 70

Publishing Your Applications: Using Intents to Launch the Market Application on a Device 63

Sample Apps 70

Signing Your Applications 54

Speech Input 70

Supporting Multiple Screens 44, 69

Technical Articles 70

Using Text-to-Speech 70

Versioning Your Applications 70

developer.android.com/guide/developing/tools/adb.html xxxix

developer.android.com/guide/developing/tools/emulator.html xxxix

developer.android.com/guide/developing/tools/othertools.html#android xxxviii

developer.android.com/guide/publishing/app-signing.html xxxix

developer.android.com/sdk/android-2.2-highlights.html 9

developer.android.com/sdk/eclipse-adt.html xxxiii

developer.android.com/sdk/index.html xxxiii

developer.android.com/sdk/requirements.html xxxi

development perspective 76

device administration app policies 15

device configuration 19

Device Screen Capture window 54, 55

.dex file (code file) 55

Dialog class 250

dismiss method 265

setContentView method 263, 266

show method 263

dialog icon 44

DialogFragment class 427, 428, 456, 458

DialogInterface class 142

DialogInterface.OnClickListener interface 142, 185

DialogInterface.OnMultiChoiceClickListener interface 185

diameter 520

dice game 602

digit 507

digital certificate 53, 321

Digital Clock App exercise 221

Digital Rights Management (DRM) framework 15

digital zoom 8

digitally sign your app 53

dimen element representing a dimension resource 135

dimen.xml 134, 166

dimensions of the screen 339

dip (density-independent pixels) 88, 88, 89

direct superclass 694, 696

direction 319

directory 816, 817

name 816

disk I/O completion 765

dismiss method of class Dialog 265

dispatch

an event 788

dispatchDraw method of class View 340

display a Drawable on a Button 358

display a line of text 501

Display class 325, 339

getHeight method 339

getWidth method 339

display output 517

distance between values (random numbers) 601

distanceTo method of class Location 332

divide-and-conquer approach 591

divide by zero 759

division 510, 511

division compound assignment operator, /= 563

DivvideAndConquer Game App: Open Source exercise 222

do...while repetition statement 547, 570

document a program 499

documentation

Android Developer Guide 2

Android Market Developer Distribution Agreement 3

Android Market Getting Started 3

application resources (developer.android.com/guide/topics/resources/index.html) 87

Class Index 2

Data Backup 2

Debugging Tasks 3

Managing Projects from Eclipse with ADT 3

Package Index 2

Publishing Your Applications 3

Security and Permissions 3

Tools Overview 3

User Interface Guidelines 2

Using the Android Emulator 2

doInBackground method of class AsyncTask 295, 296, 296, 301

dollar signs ($) 500

Doodlz app xxi, 24

Doodlz App exercise 280 enhanced 390

dot (.) separator 525, 570, 591, 685

(double) cast 558

Double class 800

double equals, == 516

double-precision floating-point number 537

double primitive type 507, 536, 537, 555, 836

promotions 598

double quotes, " 501, 504

double-selection statement 547

double tap 21

double-tap event 195, 201, 210

downcast 739

downcasting 722

downloading source code xxv

downsample an image 356

dp (density-independent pixels) 88, 89

drag 21

drag event 275

drag the scroll box 795

DragEvent framework 14

draw

circles 196

lines 196

text 196

draw method of class Overlay 343

Drawable

display on a Button 358

Drawable class 164, 179

createFromStream method 164, 179

Drawable resource

shape element 289

drawBitmap method of class Canvas 272

drawCircle method of class Canvas 213

drawing characterstics 196

color 196

font size 196

line thickness 196

drawLine method of class Canvas 213

drawPath method of class Canvas 272, 276

drawRect method of class Canvas 213

drawText method of class Canvas 213

drive sales 59

driver class 524

drop-down list 793

dummy value 555

Duplicate Elimination 662

duration of an animation 226, 239

dynamic binding 738

dynamic resizing 619

dynamically load a resource 175

E

e method of class Log 179

echo character of class JPasswordField 780

Eclipse xix, xxi, xxxiii, 24, 75

demonstration video (www.deitel.com/books/androidHTP) 499

download (www.eclipse.org/downloads/) xxxiii

import project 100, 129, 163, 193, 225

Java perspective 25

Outline window 100, 101

Override/Implement Methods option 120

Eclipse documentation (www.eclipse.org/documentation) xxvi

Eclipse IDE 2, 6, 20, 75, 76 Properties tab 75

Eclipse IDE for Java Developers xxxi, xxxiii

Eclipse Resource Center (www.deitel.com/Eclipse/) xxvi, 34

edit method of class SharedPreferences 146

Editable interface 114

EditText class 101, 114

android:hint attribute 139

android:imeOptions attribute 139, 292

android:inputType attribute 292

android:singleLine attribute 359

Cursor visible property 109

Long clickable property 109

EditText component

Cursor visible property 109

Text size property 107

Eight Queens App exercise 246

element of an array 619

eligible for garbage collection 688

eliminate resource leaks 768

Email 13

Employee abstract superclass 728

Employee class hierarchy test program 736

Employee class that implements Payable 748

empty statement (a semicolon, ;) 516

empty string 785

emulator 20, 51

emulator functionality 51

emulator gestures and controls 21

emulator limitations 51

encapsulation 24

“end of data entry” 555

end-of-file (EOF)

indicator 574

marker 815

end-of-line (single-line) comment, // 500, 501

End User License Agreement (EULA) 50, 51

Enhanced Address Book app xxii

enhanced for statement 634

Enhanced Slideshow app xxi

Enhanced Slideshow App exercise 422

Enhancing Class Time2 (exercise) 691

Enter (or Return) key 787

enum 605

constant 682

constructor 682

declaration 682

EnumSet class 684

keyword 605

values method 683

enumeration 605

enumeration constant 605

EnumSet class 684

range method 684

Environment class

getExternalFilesDir method 403

environment variable

CLASSPATH 503

PATH 502

equal likelihood 600

equality operators 513

equals method

of class Arrays 654

of class Object 718

eraseColor method of class Bitmap 267

Error class 766

escape character 504

escape sequence 504, 507

, backslash 504

", double-quote 504

, horizontal tab 504

newline, 504, 507

Euclid’s Algorithm 616

Euler 246

event 753, 780

event classes 786

event-dispatch thread (EDT) 824

event distribution 14

event driven 780

event handler 753, 780

adding extra information to a View 356

returning false 201

returning true 201

event handling 101, 780, 783, 787

event source 784

event ID 789

event listener 753, 786, 796

adapter class 796

interface 783, 784, 787, 788, 796

event object 786

event registration 784

event source 784, 786

EventListenerList class 788

EventObject class

getSource method 785

events 5

examination-results problem 560

Examples xxxix

exception 629, 758

handler 629

handling 627

parameter 630

Exception class 765

exception handler 763

exception parameter 763

Exceptions 629

IndexOutOfRangeException 629

Exchange Calendar 7

execSQL method of class SQLiteDatabase 313

execute method of class AsyncTask 295

execute method of the Executor interface 820, 822, 823

ExecutionException class 827

Executor interface 820

execute method 820, 822, 823

Executors class 820

newCachedThreadPool method 821

ExecutorService interface 820

shutdown method 823

exists method of File 817

exit method of class System 768

exp method of Math 592

Expense Tracker App exercise 316 enhanced 422

explicit conversion 558

explicit Intent 151, 287, 299

exponential method 592

exponentiation operator 570

export laws 57

Export Wizard 53

exposure data 9

expression 508

extend a class 694

extends keyword 697, 708

extensibility 721

external storage directory 403

extra information for use in event handlers 356

extras for an Intent 299

F

Face Unlock 16

Facebook 63, 65

Deitel page (www.deitel.com/deitelfan/) 34, 64, 493

friend 64

factory settings 7

Fahrenheit 797

equivalent of a Celsius temperature 616

false keyword 513, 548

fatal error 550

fatal logic error 550

fault tolerant 508

fault-tolerant program 629

Favorite Flickr Searches App exercise 156

enhanced 156

Favorite Twitter Searches app xxi, xxii, 128

Favorite Twitter Searches App exercise

enhanced 316, 390, 495

enhancements 156

favorites tray 15

featured apps 18

fee-based app 18

Fibonacci series 663

field 529

default initial value 532

field of a class 606

field width 569

file 815

File class 403, 816

canRead method 817

canWrite method 817

exists method 817

File methods 817

getAbsolutePath method 403, 817

getName method 817

getParent method 817

getPath method 817

isAbsolute method 817

isDirectory method 817

lastModified method 817

length method 817

list method 817

File methods 817

file processing 393, 402, 816

file system access 19

FileInputStream class 396, 816, 818

FileOutputStream class 395, 816, 818

FileReader class 816

FileWriter class 816

fill method

of class Arrays 654, 656

of class Collections 808

fill_parent value of the android:layout_height attribute 94

final

class 741

classes and methods 741

keyword 577, 592, 624, 689, 741

local variable 795

method 741

variable 624

final value 566

finalize method 718

finally

block 763, 768

clause 768

keyword 763

financial transaction 62

findFragmentById method of class FragmentManager 441

finish method 376

finish method of class Activity 300, 376

Fireworks Designer App exercise 221

Fisher-Yates shuffling algorithm 633

fixed text 508

in a format string 505

Flag Quiz Game app xxi

exercise 189

flag value 555

flash support 8

fling 21

fling touch event 195

FlipBook Animation App exercise 422

float

primitive type 507, 536, 537, 836

primitive type promotions 598

Float class 800

floating-point constant 568

floating-point literal 537

double by default 537

floating-point number 536, 554, 555, 557

division 558

double precision 537

double primitive type 536

float primitive type 536

single precision 537

floor method of Math 592

flow of control 558

FlowLayout class 782

focus 780

Focusable property of a component 109

Folders

assets 163

res/anim 171

res/drawable 289

res/menu 292

res/raw 194, 198

font size 196

for repetition statement 547, 566, 566, 569

enhanced 634

header 567

nested 626

format method of class String 194, 667

format specifier

multiple in a String resource 194, 197

numbering 194

numbering in a String resource 194, 197

format specifiers 505

%.2f for floating-point numbers with precision 559

%d 508

%f 520, 538

%s 505

format string 505

format Strings 194

formatted output

, (comma) formatting flag 570

%f format specifier 538

– (minus sign) formatting flag 569

0 flag 626, 667

comma (,) formatting flag 570

field width 569

floating-point numbers 538

grouping separator 570

left justify 569

minus sign () formatting flag 569

precision 539

right justification 569

Formatter class 816

Fortune Teller App exercise 281

forums 3

Android Forums 4

Android Market Help Forum 4

Stack Overflow 3

Fractal App exercise 281

fragile software 713

fragment 427, 428

Fragment class 427, 428, 435, 441, 449, 456, 459, 480

getArguments method 477

isAdded method 464

onActivityCreated method 450, 463

onCreateView method 458, 462

setArguments method 460, 476

fragment element in a layout XML file 431

FragmentManager class 429, 435, 441

findFragmentById method 441

fragments compatibility package 428

FragmentTransaction class 429, 431, 441, 442

commit method 442

replace method 442

frame-by-frame animation xxi

FrameLayout class 197, 326, 431

fraudulent order 49

free app 18, 58

free apps xxii

friend 64

friend in Facebook 64

Froyo (Android 2.2) 7

fully qualified class name 529

fully qualify a custom View’s class name

in an XML layout 194

function 591

future proof 41

G

Gallery app 13, 350

game loop 207, 216

Game of Snake App exercise 281

game playing 599

games 41

gaming console 6

garbage collection 819

garbage collector 684, 685, 765, 768

gen folder of an android project 117

general class average problem 554

generalities 721

generic class 657

geographic coordinates 344

geographic location 324

geometric path 251

GeoPoint class 324, 333, 344

gesture 6

double tap 6

drag 6

fling 6

long press 6

pinch zoom 6

touch 6

GestureDetector.OnDoubleTapListener interface 195, 201

GestureDetector.OnGestureListener interface 195

GestureDetector.SimpleGestureListener class 195, 201

GestureDetector.SimpleGestureListener>default para font> class

onDoubleTap method 201

Gestures

drag 6

flick 6

long press 6

pinch 6

tap 6

get a value 533

get method

of class ArrayList<T> 659

of interface List<T> 803

of interface Map 814

get method 533, 672

getAbsolutePath method of class File 403, 817

getActionBar method 447

getActionCommand method of class ActionEvent 785, 792

getActionIndex method of class MotionEvent 274

getActionMasked method of class MotionEvent 273

getAll method of class SharedPreferences 144

getArguments method of class Fragment 477

getAssets method of class ContextWrapper 175, 179

getBearing method of class Location 333

getBestProvider method of class LocationManager 331

getClass method of Object 719, 740

getClassName method of class StackTraceElement 774

getColumnIndex method of class Cursor 302

getColumnIndexOrThrow method of class Cursor 302

getController method of class MapController 328

getCursor method of class CursorAdapter 296

getData method of class Intent 375

getDefaultSensor method of class SensorManager 258

getDouble method of class Bundle 118

getExternalFilesDir method of class Environment 403

getExtras method of class Intent 300, 306

getFileName method of class StackTraceElement 774

getFragmentManager method of class Activity 435

getHeight method of class Display 339

getHolder method of class SurfaceView 205

getInt method of class SharedPreferences 233

getIntent method of class Activity 300, 306

getLastKnownLocation method of class LocationManager 331

getLatitude method of class Location 333

getLineNumber method of class StackTraceElement 774

getListView method of class ListActivity 294, 359

getLong method of class Bundle 300

getLongitude method of class Location 333

getMenuInflater method of class Activity 297

getMessage method of class Throwable 774

getMethodName method of class StackTraceElement 774

getName method of class Class 719, 740

getName method of class File 817

getParent method of class File 817

getPassword method of class JPasswordField 785

getPath method of class File 817

getPointerCount method of class MotionEvent 275

getPreferences method of class Activity 230

getProjection method of class MapView 344

getResources method of class ContextWrapper 175

getSelectedIndex method of class JComboBox 796

getSharedPreferences method of class Context 144

getSource method of class EventObject 785

getStackTrace method of class Throwable 774

getStateChange method of class ItemEvent 796

getString method of class Activity 150

getString method of class Bundle 118

getString method of class Cursor 302

getString method of class JsonReader 470

getString method of class Resource 194

getString method of class Resources 237

getString method of class SharedPreferences 145

getStringArray method of class Resources 440

getSystemService method of class Activity 148

getSystemService method of class Context 146

getSystemService method of clsdd Activity 258

getTag method 370, 371

getTag method of class View 356, 370, 371

getView method of class ArrayAdapter 369

getWidth method of class Display 339

getWritableDatase method of class SQLiteOpenHelper 309

getX method of class MotionEvent 275

getY method of class MotionEvent 275

Global Address Lists look-up 7

Google

Maps 496

Google APIs 5

Google Checkout 59

Google Maps xxiii, 9, 319

API 321

API key 321

obtain API key 321

satellite map 319

street map 319

Google Maps API 324, 326, 345

Google Maps web services xxiii

goto elimination 546

goto statement 546

GPS xxi

mock data for testing purposes 326

GPS data 324, 330

GPS Exchange Format 322

GPS fix 324, 334

GPS satellite 322

GPS signal 322

acquired 322

GPS_EVENT_FIRST_FIX constant of class GpsStatus 334

GPSLogger app for recording GPS data 322

GpsStatus class

GPS_EVENT_FIRST_FIX 334

GpsStatus.Listener interface 324, 331, 334

.gpx extension 322

GPX File

sending to an AVD 322

GPX file 322

GPX tab in the DDMS perspective 323

graph information 626

graphical user interface (GUI) 753, 779

graphics xxi, xxiii, 19

graphics APIs xxiii

Gravity property of a component 108

gravity sensor 14, 250

greatest common divisor (GCD) 616

green method of class Color 263

grouping separator (formatted output) 570

guarding code with a lock 824

“guess the number” game 616, 797

guesture 21

GUI (Graphical User Interface) 753

component 779

design 41

GUI components

Button 132

EditText 101

ImageView 75, 89

naming convention 101, 133, 165

programmatically create 132

ScrollView 131

SeekBar 99, 101

TextView 75, 80, 86, 101

ViewGroup 131

gyroscope sensor 14, 250

H

handle an exception 760

Handler class 164

postDelayed method 164

removeCallbacks method 384

handling user events xxi

Hangman Game App exercise 281

hard buttons on an android device 28

hardware accelerated graphics 227

hardware support 19

Hardware-accelerated 2D graphics 15

has-a relationship 679, 694

hash table 811

hashCode method of Object 719

HashMap class 165, 812

keySet method 814

HashSet class 811

Hashtable class 812

hashtag 65

hasNext method

of class Scanner 575

of interface Iterator 803, 806

hasNext method of class JsonReader 484

hasPrevious method of ListIterator 806

Headset Profile (HSP) 15

height of a table row 101

“hidden” fields 606

hide the soft keyboard 147

hideSoftInputFromWindow method of class InputMethodManager 148

hiding an app’s title bar 326

hint in an EditText 291

holographic theme 250, 252

holographic UI 12, 14

home screen folder 15

Home screen widget 14

horizontal tab 504

Horse Race with Cannon Game app exercise 220

Horse Race with SpotOn Game App exercise 245

HourlyEmployee class derived from Employee 731

HousingMaps.com (www.housingmaps.com) 496

HTML5 8

HTTP Live Streaming (HLS) 14

HTTP progressive streaming 8

HugeInteger Class exercise 692

humor 70

I

i-Newswire 67

icon 46, 50, 51

icon design firms

Aha-Soft 52

Androidicons 52

glyFX 52

Iconiza 52

Icon Design Guidelines 44, 52

icon design services 52

Id property of a layout or component 85, 89

IDE (integrated development environment) xxiii, xxxiii, 20

identifier 500, 507

Idiomatic Expressions Translator Mashup App exercise 497

IEEE 754 (grouper.ieee.org/groups/754/) 836

IEEE 754 floating point 836

if single-selection statement 513, 547, 571

if...else double-selection statement 547, 547, 557, 571

ignoring array element zero 629

IllegalArgumentException class 666

image

downsample 356

image choosing Activity 376

Image Converter App exercise 390

images xxiii

ImageView

android:adjustViewBounds attribute 169

ImageView class 75, 89

setImageResource method 238

Src property 75, 91

immutable object 687

implement an interface 720, 742, 749

implementation of a function 729

implements keyword 742, 747

implicit conversion 558

implicit Intent 151

import an existing project into Eclipse 100, 129, 163, 193, 225

import declaration 506, 507, 529

Import dialog 25, 100, 129, 163, 193, 225

in-app advertising 58, 60

in-app billing 59, 60, 61

security best practices 62

in-app purchase 62

increment

a control variable 566

expression 578

of a control variable 565

operator, ++ 563

increment and decrement operators 563

incur data cost 330

indefinite repetition 555

indentation 549

index 627

index (subscript) 619

index of a JComboBox 795

index zero 619

indexOf method of class ArrayList<T> 657

IndexOutOfRangeException class 630

indirect superclass 694, 696

infinite loop 550, 567

infinite recursion 718

infinite series 587

inflate

XML layout dynamically 132

inflate a layout 146

inflate method of class LayoutInflater 146

inflate the GUI 205

inflating a GUI 118

information hiding 24, 530

inheritance 24, 101, 694

examples 695

extends keyword 697, 708

hierarchy 695, 725

hierarchy for university CommunityMembers 695

initial value of control variable 565

initialization at the beginning of each repetition 560

initialize a variable in a declaration 507

initializer list 623

initializing two-dimensional arrays in declarations 646

inlining method calls 676

inner class 783

anonymous 795

innermost set of brackets 629

input data from the keyboard 517

input/output package 599

InputMethodManager class 142

hideSoftInputFromWindow method 148

InputMismatchException class 760, 762

InputStream class 164, 179, 187, 818

setImageDrawable method 164, 179

InputStreamReader class 468, 483

insert method of class ContentResolver 278

insert method of class SQLiteDatabase 310

insertion point 656

instance 23

instance (non-static) method 686

instance of a class 530

instance variable 23, 529, 530, 537, 592

instanceof operator 739

instantiating an object of a class 523

int primitive type 507, 555, 563, 571, 836

promotions 598

integer 505

array 623

division 554

quotient 510

value 507

Integer class 800

integer division 510

integerPower method 615

integral expression 577

integrated development environment (IDE) xxiii, xxxiii, 20

intent xxi

Intent class 132, 142, 151

ACTION_GET_CONTENT constant 376

ACTION_VIEW constant 151

broadcast 430

Bundle 299

createChooser method 376

explicit 151, 287, 299

extras 299

getData method 375

getExtras method 300, 306

implicit 151

MIME type 355

putExtra method 299

setType method 376

intent-filter element of the manifest file 153

IntentService class 489

interest rate 568

interface 101, 720, 743, 751

declaration 742

implementing methods in Java 121

tagging interface 395

interface keyword 742

Interfaces 227, 742

ActionListener 784, 788

AdapterView.OnItemClickedListener 294

AdapterView.OnItemClickListener 298

AdapterView.OnItemLongClickListener 429

AnimatorListener 226

AnimatorUpdateListener 226

Collection 800, 800, 808

Comparable 753, 808

Comparator 808

CompoundButton.OnCheckedChangeListener 324, 329, 336

DialogInterface.OnClickListener 142, 185

DialogInterface.OnMultiChoiceClickListener 185

Editable 114

Executor 820

ExecutorService 820

GestureDetector.OnDoubleTapListener 195, 201

GestureDetector.OnGestureListener 195

GpsStatus.Listener 324, 331, 334

Iterator 801

KeyListener 789

List 165, 800, 806

ListIterator 801

LocationListener 324, 332, 333

Map 165, 800, 812

MouseListener 788

MouseMotionListener 789, 796

ObjectInput 818

ObjectOutput 818

OnCompletionListener 417

OnItemLongClickListener 429

Queue 800, 800, 811

Runnable 164, 386, 819, 753

SeekBar.OnSeekBarChangeListener 114, 263, 264

SensorEventListener 250, 259

Serializable 395, 399, 753

Set 800, 800, 811

SortedMap 812

SortedSet 812

SurfaceHolder.Callback 195, 205, 215

SwingConstants 753

TabListener 447

TextWatcher 114

View.OnClickListener 142

WindowListener 796

internationalization 87

Internet calling 11

Internet enabled applications xxi

Internet Public Relations

InternetNewsBureau.com 67

PRX Builder 67

Internet public relations resources

ClickPress 66

Deitel Internet Public Relations Resource Center 66

i-Newswire 67

InternetNewsBureau.com 67

Marketwire 67

Mobility PR 67

openPR 67

PR Leap 67

Press Release Writing 67

PRLog 66

PRWeb 66

PRX Builder 67

Internet public relations resourcesPRWeb 66

Internet telephony 12

interpolator for an animation 226

interrupt method of class Thread 821

InterruptedException class 821

intrinsic lock 823

invalidate method of class View 271

invoke a method 533

is-a relationship 694

isAbsolute method of File 817

isAdded method of class Fragment 464

isDirectory method of File 817

isEmpty method Map 815

isRouteDisplayed method of class MapActivity 335

item element

android:icon attribute 293

android:orderInCategory attribute 293

android:title attribute 293

android:titleCondensed attribute 293

item element for defining a MenuItem in a resource file 292

item element in a string-array element 166

ItemEvent class getStateChange method 796

iteration 553 of a loop 565, 578

iteration (looping) of a for loop 628

Iterator interface 801

hasNext method 803

next method 803

remove method 803

iterator method of Collection 803

..................Content has been hidden....................

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