Tuesday, 29 January 2013

Hold a List of Restaurants | Android Tutorial pdf

Hold a List of Restaurants

First, if we are going to have a list of restaurants in the UI, we need a list of restaurants as our model. So, in LunchList, change:
Restaurant r=new Restaurant();
to:
List<Restaurant> model=new ArrayList<Restaurant>();
Note that you will need to import java.util.List and java.util.ArrayList as well.

No comments: