ViewGroup describes the layout of views in its group. The two main examples of ViewGroups are LinearLayout and RelativeLayout. By breaking LinearLayout even further, you can use either Vertical LinearLayout or Horizontal LinearLayout. If you select Vertical LinearLayout, your views will stack vertically on your screen. The two main examples of views are TextView and Button. That way, if you have a ViewGroup Vertical LinearLayout, your views (like TextViews and buttons) will be positioned vertically down the screen.
When other posters show nested ViewGroups, they mean, for example, that one of the lines in my Vertical LinearLayout can actually represent several elements horizontally at the lower level. In this case, I would use Horizontal LinearLayout as one of the descendants of my top level Vertical LinearLayout.
An example of nested ViewGroups:
Parent ViewGroup = Vertical LinearLayout
Row1: TextView1
Row2: Button1
Row3: Image TextView2 Button2 <- Horizontal linear, nested in vertical linear
Row4: TextView3
Row5: Button3
sv Math Tutor Feb 25 '18 at 15:18 2018-02-25 15:18
source share