4.5.2. Extending ListActivity
MainActivity (Figs. 4.18–4.27) is the Twitter Searches app’s only Activity class. When you created the TwitterSearches project, the IDE generated MainActivity as a subclass of Activity and provided the shell of an overridden onCreate method, which every Activity subclass must override. We changed the superclass to ListActivity (Fig. 4.18, line 28). When you make this change, the IDE does not recognize class ListActivity, so you must update your import statements. In the IDE, you can use Source > Organize Imports to update the import statements. Eclipse underlines any class or interface name that it does not recognize. In this case, if you hover the mouse over the class or interface name, a list of quick fixes will ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access