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

Building a user interface using views and ViewGroups


Now that we have introduced the most commonly used Android views and ViewGroups, we can start to actually build a user interface using them. One recommendation would be to keep layouts as simple as possible in order to avoid performance issues and to make them easier to maintain. If possible, stick to LinearLayout components and, as the complexity of the UI grows, start including RelativeLayout, FrameLayout, and so on. In addition to this, avoid stacking multiple layouts inside each other; do this only when required.

In Android, there are two main ways to create a UI. The first, and by far the simplest way (and the one you should use in most cases), is to use a layout XML file. The second way, which is slightly more complicated, is to handcode all of your UI using Java.

It is good to know how to make a UI using both methods, as there is a good chance you will swap between the two, depending on how complex your interface is. As you will see...