[su_youtube_advanced url=”https://youtu.be/5nZincSjAaM”]
In previous chapters, we learned about imageview and textview
we learned about styling those views.
Since we have only one view on the screen , So we should have more than one view
If you think about all of the apps that we used such as youtube, gmail ,instagram or others they have more than one view packed neatly on the screen together .
They do that through Viewgroups.
View groups also gave us power to position views on the screen where we want them.
So far we only had single text view or image view on screen
If we want to add other view below or above our textview or imageview.
Then we need to put them in Viewgroup.
Viewgroup is a single rootview for the layout.
Viewgroups are also views and they are rectangles on the screen.
Viewgroups have also have width,height or background color and other attributes.
In other words, Viewgroup is a container for views.
If views contain other views is called parent of these views.
If view is inside the viewgroup we called it child of viewgroup.
If they are multiple children then each of those children are siblings of each other view
Believe me or not professional developers never memorize everything!
No comments:
Post a Comment