Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Hands-On Android UI Development

You're reading from  Hands-On Android UI Development

Product type Book
Published in Nov 2017
Publisher Packt
ISBN-13 9781788475051
Pages 348 pages
Edition 1st Edition
Languages
Author (1):
Jason Morris Jason Morris
Profile icon Jason Morris

Table of Contents (21) Chapters

Title Page
Credits
About the Author
About the Reviewers
www.PacktPub.com
Customer Feedback
Preface
Creating Android Layouts Designing Form Screens Taking Actions Composing User Interfaces Binding Data to Widgets Storing and Retrieving Data Creating Overview Screens Designing Material Layouts Navigating Effectively Making Overviews Even Better Polishing Your Design Customizing Widgets and Layouts Activity Lifecycle
Test Your Knowledge Answers

Creating a layout implementation


In most applications, you'll find that a combination of the ConstraintLayout, CoordinatorLayout, and some of the more primitive layout classes (such as LinearLayout and FrameLayout)) are more than enough to achieve any layout requirements you can dream up for your user interface. Every now and again though, you'll find yourself needing a custom layout manager to achieve an effect required for the application.

Layout classes extend from the ViewGroup class, and their job is to tell their child widgets where to position themselves, and how large they should be. They do this in two phases: the measurement phase and the layout phase.

All View implementations are expected to provide measurements for their actual size according to specifications. These measurements are then used by the View widget's parent ViewGroup to allocate the amount of space the widget will consume on the screen. For example, a View might be told to consume, at most, the screen width. The View...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at £13.99/month. Cancel anytime}