Android For Programmers An App Driven Approach-Books Pdf

Android for Programmers An App Driven Approach
07 Aug 2020 | 2 views | 0 downloads | 72 Pages | 1.77 MB

Share Pdf : Android For Programmers An App Driven Approach

Download and Preview : Android For Programmers An App Driven Approach

Report CopyRight/DMCA Form For : Android For Programmers An App Driven Approach



Transcription

ANDROID FOR PROGRAMMERS, AN APP DRIVEN APPROACH, SECOND EDITION VOLUME 1. DEITEL DEVELOPER SERIES, Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book and the publisher was aware of a trademark claim the designations have. been printed with initial capital letters or in all capitals. The authors and publisher have taken care in the preparation of this book but make no expressed or implied warranty. of any kind and assume no responsibility for errors or omissions No liability is assumed for incidental or consequential. damages in connection with or arising out of the use of the information or programs contained herein. For information about buying this title in bulk quantities or for special sales opportunities which may include elec. tronic versions custom cover designs and content particular to your business training goals marketing focus or. branding interests please contact our corporate sales department at corpsales pearsoned com or 800 382 3419. For government sales inquiries please contact governmentsales pearsoned com. For questions about sales outside the U S please contact international pearsoned com. Visit us on the Web informit com ph, Library of Congress Cataloging in Publication Data. 2014 Pearson Education Inc, Portions of the cover are modifications based on work created and shared by Google http code google com. policies html and used according to terms described in the Creative Commons 3 0 Attribution License http. creativecommons org licenses by 3 0, All rights reserved Printed in the United States of America This publication is protected by copyright and permission.
must be obtained from the publisher prior to any prohibited reproduction storage in a retrieval system or transmis. sion in any form or by any means electronic mechanical photocopying recording or likewise To obtain permission. to use material from this work please submit a written request to Pearson Education Inc Permissions Department. One Lake Street Upper Saddle River New Jersey 07458 or you may fax your request to 201 236 3290. ISBN 13 978 0 13357092 2, ISBN 10 0 13 357092 4, Text printed in the United States on recycled paper at RR Donnelley in Crawfordsville Indiana. First printing December 2013, ANDROID FOR PROGRAMMERS. AN APP DRIVEN APPROACH, SECOND EDITION VOLUME 1, DEITEL DEVELOPER SERIES. Paul Deitel Harvey Deitel Abbey Deitel, Deitel Associates Inc. Upper Saddle River NJ Boston Indianapolis San Francisco. New York Toronto Montreal London Munich Paris Madrid. Capetown Sydney Tokyo Singapore Mexico City, Trademarks.
DEITEL the double thumbs up bug and DIVE INTO are registered trademarks of Deitel Associates Inc. Java is a registered trademark of Oracle and or its affiliates Other names may be trademarks of their. respective owners, Google Android Google Play Google Maps Google Wallet Nexus YouTube AdSense and AdMob. are trademarks of Google Inc, Microsoft and or its respective suppliers make no representations about the suitability of the information. contained in the documents and related graphics published as part of the services for any purpose All. such documents and related graphics are provided as is without warranty of any kind Microsoft and. or its respective suppliers hereby disclaim all warranties and conditions with regard to this information. including all warranties and conditions of merchantability whether express implied or statutory fitness. for a particular purpose title and non infringement In no event shall Microsoft and or its respective sup. pliers be liable for any special indirect or consequential damages or any damages whatsoever resulting. from loss of use data or profits whether in an action of contract negligence or other tortious action. arising out of or in connection with the use or performance of information available from the services. The documents and related graphics contained herein could include technical inaccuracies or typograph. ical errors Changes are periodically added to the information herein Microsoft and or its respective sup. pliers may make improvements and or changes in the product s and or the program s described herein. at any time Partial screen shots may be viewed in full within the software version specified. Microsoft and Windows are registered trademarks of the Microsoft Corporation in the U S A and. other countries Screen shots and icons reprinted with permission from the Microsoft Corporation This. book is not sponsored or endorsed by or affiliated with the Microsoft Corporation. Throughout this book trademarks are used Rather than put a trademark symbol in every occurrence of. a trademarked name we state that we are using the names in an editorial fashion only and to the benefit. of the trademark owner with no intention of infringement of the trademark. In Memory of Amar G Bose MIT Professor and, Founder and Chairman of the Bose Corporation. It was a privilege being your student and members, of the next generation of Deitels who heard our dad. say how your classes inspired him to do his best work. You taught us that if we go after the really hard prob. lems then great things can happen, Harvey Deitel, Paul and Abbey Deitel.
This page intentionally left blank, Preface xiv, Before You Begin xxiii. 1 Introduction to Android 1, 1 1 Introduction 2, 1 2 Android The World s Leading Mobile Operating System 3. 1 3 Android Features 3, 1 4 Android Operating System 7. 1 4 1 Android 2 2 Froyo 7, 1 4 2 Android 2 3 Gingerbread 8. 1 4 3 Android 3 0 through 3 2 Honeycomb 8, 1 4 4 Android 4 0 through 4 0 4 Ice Cream Sandwich 8.
1 4 5 Android 4 1 4 3 Jelly Bean 9, 1 4 6 Android 4 4 KitKat 10. 1 5 Downloading Apps from Google Play 11, 1 6 Packages 12. 1 7 Android Software Development Kit SDK 13, 1 8 Object Oriented Programming A Quick Refresher 16. 1 8 1 The Automobile as an Object 17, 1 8 2 Methods and Classes 17. 1 8 3 Instantiation 17, 1 8 4 Reuse 17, 1 8 5 Messages and Method Calls 17.
1 8 6 Attributes and Instance Variables 18, 1 8 7 Encapsulation 18. 1 8 8 Inheritance 18, 1 8 9 Object Oriented Analysis and Design OOAD 18. 1 9 Test Driving the Doodlz App in an Android Virtual Device AVD 19. 1 9 1 Running the Doodlz App in the Nexus 4 Smartphone AVD 19. 1 9 2 Running the Doodlz App in a Tablet AVD 28, 1 9 3 Running the Doodlz App on an Android Device 30. 1 10 Building Great Android Apps 30, 1 11 Android Development Resources 32. 1 12 Wrap Up 34, viii Contents, 2 Welcome App 35, Dive Into the Android Developer Tools Introducing Visual GUI Design.
Layouts Accessibility and Internationalization, 2 1 Introduction 36. 2 2 Technologies Overview 37, 2 2 1 Android Developer Tools IDE 37. 2 2 2 TextViews and ImageViews 37, 2 2 3 App Resources 37. 2 2 4 Accessibility 37, 2 2 5 Internationalization 37. 2 3 Creating an App 38, 2 3 1 Launching the Android Developer Tools IDE 38.
2 3 2 Creating a New Project 38, 2 3 3 New Android Application Dialog 39. 2 3 4 Configure Project Step 40, 2 3 5 Configure Launcher Icon Step 40. 2 3 6 Create Activity Step 42, 2 3 7 Blank Activity Step 43. 2 4 Android Developer Tools Window 44, 2 4 1 Package Explorer Window 45. 2 4 2 Editor Windows 45, 2 4 3 Outline Window 45, 2 4 4 App Resource Files 45.
2 4 5 Graphical Layout Editor 46, 2 4 6 The Default GUI 46. 2 5 Building the App s GUI with the Graphical Layout Editor 48. 2 5 1 Adding Images to the Project 48, 2 5 2 Changing the Id Property of the RelativeLayout and the TextView 49. 2 5 3 Configuring the TextView 50, 2 5 4 Adding ImageViews to Display the Images 54. 2 6 Running the Welcome App 56, 2 7 Making Your App Accessible 57. 2 8 Internationalizing Your App 59, 2 9 Wrap Up 63.
3 Tip Calculator App 64, Introducing GridLayout LinearLayout EditText SeekBar Event Handling. NumberFormat and Defining App Functionality with Java. 3 1 Introduction 65, 3 2 Test Driving the Tip Calculator App 66. 3 3 Technologies Overview 67, 3 3 1 Class Activity 67. 3 3 2 Activity Lifecycle Methods 67, 3 3 3 Arranging Views with LinearLayout and GridLayout 68. Contents ix, 3 3 4 Creating and Customizing the GUI with the Graphical Layout.
Editor and the Outline and Properties Windows 68, 3 3 5 Formatting Numbers as Locale Specific Currency and. Percentage Strings 69, 3 3 6 Implementing Interface TextWatcher for Handling EditText. Text Changes 69, 3 3 7 Implementing Interface OnSeekBarChangeListener for. Handling SeekBar Thumb Position Changes 69, 3 3 8 AndroidManifest xml 70. 3 4 Building the App s GUI 70, 3 4 1 GridLayout Introduction 70.
3 4 2 Creating the TipCalculator Project 72, 3 4 3 Changing to a GridLayout 72. 3 4 4 Adding the TextViews EditText SeekBar and LinearLayouts 73. 3 4 5 Customizing the Views to Complete the Design 75. 3 5 Adding Functionality to the App 79, 3 6 AndroidManifest xml 87. 3 7 Wrap Up 88, 4 Twitter Searches App 89, SharedPreferences Collections ImageButton ListView ListActivity. ArrayAdapter Implicit Intents and AlertDialogs, 4 1 Introduction 90. 4 2 Test Driving the App 91, 4 2 1 Importing the App and Running It 91.
4 2 2 Adding a Favorite Search 92, 4 2 3 Viewing Twitter Search Results 93. 4 2 4 Editing a Search 94, 4 2 5 Sharing a Search 96. 4 2 6 Deleting a Search 96, 4 2 7 Scrolling Through Saved Searches 97. 4 3 Technologies Overview 97, 4 3 1 ListView 97, 4 3 2 ListActivity 98. 4 3 3 Customizing a ListActivity s Layout 98, 4 3 4 ImageButton 98.
4 3 5 SharedPreferences 98, 4 3 6 Intents for Launching Other Activities 99. 4 3 7 AlertDialog 99, 4 3 8 AndroidManifest xml 100. 4 4 Building the App s GUI 100, 4 4 1 Creating the Project 100. 4 4 2 activity main xml Overview 101, 4 4 3 Adding the GridLayout and Components 102. 4 4 4 Graphical Layout Editor Toolbar 107, x Contents.
4 4 5 ListView Item s Layout list item xml 108, 4 5 Building the MainActivity Class 109. 4 5 1 package and import Statements 109, 4 5 2 Extending ListActivity 111. 4 5 3 Fields of Class MainActivity 111, 4 5 4 Overriding Activity Method onCreate 112. 4 5 5 Anonymous Inner Class That Implements the saveButton s. OnClickListener to Save a New or Updated Search 114. 4 5 6 addTaggedSearch Method 116, 4 5 7 Anonymous Inner Class That Implements the ListView s. OnItemClickListener to Display Search Results 117, 4 5 8 Anonymous Inner Class That Implements the ListView s.
OnItemLongClickListener to Share Edit or Delete a Search 119. 4 5 9 shareSearch Method 121, 4 5 10 deleteSearch Method 122. 4 6 AndroidManifest xml 124, 4 7 Wrap Up 124, 5 Flag Quiz App 125. Fragments Menus Preferences AssetManager Tweened Animations Handler. Toasts Explicit Intents Layouts for Multiple Device Orientations. 5 1 Introduction 126, 5 2 Test Driving the Flag Quiz App 128. 5 2 1 Importing the App and Running It 128, 5 2 2 Configuring the Quiz 128. 5 2 3 Taking the Quiz 130, 5 3 Technologies Overview 132.
5 3 1 Menus 132, 5 3 2 Fragments 132, 5 3 3 Fragment Lifecycle Methods 133. 5 3 4 Managing Fragments 133, 5 3 5 Preferences 133. 5 3 6 assets Folder 133, 5 3 7 Resource Folders 134. 5 3 8 Supporting Different Screen Sizes and Resolutions 134. 5 3 9 Determining the Screen Size 135, 5 3 10 Toasts for Displaying Messages 135. 5 3 11 Using a Handler to Execute a Runnable in the Future 135. 5 3 12 Applying an Animation to a View 135, 5 3 13 Logging Exception Messages 136.
5 3 14 Using an Explicit Intent to Launch Another Activity in the. Same App 136, 5 3 15 Java Data Structures 136, 5 4 Building the GUI and Resource Files 136. 5 4 1 Creating the Project 136, Contents xi, 5 4 2 strings xml and Formatted String Resources 137. 5 4 3 arrays xml 138, 5 4 4 colors xml 139, 5 4 5 dimens xml 139. 5 4 6 activity settings xml Layout 140, 5 4 7 activity main xml Layout for Phone and Tablet Portrait. Orientation 140, 5 4 8 fragment quiz xml Layout 140.
5 4 9 activity main xml Layout for Tablet Landscape Orientation 143. 5 4 10 preferences xml for Specifying the App s Settings 144. 5 4 11 Creating the Flag Shake Animation 145, 5 5 MainActivity Class 147. 5 5 1 package Statement import Statements and Fields 147. 5 5 2 Overridden Activity Method onCreate 148, 5 5 3 Overridden Activity Method onStart 150. 5 5 4 Overridden Activity Method onCreateOptionsMenu 150. 5 5 5 Overridden Activity Method onOptionsItemSelected 151. 5 5 6 Anonymous Inner Class That Implements, OnSharedPreferenceChangeListener 152. 5 6 QuizFragment Class 153, 5 6 1 package Statement and import Statements 153. 5 6 2 Fields 154, 5 6 3 Overridden Fragment Method onCreateView 155.
5 6 4 Method updateGuessRows 157, 5 6 5 Method updateRegions 158. 5 6 6 Method resetQuiz 158, 5 6 7 Method loadNextFlag 160. 5 6 8 Method getCountryName 162, 5 6 9 Anonymous Inner Class That Implements OnClickListener 162. 5 6 10 Method disableButtons 165, 5 7 SettingsFragment Class 165. 5 8 SettingsActivity Class 166, 5 9 AndroidManifest xml 166.
5 10 Wrap Up 167, 6 Cannon Game App 168, Listening for Touches Manual Frame By Frame Animation Graphics Sound. Threading SurfaceView and SurfaceHolder, 6 1 Introduction 169. 6 2 Test Driving the Cannon Game App 171, 6 3 Technologies Overview 171. ANDROID FOR PROGRAMMERS AN APP DRIVEN APPROACH SECOND EDITION VOLUME 1 DEITEL DEVELOPER SERIES Paul Deitel Harvey Deitel Abbey Deitel Deitel amp Associates Inc Upper Saddle River NJ Boston Indianapolis San Francisco

