示例#1
0
		protected override async void OnCreate(Bundle bundle)
		{
			base.OnCreate(bundle);

			if (this.Intent != null)
			{
				_receiverID = new Guid(this.Intent.GetStringExtra(KEY_RECEIVER_ID));
			}

			// Create your application here
			this.SetContentView(Resource.Layout.activity_photo_galery);

			_layoutManager = new GridAutofitLayoutManager(this, 150);
			_recyclerView = FindViewById<RecyclerView>(Resource.Id.recycler_view_photo_galery);
			_recyclerView.SetLayoutManager(_layoutManager);

			_galery = new PhotoGalery(this);
			await _galery.LoadImages();
			_adapter = new PhotoGaleryAdapter(_galery, imageSelected);
			_recyclerView.SetAdapter(_adapter);
		}
示例#2
0
			public PhotoGaleryAdapter(PhotoGalery galery, Action<string> selectedAction)
			{
				this._galery = galery;
				this._selectedAction = selectedAction;
			}