We are fortunate to have a very powerful GUI editor in the Android Development Tools which features a drag and drop interface and very complete object inspectors. Using this editor makes designing complex Android user interfaces relatively straightforward.
The first application to develop is one which shows different texts depending on which one of the buttons has been clicked on (i.e. History, Politics, Geography and Demographics). The user interface relies on the use of standard Android layouts including the LinearLayout and, if needed, a ScrollView.
The second application is a variation of VisitMauritius. The user interface does not feature buttons but a scrollable view as shown in the picture above. Of course, it is possible to implement the user interface using LinearLayouts only (try it!) but, for subtle performance reasons, it is better to keep the depth of the XML hierarchy as small as possible. In this example, a RelativeLayout is a better solution.
The third type of layout we are going to use is a grid layout (with rows and columns like in a spreadsheet). The corresponding Android view is the TableLayout.
The third application to develop allows the user to enter a word and display a maximum of 16 of the permutations of its letters. The user interface is based on a grid where some of the widgets (e.g. the EditView) spanning more than one column. The Java code to generate permutations is written by Michael Gilleland.