Related Books

1010 MN Syllabus AOM 1010 Keyboarding

1010 MN Syllabus AOM 1010 Keyboarding

Virginia College Course Syllabus AOM 1010 Page 1 Last Review of Syllabus Fall 2013 Course Number AOM 1010 Section MN Course Title Keyboarding Instructor Name Voice Mail Email Address Elaina Ashley Room 187 706 288 2500 ext 7428 elaina ashley vc edu Term Dates 10 02 2013 12 18 2013 Class Meetings Monday amp Wednesday 5 00 P M to 7 50 P M Credit Hours Four 4 Lecture Hours

Keyboarding Pro Deluxe Student User Guide

Keyboarding Pro Deluxe Student User Guide

Keyboarding Pro Deluxe Student User Guide Welcome to Keyboarding Pro Deluxe s Student User Guide This guide will help you get started with Keyboarding Pro Deluxe by providing in depth step by step instructions created specifically for the student

Jewish Spirituality and Mysticism in the 21st Century

Jewish Spirituality and Mysticism in the 21st Century

Research online the question What is Kabbalah and write and analyze your findings in your own words Upload your findings to Google docs link to be provided Class 8 9 The Way of the Sefirot Kabbalah constructs a vast metaphysics that bridges the space between the Infinite G d and His finite creation This is the world of the Sefirot Understanding their function and structure

