April 2019
Beginner to intermediate
698 pages
15h 15m
English
LinearLayout is probably the simplest layout that Android offers. As the name suggests, all the UI items within it are laid out linearly. You have just two choices – vertical and horizontal. By adding the following line of code (or editing via the Attribute window), you can configure a LinearLayout to lay things out vertically:
android:orientation="vertical"
You can then (as you could probably have guessed) change "vertical" to "horizontal" to lay things out horizontally.
Before we can do anything with LinearLayout, we need to add one to a layout file. And, as we are building three layouts in this project, we also need a new layout file.
In the project window, expand the res folder. ...