A layout defines the visual structure for a user interface, such as an activity or widget.
A layout is declared in XML, including screen elements that will appear in it. Code can be added to the application to modify the state of screen objects at runtime, including those declared in XML.
As explained in this article on performance in Android, a RelativeLayout
requires two layout passes to render properly. For complex view hierarchies, this can have a significant impact on performance. Nesting RelativeLayouts
makes this problem even worse, because every RelativeLayout
causes the number of layout passes to go up.