About the Reviewers Karan Kedar Balkar has been working as an independent Android application developer for the last 4 years.Born and brought up in Mumbai,he holds a bachelor's degree in computer engineering.He has written over 50 programming tutorials on his personal blog(http://karanbalkar.com),covering popular technologies and frameworks. At present,Karan is a software engineer.He has been trained on various technologies such as Java,Oracle,and NET.Beside rite poems ar and enjoys playing the guita Firstly.I would like to thank my parents for their constant su and encour ement.I would also like to thank my friends.Srivatsan Iyer,Ajit Pillai,and Prasaanth Neelakandan,for always inspiring and motivating me. titude to Packt Publishing ance to be a part of the reviewing process. Rick Boyer began programming when he was 11 and wrote his first paid program before graduating from high sc etter er s.the wel 20 d Development.He's always had a passion for mobile computing and now focuses on Android development.His hobbies include astronomy,computer games,and gardening.You can contact him at about.me\RickBoyer. www.allitebooks.com
About the Reviewers Karan Kedar Balkar has been working as an independent Android application developer for the last 4 years. Born and brought up in Mumbai, he holds a bachelor's degree in computer engineering. He has written over 50 programming tutorials on his personal blog (http://karanbalkar.com), covering popular technologies and frameworks. At present, Karan is a software engineer. He has been trained on various technologies such as Java, Oracle, and .NET. Besides being passionate about technology, he loves to write poems and travel to different places. He also likes listening to music and enjoys playing the guitar. Firstly, I would like to thank my parents for their constant support and encouragement. I would also like to thank my friends, Srivatsan Iyer, Ajit Pillai, and Prasaanth Neelakandan, for always inspiring and motivating me. I would like to express my deepest gratitude to Packt Publishing for giving me a chance to be a part of the reviewing process. Rick Boyer began programming when he was 11 and wrote his first paid program before graduating from high school. Against his better judgment, programming became his career, and he never looked back. With over 20 years of professional software development experience in Windows, the Web, and several mobile platforms, he started his own software consulting business called NightSky Development. He's always had a passion for mobile computing and now focuses on Android development. His hobbies include astronomy, computer games, and gardening. You can contact him at about.me\RickBoyer. www.allitebooks.com
ntly he w engineer.He has worked on AOL Mail Mobile Web and other Android products. He is passionate about mobile technology and user product experience. Antonio HernandeNinrola s comutence engineer and mobilk He has on deve in both de eapltcaai tha southe ogle Play Market nd a Apple Store ve been pubis As soon as Antonio got his first smartphone econd-hand,first-gene atior What ted as a hobby b a pa his r.both ting his bSc in computer s e he a master's de andinrmaiAnton uertudinreuden in the software engineering group of the Faculty of Computer Science of the University of Mur cia.His main research topic is the usability and security assessment of mobile applications. www.allitebooks.com
Ankit Garg is a mobile engineer with four and a half years of work experience and is based at Mountain View, California. Currently, he works with AOL as an Android engineer. He has worked on AOL Mail Mobile Web and other Android products. He is passionate about mobile technology and user product experience. Antonio Hernández Niñirola is a computer science engineer and mobile application developer. He was born and raised in Murcia in the southeast of Spain. He has developed several websites and mobile applications that have been published in both Google Play Market and Apple Store. As soon as Antonio got his first smartphone—a second-hand, first-generation iPhone—he started programming small applications as a form of entertainment. What started as a hobby became a passion and is now leading his career, both professionally and academically. After getting his BSc in computer science, he got a master's degree in technology and informatics. Antonio went for further studies and is now a doctorate student in the software engineering group of the Faculty of Computer Science of the University of Murcia. His main research topic is the usability and security assessment of mobile applications. www.allitebooks.com
www.PacktPub.com Support files,eBooks,discount offers, and more For support files and downloads related to your book,please visit www.Packtpub.com Did you kno PACKTLiB https://www2.packtpub.com/books/subscription/packtlib Do you need instant solutions to your IT questions?PacktLib is Packt's online digital book library.Here,you can search,access,and read Packt's entire library of books. Why subscribe? .Fully searchable across every book published by Packt Copy and paste,print,and bookmark content .On demand and accessible via a web browser Free access for Packt account holders www.allitebooks.com
www.PacktPub.com Support files, eBooks, discount offers, and more For support files and downloads related to your book, please visit www.PacktPub.com. Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at service@packtpub.com for more details. At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks. TM https://www2.packtpub.com/books/subscription/packtlib Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book library. Here, you can search, access, and read Packt's entire library of books. Why subscribe? • Fully searchable across every book published by Packt • Copy and paste, print, and bookmark content • On demand and accessible via a web browser Free access for Packt account holders If you have an account with Packt at www.PacktPub.com, you can use this to access PacktLib today and view 9 entirely free books. Simply use your login credentials for immediate access. www.allitebooks.com
www.allitebooks.com
www.allitebooks.com
Table of Contents Preface Chapter 1:Installing and Configuring Android Studio Preparing for installation Downloading Android Studio 6 Installing Android Studio 6 Running Android Studio for the first time Chapter 2:Starting a Project 13 Selecting the form factors 141415 Choosing the activity type Summary 21 Chapter 3:Navigating a Project 23 The proje t navigati n pane The projec 247 sources Gradle ettings Chapter 4:Using the Code Editor Customizing the editor settings Code completion Code generation Navigating code Useful shortcuts 123473700 Summary www.allitebooks.com
Table of Contents Preface 1 Chapter 1: Installing and Configuring Android Studio 5 Preparing for installation 5 Downloading Android Studio 6 Installing Android Studio 6 Running Android Studio for the first time 7 Configuring the Android SDK 8 Summary 11 Chapter 2: Starting a Project 13 Creating a new project 14 Configuring the project 14 Selecting the form factors 15 Choosing the activity type 16 Summary 21 Chapter 3: Navigating a Project 23 The project navigation panel 24 The project structure 26 The resources folder 27 Gradle 28 Project settings 29 Summary 30 Chapter 4: Using the Code Editor 31 Customizing the editor settings 32 Code completion 34 Code generation 37 Navigating code 37 Useful shortcuts 40 Summary 40 www.allitebooks.com