KENYA GAZETTE SUPPLEMENT

KENYA GAZETTE SUPPLEMENT

No 29 Kenya National Examination Council 2012 of the Constitution Qualifications of members Term of Office of Chairperson and members Council may co opt members 6 To be appointed as a member of the Council other than an ex officio member a person shall a possess at least a first degree from a recognised university b have at least ten years experience in a senior position in the

EXISTING SUPPLIER LIST AS AT 14TH JANUARY 2019

EXISTING SUPPLIER LIST AS AT 14TH JANUARY 2019

0010000196 ke kenya national examination council 20895 00100 nairobi 0010000197 ke stainer electronics 73598 00200 nairobi 0010000198 ke higher education loans board 51935 00200 nairobi 0010000199 ke kenya bureau of standards 69489 00400 nairobi 0010000200 ke kenatco taxis limited 54974 00200 nairobi 0010000201 ke viable deco solutions ltd 52684 00200 nairobi 0010000202 ke vine yard valuers

BASIC EDUCATION SECTOR ANALYSIS REPORT KENYA

BASIC EDUCATION SECTOR ANALYSIS REPORT KENYA

BASIC EDUCATION SECTOR ANALYSIS REPORT KENYA AUGUST 2012 JAPAN INTERNATIONAL COOPERATION AGENCY JICA INTERNATIONAL DEVELOPMENT CENTER OF JAPAN INC IDCJ Source Kenya National Bureau of Statistics 2010 2009 Kenya Population and Housing Census Volume I C Population Distribution by Age Sex and Administrative Units Map of Kenya i Abbreviations ACE Adult and Continuing Education

