public override void ViewDidLoad() { base.ViewDidLoad(); var favorites = dataService.GetAllHotDogs(); TableView.Source = new HotDogDataSource(favorites, this); this.ParentViewController.NavigationItem.Title = "Ray's Favorites"; }
public override void ViewDidLoad() { base.ViewDidLoad(); IList <HotDog> hotDogs = _service.GetAllHotDogs(); HotDogDataSource hotDogDataSource = new HotDogDataSource(hotDogs, this); TableView.Source = hotDogDataSource; NavigationItem.Title = "Ray's Hot Dog menu"; }
public override void ViewDidLoad() { var hotDogs = dataService.GetAllHotDogs(); var dataSource = new HotDogDataSource(hotDogs, this); TableView.Source = dataSource; this.NavigationItem.Title = "Ray's Hot Dog Menu"; }
public override void ViewDidLoad() { base.ViewDidLoad(); var hotDogs = dataService.GetAllHotDogs(); var datasource = new HotDogDataSource(hotDogs, this); TableView.Source = datasource; }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); // Create your application here SetContentView(Resource.Layout.HotDogMenuView); hotDogListView = FindViewById <ListView>(Resource.Id.hotDogListView); hotDogDataService = new HotDogDataService(); allHotDogs = hotDogDataService.GetAllHotDogs(); hotDogListView.Adapter = new HotDogListAdapter(this, allHotDogs); hotDogListView.FastScrollEnabled = true; }
private void backupForListView() { hotDogListView = FindViewById <ListView>(Resource.Id.hotDogListView); hotDogDataService = new HotDogDataService(); allHotDogs = hotDogDataService.GetAllHotDogs(); hotDogListView.Adapter = new HotDogListAdapter(this, allHotDogs); hotDogListView.FastScrollEnabled = true; hotDogListView.ItemClick += HotDogListView_ItemClick; }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); SetContentView(Resource.Layout.HotDogMenuView); mListViewHotDog = FindViewById<ListView>(Resource.Id.list_view_hot_dog); mHotDogDataService = new HotDogDataService(); mAllHotDogs = mHotDogDataService.GetAllHotDogs(); mListViewHotDog.Adapter = new HotDogListAdapter(this, mAllHotDogs); // Enable fast scrolling just in case the list grows long. mListViewHotDog.FastScrollEnabled = true; }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); SetContentView(Resource.Layout.HotDogMenuView); //Reference the layout (.axml) ActionBar.NavigationMode = ActionBarNavigationMode.Tabs; //set this activity to a tab layout //hotDogListView = FindViewById<ListView>(Resource.Id.hotDogListView); //get reference to control hotDogDataService = new HotDogDataService(); allHotDogs = hotDogDataService.GetAllHotDogs(); //returns list of all available hotdogs //hotDogListView.Adapter = new HotDogListAdapter(this, allHotDogs); //hotDogListView.FastScrollEnabled = true; //hotDogListView.ItemClick += HotDogListView_ItemClick; AddTab("Favorites", Resource.Drawable.icon1, new FavoriteHotDogFragment()); AddTab("Meat Lovers", Resource.Drawable.icon2, new MeatLoversHotDogFragment()); AddTab("Veggie Lovers", Resource.Drawable.icon3, new VeggieHotDogFragment()); }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); // Create your application here SetContentView(Resource.Layout.HotDogMenuView); //set the list view hotDogListView = FindViewById <ListView>(Resource.Id.hotDogListView); //instatiate the hotdogdataservice hotDogDataService = new HotDogDataService(); //get all htodogs allHotDogs = hotDogDataService.GetAllHotDogs(); //hotdog menu adapter //pass in current activity(this) and all hotdogs list hotDogListView.Adapter = new HotDogListAdapter(this, allHotDogs); hotDogListView.FastScrollEnabled = true; }
public BaseFragment() { hotDogDataService = new HotDogDataService(); hotDogs = hotDogDataService.GetAllHotDogs(); }