While it is technically possible to create and attach widgets and containers to our
activity purely through Java code, the more common approach is to use an XMLbased
layout file. Dynamic instantiation of widgets is reserved for more complicated
scenarios, where the widgets are not known at compile-time (e.g., populating a
column of radio buttons based on data retrieved off the Internet).