Book Image

Mastering Android Studio 3

By : Kyle Mew
Book Image

Mastering Android Studio 3

By: Kyle Mew

Overview of this book

Android Studio is an Integrated Development Environment (IDE) designed for developing Android apps. As with most development processes, Android keeps resources and logic nicely separated, and so this book covers the management of imagery and other resources, and the development and testing tools provided by the IDE. After introducing the software, the book moves straight into UI development using the sophisticated, WYSIWYG layout editor and XML code to design and test complex interfaces for a wide variety of screen configurations. With activity design covered, the book continues to guide the reader through application logic development, exploring the latest APIs provided by the SDK. Each topic will be demonstrated by working code samples that can be run on a device or emulator. One of Android Studio's greatest features is the large number of third-party plugins available for it, and throughout the book we will be exploring the most useful of these, along with samples and libraries that can be found on GitHub. The final module of the book deals with the final stages of development: building and distribution. The book concludes by taking the reader through the registration and publication processes required by Google. By the time you have finished the book, you will be able to build faster, smoother, and error-free Android applications, in less time and with fewer complications than you ever thought possible.
Table of Contents (10 chapters)

The constraint layout

The constraint layout is similar to the relative layout, in that it allows us to generate complex layouts without having to create memory sapping, view group hierarchies. Android Studio makes creating such layouts far easier, because it provides a visual editor that enables us to drag and drop not only screen components, but also their connections. Being able to experiment with layout structures so easily provides us with a great sandbox environment to develop new layouts.

The following exercise will take you through the process of installing the constraint library so that you can begin experimenting yourself.

  1. As of Android Studio 3.0 the ConstraintLayout is downloaded by default, but if you want to update an earlier project, you will need to open the SDK manager. The ConstraintLayout and constraint solver can both be found under the SDK Tools tab, as follows...