‫Welcome back.
‫In this video we're going to learn about linear layouts in Android.
‫A linear layout is a view group that arranges its child views in a single direction, either horizontally
‫or vertically, depending on the orientation you choose.
‫It's one of the most basic and commonly used layout managers for designing user interfaces in Android
‫applications.
‫You can use linear layout to create simple and straightforward UIs with a linear arrangement of elements.
‫To create a linear layout, you only need to specify a linear layout tag.
‫Here, I replaced the constraint layout with a linear layout and to specify its orientation, it's very
‫simple.
‫You need to use the orientation attribute and set it to horizontally or vertically.
‫Displaying modes.
‫I'll use vertical and I'll create another text view here in order to display the usage of this linear
‫layout, I'll set a text size for the first one as 32 SP.
‫Create another text view.
‫And you can see that these text views are arranged in a horizontal direction.
‫Also if you create another text view or any other views.
‫You can see that all of these widgets that they are included inside this linear layout are arranged
‫vertically in a linear manner.
‫You can set the orientation as horizontal so you can see these text views are arranged horizontally
‫back to vertical.
‫Moreover, you can customize the layout by adjusting the properties of linear layout and its child views
‫such as layout, width, height, margins, for example the margin 20 dpi.
‫I am adding spacing from left, right, top and bottom for this linear layout, so if you click on this
‫it will refer for the linear layout.
‫I'm adding spacing from all sides with a value 20 dpi.
‫In general, you can use linear layout to create simple and straightforward UIs with a linear arrangement
‫of elements.