A ListActivity
’s default GUI contains only a ListView
that fills the screen’s client area between Android’s top and bottom system bars (which were explained in Fig. 2.1). If a ListActivity
’s GUI requires only the default ListView
, then you do not need to define a separate layout for your ListActivity
subclass.
The Twitter Searches app’s MainActivity
displays several GUI components. For this reason you’ll define a custom layout for MainActivity
. When customizing a ListActivity
subclass’s GUI, the layout must contain a ListView
with its Id attribute set to "@android:id/list"
—the name that class ListActivity
uses to reference its ListView
.