Book Image

Learning Android Application Development

By : Raimon Ràfols Montane, Laurence Dawson
Book Image

Learning Android Application Development

By: Raimon Ràfols Montane, Laurence Dawson

Overview of this book

The mobile app market is huge. But where do you start? And how you can deliver something that takes Google Play by storm? This guide is the perfect route into Android app development – while it’s easy for new apps to sink without a trace, we’ll give you the best chance of success with practical and actionable guidance that will unlock your creativity and help you put the principles of Android development into practice. From the fundamentals and getting your project started to publishing your app to a huge market of potential customers, follow this guide to become a confident, creative and reliable mobile developer. Get to grips with new components in Android 7 such as RecyclerView, and find out how to take advantage of automated testing, and, of course, much, much more. What are you waiting for? There’s never been a better time – or a better way – to get into Android app development.
Table of Contents (16 chapters)
Learning Android Application Development
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface

Creating activities


Now that we have gone through the essentials and covered the activity boilerplate introduction, we can actually begin to have some fun and create our first activities! In this simple example, we will cover how to launch an activity and show how to extend the Activity super class to create an instance of our own activity. This will be a very simple introductory example and should not take more than 20-25 minutes to complete. So grab a coffee and let's get started!

Defining your activity

In the previous chapter, we introduced the Android App Manifest (AndroidManifest.xml) that contains essential information such as the package name and components of an application. For each activity in your application, you must create a corresponding entry in the app manifest along with additional information such as theme of the activity.

Creating an entry in the manifest is easy and you will only need the name of your activity in this example. You also need to add your activities to the...