Last lesson lecture about view.
Today talk about layout.
What is layout?
Layout mean is how assemble each view and setting view of attribute.
Assemble layout has two roads.
One road is XML, other a road is Java file.
Android provide 5 category layout.
In turn is linearlayout framelayout relativelayout absolutelayout tablelayout ..
Linearlayout and relativelayout are one of the most commonly used.
Below will lecture about how use linearlayout.
Just as its name implies. It will let each view according linear layout.
In XML it has very a great partition attribute. Next tell about a simple example.
Example:
<Linearlayout xmlns: Android = "http://schemas.android.com/apk/res/android"
Xmlns: Tools = "http://schemas.android.com/tools"
Android: layout_width = "match_parent"
Android: layout_height = "match_parent"
Android: Orientation = "vertical">
<Textview
Android: text = "first textview"
Android: layout_width = "match_parent"
Android: layout_height = "match_parent"
/>
<Textview
Android: text = "second textview"
Android: layout_width = "match_parent"
Android: layout_height = "match_parent"
/>
</Linearlayout>
Explain the example: First it is a linear layout, in it put two textview, because orientation is vertical, In that way they location is vertical lay up. of cause if orientation is horizontal, there are two textview will be horizontal location.