Layout:
When we create our app interface, we use some special view that acts as a container. These special views control how other views are placed on the smartphone screen. Android provides a collection of Layout Managers and each of them implements a different strategy to hold, manage and place its children.
If You've worked with HTML elements, then layouts should feel familiar to you. The Purpose of a Layout is to indicate the location and size of each of its child elements. We can Declare Layout in two ways:
In Android, Layouts can be Nested, so we can use different Layouts for different areas of our Interface. However, please be aware that it is not advisable to create too complex layouts because this can affect the overall app performance.
XML-Based Layouts:
In Android, an XML-based Layouts is a file that defines the Container to manages controls, Images, text and other Layouts. Android treats the Layout files as resources. If you are using Visual studio for your development, It creates a default XML layout file Main.axml in Layout folder. XML-Based Layouts are very helpful if we know the User Interface components at the time of compiling. If Run-time UI components are needed, those can be added using the XML code.
Layouts in Android:
Android Provides the Following standard Layouts that can be used in our Android Application.