void SetupGalleries() { balloonsGallery = myView.FindViewById <Gallery> (Resource.Id.gallery1); backgroundsGallery = myView.FindViewById <Gallery> (Resource.Id.gallery2); GameImageryRepository repository = new GameImageryRepository(); repository.GetBalloonImagesAsync().ContinueWith(t => { Activity.RunOnUiThread(() => { this.viewModel.BalloonImages = t.Result; balloonsAdapter = new AndroidSelectGameImageryListAdapter(this.Activity, this.viewModel.BalloonImages, repository); balloonsGallery.Adapter = balloonsAdapter; }); }); repository.GetBackgroundImagesAsync().ContinueWith(t => { Activity.RunOnUiThread(() => { this.viewModel.BackgroundImages = t.Result; backgroundsAdapter = new AndroidSelectGameImageryListAdapter(this.Activity, this.viewModel.BackgroundImages, repository); backgroundsGallery.Adapter = backgroundsAdapter; }); }); }
public AndroidSelectGameImageryListAdapter(Activity context, IList <GameImageryItemViewModel> items, GameImageryRepository imageryRepository) { this.context = context; this.items = items; this.imageryRepository = imageryRepository; }