4.5. Building the MainActivity Class
Figures 4.17–4.27 implement the Twitter Searches app’s logic in the class MainActivity
, which extends ListActivity
. The default code for class MainActivity
included an onCreateOptionsMenu
method, which we removed because it’s not used in this app—we’ll discuss onCreateOptionsMenu
in Chapter 5. Throughout this section, we assume that you create the necessary String
resources as you encounter them in the code descriptions.
1 // MainActivity.java 2 // Manages your favorite Twitter searches for easy 3 // access and display in the device's web browser 4 package com.deitel.twittersearches; 5 6 import java.util.ArrayList; 7 import java.util.Collections; 8 9 import ...
Get Android™ How to Program, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.