The graphical user interface for an Android application is constructed by a hierarchy of View and ViewGroup objects.
View objects View objects are UI widgets such as buttons or text fields. ViewGroupViewGroup objects defines the layout of the child view like in a grid or a vertical list. Basically, ViewGroup are invisible view containers.
XMLAndroid provides an XML vocabulary to define your UI in XML using a hierarchy of UI elements. We can define subclasses of View and ViewGroup in the XML.