Esempio n. 1
0
        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;
                });
            });
        }
Esempio n. 2
0
 public AndroidSelectGameImageryListAdapter(Activity context, IList <GameImageryItemViewModel> items, GameImageryRepository imageryRepository)
 {
     this.context           = context;
     this.items             = items;
     this.imageryRepository = imageryRepository;
 }