[su_youtube_advanced url=”https://www.youtube.com/watch?v=YQGhwRwj37Q”]
We know about how viewgroups contain views
Each viewgroup has specific rules on how we will position that children inside of it
First lets talk about linear layout
This view group arrange children in vertical column like Below
We can put as many as we want in vertical as other type of view.
Or the linear layout can arrange its children view in horizontal row.
Yes that’s it for Linear Layout.
Linear layout : You can arrange children in vertical column and in a horizontal row.
Next we have relative layout
Again relative layout has its own rules to position its children inside of it.
- Relative to parent
- Relative to other children
Relative to parent : We can arrange the child view (TextView) align to the bottom of the parent and child view (ImageView) align to the top of the parent can also applied to center or left or right edge.
Relative to other children: We can arrange the child view (imageView) align to the edge of of the parent and child view (TextView) align to the right of the parent and other child view (TextView) align to the below of the child(TextView).
Believe me or not professional developers never memorize everything
No comments:
Post a Comment