Republic of Kenya UNESCO

Republic of Kenya UNESCO

SERTIFIKASI GURU DALAM JABATAN BUKU 2 DIREKTORAT JENDERAL

SERTIFIKASI GURU DALAM JABATAN BUKU 2 DIREKTORAT JENDERAL

Latihan Profesi Guru PLPG Petunjuk Teknis Pelaksanaan Sertifikasi Guru Dalam Jabatan Tahun 2009 Tim Penyusun Prof Dr Muchlas Samani Direktur Ketenagaan Ditjen Dikti Drs Ahmad Dasuki MM M Pd Direktur Profesi Pendidik Ditjen PMPTK Prof Dr A Mukhadis M Pd Universitas Negeri Malang Dr Ismet Basuki M Pd Universitas Negeri Surabaya Dr Badrun Karto Wagiran M Pd Universitas

BUKU 2 2009

BUKU 2 2009

Latihan Profesi Guru PLPG ii Petunjuk Teknis Pelaksanaan Sertifikasi Guru Dalam Jabatan Tahun 2009 Tim 8 Rayon LPTK 35 KSG Pengumuman Kelulusan 137 Lampiran 17 Format C6 Daftar Hasil Verifikasi Dokumen untuk Bahan Rapat PSG 138 Format C7 Daftar Hasil Verifikasi Dokumen untuk Verifikasi KSG Pengumuman Kelulusan 139 Lampiran 18 Format C8 Daftar Berkas Tiap Asesor 140 Lampiran 19

