protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); // Set our view from the "main" layout resource SetContentView(Resource.Layout.PhoDetailView); //early demos //PhoDataService dataService = new PhoDataService (); //selectedPho = dataService.GetPhoById (1); //FindViews(); //BindData(); //------------------------------------------------------------------ //HandleEvents(); //navigation demos var selectedPhoId = Intent.Extras.GetInt("selectedPhoId"); dataService = new PhoDataService(); selectedPho = dataService.GetPhoById(selectedPhoId); FindViews(); BindData(); HandleEvents(); }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); SetContentView(Resource.Layout.PhoMenuView); phoListView = FindViewById <ListView>(Resource.Id.phoListView); phoDataService = new PhoDataService(); allPhos = phoDataService.GetAllPhos(); phoListView.Adapter = new PhoListAdapter(this, allPhos); phoListView.ItemClick += PhoListView_ItemClick; phoListView.FastScrollEnabled = true; }
public BaseFragment() { phoDataService = new PhoDataService(); }