Layout 2
The XML layout would be as below.
As you see in the above layout XML, Linear Layout has a property as Layout_Height as wrap_-
content. Basically we have four types by which we could set the width or height of the ViewGroup
or the View.
1. Fill Parent – Fills the parent