LinearLayout Output
We can run the application using the Android Virtual Device(AVD) to get the output of the above code.
Android LinearLayout in Kotlin
Android LinearLayout is a ViewGroup subclass, used to provide child View elements one by one either in a particular direction either horizontally or vertically based on the orientation property. We can specify the linear layout orientation using the android:orientation attribute.
All the child elements arranged one by one in multiple rows and multiple columns.
- Horizontal list: One row, multiple columns.
- Vertical list: One column, multiple rows.
Can illustrate the Horizontal and Vertical List with an Image.
In this article, we are going to discuss the declaration and implementation of LinearLayout.