Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Learning Material Design

You're reading from   Learning Material Design Master Material Design and create beautiful, animated interfaces for mobile and web applications

Arrow left icon
Product type Paperback
Published in Dec 2015
Publisher
ISBN-13 9781785289811
Length 186 pages
Edition 1st Edition
Languages
Tools
Concepts
Arrow right icon
Authors (2):
Arrow left icon
Nadir Belhaj Nadir Belhaj
Author Profile Icon Nadir Belhaj
Nadir Belhaj
Kyle Mew Kyle Mew
Author Profile Icon Kyle Mew
Kyle Mew
Arrow right icon
View More author details
Toc

Activities and layouts

Android applications are are made up of one or more screens called activities. So as to keep design and function separate, the appearance of an activity is defined in XML, and its behavior with Java. Creating an Android Studio project using the Blank Activity template is a good way to see how this works.

XML activities contain two types of screen components. There are all the visible screen objects, called widgets, that we associate with mobile apps, such as buttons, sliders, and images, and there are invisible container objects known as layouts or ViewGroups. If you open the activity_main.xml XML file that was created by the project template, in design mode, you will see that there are seven layouts available to us at the top of the palette.

Activities and layouts

RelativeLayouts

On the right-hand side of the editor is the component tree; this displays a hierarchical view of the activity, and we can see that the root layout here is a RelativeLayout, and that it contains a single widget,...

You have been reading a chapter from
Learning Material Design
Published in: Dec 2015
Publisher:
ISBN-13: 9781785289811
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 $19.99/month. Cancel anytime