Populating a View and a ViewGroup

A widget in Android is called a View, while a container (such as LinearLayout) is a ViewGroup. We have an empty ViewGroup now, but we need to start populating it in order to build up our user interface. While it is possible to nest a ViewGroup inside another ViewGroup object, an Activity has only one root View so a layout XML file may have only one root View.

Get Android User Interface Development now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.