P

Package names, 46, 271 Paint class, 74 Path class, 75 PathEffect classes, 76 Pausing multimedia play, 117 Performance, 28, 63, 103, 188, 189, 198, 201, 204, 209, 213, 217, 218, 231, 260, 279 Permissions, 41, 139, 162 ACCESS_COARSE_LOCATlON

permission, 41, 162 ACCESS_FlNE_LOCATlON permission, 41, 162

BlND_WALLPAPER permission, 244 INTERNET permission, 41, 138, 149 READ_CONTACTS permission, 41 RECElVE_SMS permission, 41 WRlTE_CONTACTS permission, 41 WRlTE_EXTERNAL_STORAGE permission, 128 Phone

3D hardware and, 201 installation, 28 keypads, 93, 96 prepackaged systems, 34 uses for, 130 Pinch zoom, 221, 230-232 Pixels, 54 Planet Android, 72 Platform, 17

play() method, 115, 118, 122 Playback, 112 post() method, 145 Prefs class, 65 Preparing to publish, 271 PRIMARY KEY designation, 180 Private intents, 60 Procedural design, 44 Processes vs. activities, 36 Proxy, 22

pt. (points) as resolution units, 54 Public intents, 60 Publishing to Android Market, 35, 271-276

PuzzleView class updating published applications, 275

PuzzleView class, 80, 81

px. (pixels) as resolution units, 54

Queries, running, 187 query() method, 187 Query statements, 181 queueUpdate() method, 154, 155, 157 QuickTime Pro, 112

managed by Eclipse, 47 R.java file, 47 raw directory, 107 rawQuery() method, 187 READ_CONTACTS permission, 41 RECEIVE_SMS permission, 41 receiver tag, 234 Reflection, 260, 279 Refresh, 90

Refresh rate, smoothness and, 217 registerListener() method, 169 RelativeLayout class, 49 release() method, 109, 119 RemoteViews class, 241 removeUpdates() method, 166 Renderer interface, 203 rendering, 202-206 requestLocationUpdates() method, 165 res directory, 47, 107 Resampling artifacts, 111 Resolution, 87 Resolution units in. (inches) as resolution units, 54 mm. (millimeters) as resolution units, 54 pt. (points) as resolution units, 54 px. (pixels) as resolution units, 54 Resolution-independent measurements, 54 Resource compiler, 40 Resource manager, 34 Resources, 40

Resuming paused multimedia, 117 returnResult() method, 98 RGB color values, 74 Rows, adding, 186, 194 Runnable class, 145, 147

setld() method runOnFirstFix() method, 176 Runtime, 32

RuntimeException class, 186

Sampling rates, 111 Scale, with pinch zoom gesture, 231 Scale containers, 77 Scale-independent pixels, 54 ScaleGestureDetector class, 221 Screen layouts, 55, 57 Screen position, 124-126 Screen resolution, 54 Screen rotations, 116 SD cards, 127-128, 268 SDK install directory, 19 SDK Setup program, 19 SDK Starter Package, 18 Secure Digital (SD) cards, 127-128, 268 Security

JavaScript and, 140 permissions, 41, 128 select() method, 89 SELECT statements, 181, 187 Selecting tiles, 87 sensor types

TRICORDER type, 169n TYPE_ACCELEROMETER type, 169 TYPE_LIGHT type, 169 TYPE_MAGNETIC_FIELD type, 169 TYPE_ORIENTATION type, 169, 170 TYPE_PRESSURE type, 169 TYPE_PROXIMITY type, 169 TYPE_TEMPERATURE type, 169, 170 SensorManager class, 169 Sensors, 168-172 Emulator and, 170 readings, interpreting, 169 simulator, 171 SensorTest class, 169 Service class, 117, 245 service tag, 244 Services, 39, 245 setAdapters() method, 152 setBackgroundResource() method, 77 setBuiltInzoomControls() method, 175 setColor() method, 74 setContentView() method, 46, 134 setDownloadListener() method, 139 setldO method, 125

setImageMatrix() method

Sudoku program setlmageMatrix() method, 265-267 setltems() method, 69 setListeners() method, 154 setOnClickListener() method, 59, 146 setOnCompletionListener() method, 109 setSatellite() method, 175 setText() method, 145 settings.xml file, 65 Settings, adding, 66, 67 setTranslated() method, 157 Setup program (Android SDK), 19 setVideoPath() method, 113 setVolumeControlStream() method, 107 setWebChromeClient() method, 139, 145 setWebViewClient() method, 139 Shaking the screen (animation), 93 Shape drawables, 77 showEvents() method, 186, 188, 189 Signing applications, 272 Silicon Graphics, 199 simpleCursorAdapter class, 189, 197 64-bit Java Development Kit, 19 Size, 81, 87 Skins, emulator, 257 Smoothness, measuring, 217 Soft keyboards, 132 Soft lighting, 209 Sound effects, 105-110 SoundPool class, 110n sp (scale-independent pixels), 54 Spacing between fingers (multi-touch), 231

Specular lighting, 210 Speed, 28, 63, 103, 188, 189, 198, 201, 204, 209, 213, 217, 218, 231, 260, 279 Spinner class, 150 Spinners, 150 Sps, 54

SQL Pocket Guide (Gennick), 196 SQLException class, 186 SQLite, 32, 178-196 about, 178-179, 180f application basics, 185f, 181-189 blessing (license), 179 ContentProvider class, 192-196 data binding, 192f, 189-192 DDL statements, 180 modification statements, 181 overview of, 179-181 queries, running, 187

query statements, 181 rows, adding, 186, 194 SQLiteOpenHelper class, 182 start() method, 109, 112, 119 startActivity method, 135 Starter Package (Android SDK), 18 startGame() method, 78, 124 startManagingCursor() method, 187 State containers, 77 State-saving code, 38 stop() method, 112, 117, 118 stopLoading() method, 139 Storing local data, 120-128

current screen position, 124-126 internal files, accessing, 126 options, adding, 120-122 pausing game, 122-124 secure digital (SD), 127-128 Stretchable backgrounds, 236 String resource, 58

146, 157, 191, 239, 245 strings.xml file, 50 styles.xml file, 61 Subclassing, 260 Sudoku history, 44, 79, 118, 121 Sudoku program, 43-72 About box, 57-62 debugging, 69-71 defined, 43 exit button, 71 game board, 83 game class for, 79 game logic, 99 graphics for, 78-87 hints, 91, 122 input and graphics, 87-93 interface design, 44-45 menus, 64-65 multimedia, 105-119 audio, 105-110

background music for, 115-119 video, 112-115 new game button, 67-69 opening screen, 45-54 pausing, 122 PuzzleView class, 81 screen layouts, 55-57 settings, 66, 67 starting game (code), 78 themes, 61-63

Surface class

Surface class, 112, 203, 204 Surface Manager, 31 Synchronization, 279

0 0

Post a comment