I PANITIA SERTIFIKASI GURU RAYON 111 UNIVERSITAS NEGERI

I PANITIA SERTIFIKASI GURU RAYON 111 UNIVERSITAS NEGERI

PENGUMUMAN KELULUSAN SERTIFIKASI TAHUN 2014 PLPG 2014 GEL 2 PENGUMUMAN pengumuman kelulusan PLPG Gel ke 2 Tahun 2014 rev2 xlsx 1 NO KAB KOTA NO PESERTA NO DOK NAMA ASAL SEKOLAH MAPEL SERTIFIKASI KELAS PLPG STATUS KETERANGAN 18 Kab Bantul 14040118710918 309 SUMIATI SMA NEGERI 1 BANTUL Kimia KIMIA LULUS 19 Kab Bantul 14040118010683 300 KUNI KUMAIROK SMK 17 BANTUL Matematika

Lean Healthcare Calidad y sostenibilidad Lean Sanidad

Lean Healthcare Calidad y sostenibilidad Lean Sanidad

Lean Healthcare Calidad y sostenibilidad El Consorcio Sanitario Integral CSI ha conseguido mejorar la calidad reducir costes e incentivar a sus profesionales En sanidad se asocia mejora de calidad con incremento de recursos Los expertos de la calidad coinciden en que calidad no significa mayores costes lo que cuesta es la no calidad El coste de la no calidad CNC en sanidad puede