Book description
With Android’s new constraint layouts (for Android Studio 2.3 and beyond), you can visually design apps by dragging and dropping GUI components right where you want them. Android Studio takes care of updating your app’s underlying XML—and you don’t need to hack any code.
This excerpt from Head First Android Development, Second Edition shows you hands-on how to use constraint layouts to build a simple app in no time. Get a copy of this report and discover how Android Studio’s design editor will save you from having to nest multiple layouts for complex UIs.
Why Head First? Based on the latest research in cognitive science and learning theory, Head First guides use a visually rich format to engage your mind, rather than a text-heavy approach to put you to sleep. Why waste your time struggling with new concepts? This multi-sensory learning experience is designed for the way your brain really works.
Table of contents
-
1.
- Introducing the constraint layout
- Make sure your project includes the Constraint Layout Library
- Add the String resources to strings.xml
- Using the blueprint tool
- Position views using constraints
- Add a vertical constraint
- Changes to the blueprint are reflected in the XML
- How to center views
- Adjust a view’s position by updating its bias
- How to change a view’s size
- How to align views
- Let’s build a real layout
- First, add the top line of views
- The Infer Constraints feature guesses which constraints to add
- Add the next line to the blueprint...
- Finally, add a view for the message
- Test drive the app
- Want to learn more?
- About the Authors
- Copyright
Product information
- Title: Using Constraint Layouts in Android Studio
- Author(s):
- Release date: August 2017
- Publisher(s): O'Reilly Media, Inc.
- ISBN: 9781491995594
You might also like
book
Android Studio 3.6 Development Essentials - Java Edition
Update your Android studio skills and build modern Android applications using Java Key Features Develop a …
book
Learn Android Studio 3 with Kotlin: Efficient Android App Development
Build Android apps using the popular and efficient Android Studio 3 suite of tools, an integrated …
book
Learn Android Studio 3: Efficient Android App Development
Build Android apps using the popular and efficient Android Studio 3 suite of tools, an integrated …
book
Gradle Recipes for Android
Android adopted Gradle as the preferred build automation system a few years ago, but many Android …