www.it-ebooks.info Meier02275 ffirs V2 - 03/22/2012 www.it-ebooks.info ffirs.indd ii 4/11/2012 10:37:19 AM Meier02275 ffirs V2 - 03/22/2012 PROFESSIONAL ANDROID™ APPLICATION DEVELOPMENT INTRODUCTION xxxvii CHAPTER Hello, Android CHAPTER Getting Started 19 CHAPTER Creating Applications and Activities 53 CHAPTER Building User Interfaces 95 CHAPTER Intents and Broadcast Receivers 165 CHAPTER Using Internet Resources 201 CHAPTER Files, Saving State, and Preferences 221 CHAPTER Databases and Content Providers 251 CHAPTER Working in the Background 331 CHAPTER 10 Expanding the User Experience 359 CHAPTER 11 Advanced User Experience 425 CHAPTER 12 Hardware Sensors 481 CHAPTER 13 Maps, Geocoding, and Location-Based Services 513 CHAPTER 14 Invading the Home Screen 565 CHAPTER 15 Audio, Video, and Using the Camera 621 CHAPTER 16 Bluetooth, NFC, Networks, and Wi-Fi 665 CHAPTER 17 Telephony and SMS 701 CHAPTER 18 Advanced Android Development 739 CHAPTER 19 Monetizing, Promoting, and Distributing Applications 771 INDEX 787 www.it-ebooks.info ffirs.indd i 4/11/2012 10:37:18 AM Meier02275 ffirs V2 - 03/22/2012 www.it-ebooks.info ffirs.indd ii 4/11/2012 10:37:19 AM 12 Meier02275 ffirs V2 - 03/22/2012 PROFESSIONAL Android™ Application Development www.it-ebooks.info ffirs.indd iii 4/11/2012 10:37:19 AM Meier02275 ffirs V2 - 03/22/2012 www.it-ebooks.info ffirs.indd iv 4/11/2012 10:37:19 AM Meier02275 ffirs V2 - 03/22/2012 PROFESSIONAL Android™ Application Development Reto Meier www.it-ebooks.info ffirs.indd v 4/11/2012 10:37:19 AM Book Title V2 - MM/DD/2010 Professional Android™ Application Development Published by John Wiley & Sons, Inc 10475 Crosspoint Boulevard Indianapolis, IN 46256 www.wiley.com Copyright © 2012 by John Wiley & Sons, Inc., Indianapolis, Indiana Published simultaneously in Canada ISBN: 978-1-118-10227-5 ISBN: 978-1-118-22385-7 (ebk) ISBN: 978-1-118-23722-9 (ebk) ISBN: 978-1-118-26215-3 (ebk) Manufactured in the United States of America 10 No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, scanning or otherwise, except as permitted under Sections 107 or 108 of the 1976 United States Copyright Act, without either the prior written permission of the Publisher, or authorization through payment of the appropriate per-copy fee to the Copyright Clearance Center, 222 Rosewood Drive, Danvers, MA 01923, (978) 750-8400, fax (978) 646-8600 Requests to the Publisher for permission should be addressed to the Permissions Department, John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ 07030, (201) 748-6011, fax (201) 748-6008, or online at http:// www.wiley.com/go/permissions Limit of Liability/Disclaimer of Warranty: The publisher and the author make no representations or warranties with respect to the accuracy or completeness of the contents of this work and specifically disclaim all warranties, including without limitation warranties of fitness for a particular purpose No warranty may be created or extended by sales or promotional materials The advice and strategies contained herein may not be suitable for every situation This work is sold with the understanding that the publisher is not engaged in rendering legal, accounting, or other professional services If professional assistance is required, the services of a competent professional person should be sought Neither the publisher nor the author shall be liable for damages arising herefrom The fact that an organization or Web site is referred to in this work as a citation and/or a potential source of further information does not mean that the author or the publisher endorses the information the organization or Web site may provide or recommendations it may make Further, readers should be aware that Internet Web sites listed in this work may have changed or disappeared between when this work was written and when it is read For general information on our other products and services please contact our Customer Care Department within the United States at (877) 762-2974, outside the United States at (317) 572-3993 or fax (317) 572-4002 Wiley publishes in a variety of print and electronic formats and by print-on-demand Some material included with standard print versions of this book may not be included in e-books or in print-on-demand If this book refers to media such as a CD or DVD that is not included in the version you purchased, you may download this material at http://booksupport wiley.com For more information about Wiley products, visit www.wiley.com Library of Congress Control Number: 2011945019 Trademarks: Wiley, the Wiley logo, Wrox, the Wrox logo, Wrox Programmer to Programmer, and related trade dress are trademarks or registered trademarks of John Wiley & Sons, Inc and/or its affi liates, in the United States and other countries, and may not be used without written permission Android is a trademark of Google, Inc All other trademarks are the property of their respective owners John Wiley & Sons, Inc., is not associated with any product or vendor mentioned in this book www.it-ebooks.info ffirs.indd vi 4/11/2012 10:37:21 AM 10 Meier02275 ffirs V2 - 03/22/2012 To Kris www.it-ebooks.info ffirs.indd vii 4/11/2012 10:37:21 AM Meier02275 ffirs V2 - 03/22/2012 www.it-ebooks.info ffirs.indd viii 4/11/2012 10:37:21 AM processes – remote devices processes, 82–83 ProgressDialog, 397 ProGuard, 48 Projections, 547 promotion, 781 Google Play Store, 781–782 property animations, 70–71, 446–449 sets, 449 provider tag, 262 proximity alerts, Pending Intents, 530–532 public fi les, 248–249 publishing applications, 776–778 Q QSB (Quick Search Box), 301, 565 Earthquake Monitor, search results, 615 search results, 614–615 queries Calendar, 325–326 Content Providers Content Resolver, 274–277 Cursor Loader, 277–280 implementing, 264–266 databases, SQLite, 257–258 Download Manager, 215–217 query method, 215–217, 257–258, 264–266 Quick Search Box See QSB QuickContactBadge control, 132 R radio buttons, 381 RadioButton control, 132 raw audio, 640–643 raw resources folder, 65 RDBMS (relational database management system), 253 receiver tag, 62 Receivers, 55 current location, 524 implementing, 178–179 listening for broadcasts, 178–180 manifest Receivers, 178 managing at run time, 199–200 media playback, 632–634 proximity alerts, 531–532 receiver tag, 62 registering application manifest, 180 in code, 179–180 Recognizer Intent, 439 constants, 440 RecognizerIntent class, 439 redundant layouts, 103–105 references Activities, 126 resources, in resources, 75–76 styles in current theme, 76–77 referral tracking, 783–784 Google Analytics, 786 refreshEarthquakes method, 340–343 RegEx pattern matching Linkify and, 174 Match Filter, 176 regions, 77 registeredMediaButtonEventReceiver method, 634 registerRemoteControlClient method, 638 Relative Layout, 101–102, 428 RelativeLayout class, 98 remapCoordinateSystem method, 500–501 Remote Control Client, 637 registering, 638–639 registerRemoteControlClient method, 638 remote devices Bluetooth discovery, 671–673 selecting for communications, 675–676 808 www.it-ebooks.info bindex.indd 808 4/11/2012 10:02:58 AM Remote Views – screens Remote Views App Widget Manager, 572–574 interactivity, 575–577 Collection View Widgets, 591 populating, 594–595 Remote Views Factory, Collection View Widgets, 591–593 repeated downloads, 220 repeating Alarms, network refreshes, 354– 357 request codes, launching Activities, 169 requestLocationUpdates method, 522, 526 requiresSmallestWidthDp tag, 60 res folder, 77 resolution graphics, scalable assets, 431–434 independence, 426–427 pixels, density-independent, 426–427 testing, 435 Resource Manager, 17 resources animations frame-by-frame, 72–73 property animations, 70–71 view animations, 72 customizing, 77–78 drawables, 68–69 dynamic changes, 80 folders, 65 hardware, 77–79 in code, 74–75 Internet (See Internet resources) languages, 77–79 layouts, 69–70, 76 directory names, 79 menus, 73 references, styles in current theme, 76–77 referencing within resources, 75–76 simple values, 65–66 colors, 67 dimensions, 67–68 strings, 66–67 styles, 68 system resources, 76 themes, 68 Resources class, 74–75 results from Activities, 169–172 reverse geocoding, 532, 533–534 RFCOMM, Bluetooth and, 673–674 RingtonePreference control, 234 roll, device orientation and, 498 Rotate animations, 71 RotateAnimation, 443 Rubin, Andy, on Android, Run Configurations, 110 run time, core libraries, 15 Dalvik VM, 15 runtime binding, implicit Intents, 167–168 runtime configuration changes, 79–80 S S60 application layer, SaaS (software as a service), 217 scalable layouts, 428 Scale animations, 71 scale-independent pixels, 68 ScaleAnimation, 443 screens See also home screen aspect ratio, 78 design for, 39–40 height, available, 78 layout change, 80 orientation, 78 pixel density, 78 Preference Screens, 231 backward compatibility and, 237 layout, 232–235 resolution, independence, 426–427 size, 78, 80, 96 optimizing, 427–430 scalable layouts, 428 809 www.it-ebooks.info bindex.indd 809 4/11/2012 10:02:59 AM SDK – Sensors supporting, 427–430 testing, 435 supports-screens tag, 59–60 ttouch screens, type, 78 width supported, 60 available, 77–78 smallest, 77 SDK (software development kit) Android APIs, 14 AVD (Android Virtual Device) Manager, 14 development tools, 14 AAPT (Android Asset Packaging Tool), 48 ADB (Android Debug Bridge), 48 AVD (Android Virtual Device), 47 DDMS (Dalvik Debug Monitoring Service), 48 dmtracedump, 48 Draw9patch, 48 Dx, 48 Emulator (See Emulator) Hierarchy Viewer, 48, 51–52 Hprof-conv, 48 LayoutOpt, 48, 51–52 logcat, 48 MkSDCard, 48 Monkey, 48, 51-52 Monkey Runner, 48, 51–52 ProGuard, 48 SDK managers, 47 SQLite3, 48 Traceview, 48 documentation, 14 downloading, 21–23 features, installation, 21–23 online support, 15 sample code, 14 starter package, 19 SDK Manager, 20, 49–50 searches Activities, 292–293 default provider, 293–296 application results in system search, Content Providers metadata, 291–292 Quick Search Box, 291 Search bar, 291 Search View, 291 suggestions, 298–301 QSB (Quick Search Box), 301, 614–615 results, displaying, 294–296 SearchView widget, 297 speech recognition, 441 SearchView widget, 297 security Linux kernel-level security, 740 permissions, 740–741 declaring, 741 enforcing, 742 Intents, 742 self-terminating Services, 336 sendAccessbilityEvent method, 148 sendBroadcastSync method, 182 sendOrderedBroadcast method, 180–181 sendStickyBroadcast method, 181 Sensor class, 482 Sensor Event Listener, implementation, 485– 487 Sensor Manager, 481 accelerometer, changes, 492–493 getDefaultSensor method, 484 getSensorList method, 484 getSystemService method, 482 listing Sensors, 484 onAccuracyChanged method, 486 SensorEventListener, 485–487 Sensors, 58 accuracy, 486 environmental, barometer, 506–507 810 www.it-ebooks.info bindex.indd 810 4/11/2012 10:02:59 AM Server Sockets – Shared Preferences fi nding, 484–485 gyroscope sensor, 505–506 monitoring, SensorEventListener, 485–487 TYPE_ACCELEROMETER, 482 TYPE_AMBIENT_TEMPERATURE, 482 TYPE_GRAVITY, 482 TYPE_GYROSCOPE, 482–483 TYPE_LIGHT, 483 TYPE_LINEAR_ACCELERATION, 482 TYPE_MAGNETIC_FIELD, 483 TYPE_PRESSURE, 483 TYPE_PROXIMITY, 483 TYPE_RELATIVE_HUMIDITY, 483 TYPE_ROTATION_VECTOR, 483 values, 487–489 virtual, 483–484 Server Sockets, creating, 692 Service class, 331 skeleton, 332–333 service tag, 62 ServiceConnection, 337 Services, 54 Activities, binding, 336–338 creating, 332–333 Earthquake Monitor, 338–343 executing, 333–335 foreground, 343–345 Intent Service, implementing, 348 Loaders, 349 node, adding to manifest, 333 registering as Intent handler, 184–185 restart behavior, 333–335 self-terminating, 336 starting, 335–336 stopping, 335–336 Vibrator Service, 442 Wallpaper Service, 617–618 setAntibanding camera parameter, 650 setAutoWhiteBalanceLook camera parameter, 649 setCamera method, 658 setCancelable method, 397 setColorEffect camera parameter, 649 setContentView method, 87, 97–98 setDisplayUseLogoEnabled method, 362– 363 setFocusMode camera parameter, 650 setInexactRepeating method, 353 setLanguage method, 438 setLayoutParams method, 100 setListNavigationCallbacks method, 369–370 setMeasuredDimension method, 145 setMediaController method, 629–630 setNavigationMode method, 366–367 setNotificationVisibility method, 213 setRepeating method, 353 setResult method, 170 setRetainInstance method, 127 setSceneMode camera parameter, 649 setShowAsActionFlags method, 380–381 setTransition method, 125 setTransportControlFlags method, 639 setVideoPath method, 625 setVideoURI method, 625 setVolumeControlStream method, 632 setWhiteBalance camera parameter, 649 Shader class, 452–453 gradient shaders, 453–454 Shaders, 452–453 Color Filters, 455 Mask Filters, 454–455 Paint, 454 tile modes, 454 Shape Drawables, 431–432 shared libraries, uses-library tag, 62 Shared Preferences, 222, 238 Activity state, 242 Change Listener, 232 creating, 222–223 811 www.it-ebooks.info bindex.indd 811 4/11/2012 10:02:59 AM SharedPreferences class – static files as resources On Shared Preferences Change Listeners, 238 retrieving, 223 saving, 222–223 SharedPreferences class, 222–223 short messaging service See SMS shortcut keys, 381 signing applications, Export Android Application wizard, 772–774 SIM detecting, 79 querying details, 707 simple values, 65–66 colors, 67 dimensions, 67–68 strings, 66–67 XML, 65–66 simple values folder, 65 SimpleCursorAdapter, 156, 162–163 SIP (Session Initiation Protocol), 737 sizing, controls, 144–146 SKD (software development kit), SMS (short messaging service), 701 Emergency Responder, 720–729 messages data, 717, 719 emulator and, 719 incoming, 717–719 Intents and, 713–714 maximum size, 717 overview, 713 SMS Broadcast Intents, 717–719 SMS Manager message delivery, tracking/confi rming, 715–717 messages data messages, 717, 719 maximum size, 717 sending messages, 714–715 software availability, 765 software stack application framework, 15 application layer, 15 libraries, 15 Linux kernel, 15 run time, 15 Sound Pool, 643–645 sounds, Notifications, 408 speak method, 438 speech recognition initializing, 439 Recognizer Intents, 439 RecognizerIntent class, 439 searches, 441 voice input, 440–441 speed, design challenges, 40–41 speed synthesis, 437 See also TTS (text-tospeech) Spinner control, 132 split Action Bar, 364 SQLite, 4, databases auto-increment key, 257 constants, public, 254 design, 257 file storage, 257 null column hack, 261 querying, 257–258 rows, 260–262 SQLiteOpenHelper class, 255–257 introduction, 252, 253 SQLite Open Helper, 255–256 opening databases, 256 SQLite3, 48 SQLiteOpenHelper class, 255–257 standard reference frame device orientation and, 497–498 remapping, 500–501 startActivity method, 166–167, 234 startActivityForResult method, 169 startForeground method, 343–345 startup, Location Providers and, 527 State List Drawables, 478 static files as resources, 245 812 www.it-ebooks.info bindex.indd 812 4/11/2012 10:02:59 AM sticky Intents – ToDoContentProvider class sticky Intents, broadcasting, 181 storage external, 55–56, 246 internal, 55–56 public fi les, 248–249 streaming media audio, playback initialization, 624–625 Media Player, INTERNET permission, 623 network protocols, 623 video playback initialization, 625 playback surface, 626–629 preview, 660 Video View, 625–626 stretchable images, 434 Strict Mode, 769–770 strings, 66–67 link strings, 175–176 style tag, 68 styles, 68 styles folder, 65 sub-Activities launching, 169–170 results, 171–172 submenus, 378–379 creating, 387 support package, 27–28 supports-gl-texture tag, 60 supports-screens tag, 59–60 Surface Holders, 626–629 Surface Views, 467–470 SurfaceHolder object, 626–629 SurfaceView class, 141, 467–470 Symbian, system resources, 76 T tasks, asynchronous, 345–349 telephony, 58, 702–703 hardware support, 701–702 phone call initiation, 704 Telephony Manager data connection, 707–708 data transfer activity, 707–708 getSimSerialNumber method, 707 getSystemService method, 705 Intent Receivers, incoming phone calls, 712–713 network details, 706 phone device details, 705 SIM, querying details, 707 textual descriptions, 436 texture, supports-gl-texture tag, 60 TextView control, 132 themes, 68 styles, referencing, 76–77 Thread Policy, 769 threads background, 345–351 creating, manually, 349–351 GUI, synchronization, 349–351 Toasts, 404–405 ticker text in Notifications, 414–415 time-lapse video, 661 TimePickerDialog, 397 To-Do List application, 107–114 ArrayAdapter, 158–162 Content Provider, 283–290 database, 283–290 Fragments, 128–132 views, 135–138 Toast class, 401–405 Toasts, 401–402 displaying, 402 GUI threads, 404–405 text alignment, 403 Views, 403–404 ToDoContentProvider class, 283 813 www.it-ebooks.info bindex.indd 813 4/11/2012 10:02:59 AM ToDoListItemView class – uses-sdk tag TYPE_RELATIVE_HUMIDITY sensor, 483 TYPE_ROTATION_VECTOR sensor, 483 ToDoListItemView class, 136–138 ToggleButton control, 132 touch screen, 58 KeyEvent parameter, 475 movement tracking, 473–474 multiple touch events, 471 non-touch screen navigation, 436 onKeyDown event, 475 OnKeyListener, 475 onKeyUp event, 475 onTouchEvent handler, 471 OnTouchListener, 474–475 single touch events, 471 type, 78 Traceview, 48 trackballs, 436, 476 Transfer Mode, 456 Transform Filter, 176 Translate animations, 71 TranslateAnimation, 443 translucent colors, 452 TTS (text-to-speech), 437–439 Tweened View animation, 442 applying, 443–444 creating, 443 uses, 442–443 TYPE_ACCELEROMETER sensor, 482, 492–493 TYPE_AMBIENT_TEMPERATURE sensor, 482 TYPE_GRAVITY sensor, 482 TYPE_GYROSCOPE sensor, 482–483 TYPE_LIGHT sensor, 483 TYPE_LINEAR_ACCELERATION sensor, 482 TYPE_MAGNETIC_FIELD sensor, 483 TYPE_PRESSURE sensor, 483, 506–507 TYPE_PROXIMITY sensor, 483 U UI (user interface) Activities, assigning, 87, 97–98 customization, design, 96–97 device independent, layouts, 100–103 Fragments, 96 creating, 119 destroying, 119 lack, 126–128 framework, Layout Managers, 95 mode change, 80 navigation type, 78 saved state, 222 screen sizes, 96 Strict Mode, 769–770 UIQ application layer, update method, 261 updateWithNewLocation method, 521 URI addresses, Content Providers, publishing, 263–264 UriMatcher class, 263–264 usage patterns, 783–784 USB, 58 user environment, 42–43 user experience, Action Bar, 360–370 user interface See UI (user interface) uses-configuration tag, 57 uses-feature tag, 58 uses-library tag, 62 uses-permission tags, 740–741 uses-permissions tag, 60 uses-sdk tag, 56 814 www.it-ebooks.info bindex.indd 814 4/11/2012 10:02:59 AM values – Wake Locks V values Cursor, extracting, 259–260 Sensors, 487–489 simple values, 65–66 VIBRATE permission, 441 vibration, VIBRATE permission, 441 Vibrator Service, 442 video formats supported, 622–623 Media Recorder and, 657–661 configuration, 658–660 controlling recording, 660–661 time-lapse, 661 playback initialization, 625 playback surface, 626–629 recording, Intents and, 656–657 stream, previewing, 660 Video View, 625–626 Video View, 625–626 VideoView control, 132 view animations, 71–72 View Groups, 86, 97 animating, 444–445 layouts, 97 UI design and, 96 View Stub, 105–106 ViewFlipper control, 132 ViewGroup class, 97 extending, 138–141 layouts, 98 ViewPager control, 133 Views, 34 accessibility, 148–149 binding data to, adapters and, 158–163 Compass View, 149–155 compound, 138–140 Context Menus, 388–389 controls, 97 creating, 142–146 custom, 141–155 input events, 147–148 Map Views, 536 measurement implementation, 146–147 menu system, 382–383 minimizing use, 105–106 modifying, 133–138 pinning to Map View, 556–557 Remote Views, App Widget Manager, 572–577 size, 100 subclasses, 133 Toasts, 403–404 UI design and, 96 user interaction events, 147–148 widgets, 97 views, 17 container views, Fragment layouts, 121 navigation, 370 Surface Views, 467–470 to-do list application example, 135–138 Video View, 625–626 virtual Sensors, 483–484 visible lifetime of an Activity, 92 visible processes, 83 Vm Policy, 769 voice input, 440–441 VOIP (voice over Internet protocol), 737 volume control in Media Player, 631–632 W Wake Locks, 631 battery and, 757 calling, 758 815 www.it-ebooks.info bindex.indd 815 4/11/2012 10:02:59 AM wallpaper – Widgets creating, 757–758 FULL_WAKE_LOCK, 757 PARTIAL_WAKE_LOCK, 758 SCREEN_BRIGHT_WAKE_LOCK, 757 SCREEN_DIM_WAKE_LOCK, 758 wallpaper, Live Wallpaper, 6, 9, 13, 37, 565 creating, 616 resource defi nition, 616–617 Wallpaper Service engine, 618–619 Wallpaper Service, 617–618 Wallpaper Service engine, 618–619 WeatherStation Activity, 508–511 WeatherStation project, 508–511 WebKit, WebView, Internet resources, 201 Where Am I, 519–520 geocoding and, 535–536 Map Activities and, 542–546 Overlays, 549–553 tracking location, 525–526 WhereAmI Activity, 520 Wi-Fi, 7, 58, 202 hardware access, network configurations, 685–686 Wi-Fi Direct, 13 enabling, 688 framework initialization, 686–688 status change, 688–689 Wi-Fi Manager access, 682–683 configurations, managing, 685 connection details, 684 hotspots, scanning for, 684–685 monitoring connectivity, 683–684 Widgets, 9, 13, 37, 55, 565 Android Developers Widget Design Guidelines, 567 App Widget configuration Activity, 580–582 App Widget Manager, Remote Views, 572–577 App Widgets adding, 566 creating, 567–582 Button control, 132 CheckBox control, 132 Chronometer control, 132 Collection View Widgets, 587–589 binding to Content Providers, 596– 598 interactivity among items, 595–596 layout creation, 589–590 populating, 594–595 refreshing, 598 Remote Views Factory, 591–593 Remote Views Service, 591 design guidelines, 567–568 Earthquake Widget, 582–587 EditText control, 132 home-screen, ImageButton control, 132 Intent Receivers, 570–572 interactivity, 575–577 layouts, 567 size, 567–568 supported, 568–569 visual styling, 568 ListView control, 132 QuickConnectBadge control, 132 RadioButton control, 132 refreshing Alarms, 579–580 Intents, 578–579 minimum update rate, 577–578 SearchView, 297 settings, 569–570 Spinner control, 132 TextView control, 132 ToggleButton control, 132 VideoView control, 132 816 www.it-ebooks.info bindex.indd 816 4/11/2012 10:02:59 AM width supported – z-axis acceleration ViewFlipper control, 132 ViewPager control, 133 Object Animator and, 448 parsing, 203–205 Preference Screen layout, 232–235 simple values, 65–66 XML Pull Parser, 203–205 XML files folder, 65 Views and, 97, 568–569 width supported, 60 available smallest, 77 widthHeightSpec method stub, 145 WiFi P2P Manager, 687–688 data transfer, peers, 692–693 peer connections, 690–692 peer discovery, 689–692 WifiManager, 679 Windows, installer, 21 wizards ADT Wizard, 65 Android New Project Wizard, 28–30 Export Android Application, 772–774 Y y-axis acceleration, 492 Yahoo! Pipes, 217 YouTube, Z z-axis acceleration, 492 X x-axis acceleration, 492 XML (eXtensible Markup Language), 65 Earthquake Monitor, 205–210 layouts, 99–100 menu hierarchies, 384–385 817 www.it-ebooks.info bindex.indd 817 4/11/2012 10:02:59 AM www.it-ebooks.info bindex.indd 818 4/11/2012 10:02:59 AM www.it-ebooks.info bindex.indd 819 4/11/2012 10:02:59 AM Try Safari Books Online FREE for 15 days + 15% off for up to 12 Months* Read this book for free online—along with thousands of others— with this 15 d trial offer 15-day With Safari Books Online, you can experience searchable, unlimited access to thousands of technology, digital media and professional development books and videos from dozens of leading publishers With one low monthly or yearly subscription price, you get: • Access to hundreds of expert-led instructional videos on today’s hottest topics • Sample code to help accelerate a wide variety of software projects • Robust organizing features including favorites, highlights, tags, notes, mash-ups and more • Mobile access using any device with a browser • Rough Cuts pre-published manuscripts START YOUR FREE TRIAL TODAY! Visit www.safaribooksonline.com/wrox44 to get started *Available to new subscribers only Discount applies to the Safari Library and is valid for first 12 consecutive monthly billing cycles Safari Library is not available in all countries www.it-ebooks.info badvert-colour.indd 4/11/2012 10:37:56 AM www.it-ebooks.info Related Wrox Books Join the discussion @ p2p.wrox.com Wrox Programmer to Programmer™ Ivor Horton’s Beginning Java, Java Edition ISBN: 978-0-470-40414-0 Whether you’re a beginner or an experienced programmer switching to Java, you’ll learn how to build real-world Java applications using Java SE 7 Ivor Horton’s Beginning Java ® Java Edition Ivor Horton Join the discussion @ p2p.wrox.com Wrox Programmer to Programmer™ Professional Android Programming with Mono for Android and NET/C# ISBN: 978-1-118-02643-4 For the millions of NET/C# developers who have been eagerly awaiting the book that will guide them through the white-hot field of Android application programming, this is the book This must-have resource dives into writing applications against Mono with C# and compiling executables that run on the Android family of devices Professional Android Programming ™ with Mono for Android and NET/C# Wallace B McClure, Nathan Blevins, John J Croft IV, Jonathan Dick, Chris Hardy www.it-ebooks.info ... Animation Sets Using Animation Listeners Enhancing Your Views 43 6 43 6 43 7 43 9 44 0 44 1 44 1 44 2 44 2 44 3 44 3 44 4 44 4 44 5 44 6 44 7 44 9 44 9 45 0 Advanced Canvas Drawing What Can You Draw? Getting the Most... the Deprecated Orientation Sensor 48 2 48 2 48 3 48 4 48 5 48 7 48 9 49 0 49 1 49 2 49 4 49 7 49 7 49 8 500 501 xxviii www.it-ebooks.info ftoc.indd xxviii 4/ 11/2012 10: 34: 49 AM Meier02275 ftoc V2 - 03/22/2012... Tools The Android Virtual Device Manager Android SDK Manager The Android Emulator 20 21 23 23 24 27 28 28 30 30 33 33 36 36 37 37 37 38 38 38 39 39 40 41 42 43 43 44 45 45 46 47 47 48 49 50 xviii