O'Reilly logo

Android User Interface Development by Jason Morris

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action - implementing TheBurgerPlaceActivity

In order to present a ListView of Burger objects with the BurgerAdapter class, we will need to create an Activity implementation for The Burger Place. The new Activity will also be responsible for listening to "touch" or "click" events on the items in the ListView. When the user touches one of the items, we need to update the model and ListView to reflect that the user has ordered another Burger.

  1. Create a new class in the root package of your project named TheBurgerPlaceActivity, and make sure it extends ListActivity:
    public class TheBurgerPlaceActivity extends ListActivity {
    
  2. Override the Activity.onCreate method.
  3. Invoke the super.onCreate to allow normal Android startup.
  4. Create an instance of ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required