Beginning Android Layouts

Conquer the basics of creating Android user interfaces, starting with layouts such as LinearLayout, then switch to using the newer ConstraintLayout. By Brian Moakley.

See course reviews 3.7 (13) · 1 Review

Download materials
Save for later
Share

Learning path

This is part of the Android User Interfaces learning path. View Path.

Who is this for?

Those who are new to Android development and looking to build an app from scratch. This courses teaches how to compose interfaces from basic layout types such as FrameLayout, RelativeLayout and LinearLayout.

Once you've learned the basic layout types, you'll take your skills to the next level by learning ConstraintLayout, and ultimately build a complex layout using what is known as flat layout.

Before taking this course, we recommend having worked through the Android and Kotlin for Beginners learning path first.

Covered concepts

  • LinearLayout
  • FrameLayout
  • RelativeLayout
  • ConstraintLayout
  • Flat Layout
  • XML Editing
  • Dimen values
  • Android measurement units

Part 1: Introduction to Android Layouts

1
Toggle description

Welcome to the Beginning Android Layouts course! Find out what the course covers and how to get started.

Toggle description

Download the starter app and build it in Android Studio, and take a peek at the included starter layout files.

Toggle description

Learn about the foundation of all Android layouts, the ViewGroup class, and explore the layout editors in Android Studio.

Toggle description

Discover the concept of the view hierarchy and begin your study of layouts by seeing how to define view widths and heights.

Toggle description

Learn how to specify size units in Android, and use those size units to space views via margins and padding.

Toggle description

Practice adding padding to a view, through a hands-on challenge.

Conclusion 1:10
Toggle description

Let's review what you've covered in this first section, and discuss what's next.

Part 2: Basic Layout Types

Toggle description

Learn about the basic layout types that you'll discover in this section.

Toggle description

Learn about how to use the RelativeLayout ViewGroup to position sibling views with specific relationships to one another.

Toggle description

Learn how to align elements using the layout_gravity and gravity tags, and do some code and design cleanup.

Toggle description

Practice creating a RelativeLayout through a hands-on challenge.

Toggle description

Use the LinearLayout ViewGroup to position views along a horizontal or vertical dimension.

Toggle description

Discover how to use layout_weight with LinearLayout, in order to divide the shared size between sibling views in a specific ratio.

Toggle description

Practice creating a LinearLayout through a hands-on challenge.

Toggle description

Learn to use the FrameLayout ViewGroup to create a layering of views, and how to switch between the layers.

Toggle description

Practice creating an empty state using FrameLayout through a hands-on challenge.

Conclusion 1:47
Toggle description

Review what you've learned about the basic layout types, and find out what's next.

Part 3: ConstraintLayout

Toggle description

In this section, you'll learn about ConstraintLayout and constraints. Let's dive in!

Toggle description

Use the converter built into Android Studio to convert an existing layout to ConstraintLayout.

Toggle description

Create a new ConstraintLayout from scratch, utilizing the layout editor editing controls.

Toggle description

Practice converting an existing layout to ConstraintLayout through a hands-on challenge.

Toggle description

Practice programmatically hiding empty views in a ConstraintLayout through a hands-on challenge.

Toggle description

Learn about some of the upcoming features in the upcoming version of ConstraintLayout.

Conclusion 1:25
Toggle description

Great job on this section! Review what you've learned, and what's up next.

Part 4: Configuration Changes

Toggle description

It's important to handle both portrait mode and landscape mode device configurations. Learn why here!

Toggle description

Learn how resource qualifiers are used to handle different device densities and also for localization.

Toggle description

See how to create a layout file tailored specifically for when the device is in the landscape orientation.

Toggle description

Practice creating a landscape mode layout through a hands-on challenge.

Toggle description

Remove all of the nested layouts in an existing layout to create a completely flat ConstraintLayout.

Conclusion 2:50
Toggle description

Congrats on making it through the course! Review what you've learned, get an overview of Android layout topics that weren't covered, and see where to go from here.