protected override void OnActivityResult(int requestCode, Result resultCode, Android.Content.Intent data)
        {
            const int    IMAGE_PICKER_REQUEST_CODE     = 100;
            const String IMAGE_PICKER_ARRAY_LIST_EXTRA = "ImagePickerImages";

            if (resultCode == Result.Ok && requestCode == IMAGE_PICKER_REQUEST_CODE)
            {
                var pickedImages = data.GetParcelableArrayListExtra(IMAGE_PICKER_ARRAY_LIST_EXTRA);

                if (imagePickerThumbnail)
                {
                    ImageView thumbnail = FindViewById <ImageView>(Resource.Id.thumbnail);
                    String    imagePath = ((Com.Nguyenhoanglam.Imagepicker.Model.Image)pickedImages[0]).Path;
                    thumbnail.SetImageURI(Android.Net.Uri.Parse(imagePath));
                }
                else
                {
                    UserPhotoFragment addPhoto = new UserPhotoFragment();
                    addPhoto.PhotoPath        = ((Com.Nguyenhoanglam.Imagepicker.Model.Image)pickedImages[0]).Path;
                    addPhoto.AddPhotoFragment = false;
                    addPhoto.UserPhotoClick   = this;
                    userPhotosAdapter.UserPhotosFragments.Add(addPhoto);
                    userPhotosAdapter.NotifyDataSetChanged();
                }
            }
        }
        public List <PhotoPath> saveUserPhotosAndReturnPaths(String title)
        {
            List <PhotoPath> photoPaths = new List <PhotoPath>();

            Android.Support.V4.View.ViewPager userPhotos = FindViewById <Android.Support.V4.View.ViewPager>(Resource.Id.userPhotos);
            for (int index = 1; index < userPhotos.Adapter.Count; index++)
            {
                userPhotos.SetCurrentItem(index, false);
                UserPhotoFragment userPhotoFragment = (UserPhotoFragment)((UserPhotosAdapter)userPhotos.Adapter).GetItem(index);
                String            imagePath         = saveImageFromImageView(userPhotoFragment.UserPhoto, title + "_" + "image" + index + ".jpg");

                PhotoPath photoPath = new PhotoPath(imagePath);
                photoPaths.Add(photoPath);
            }

            return(photoPaths);
        }
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.activity_add_user_board_game);

            EditText titleEditText   = FindViewById <EditText>(Resource.Id.title);
            Button   downloadFromBGG = FindViewById <Button>(Resource.Id.downloadBGG);

            downloadFromBGG.Click += delegate(object sender, EventArgs e) { searchBoardGameByTitleInBGG(titleEditText.Text); };

            RadioButton categoryRadioButton = FindViewById <RadioButton>(Resource.Id.categoryButton);

            categoryRadioButton.Click += delegate(object sender, EventArgs e) { showBoardGameCategoryPopup(categoryRadioButton.Text); };

            LinearLayout bggRankHeader  = FindViewById <LinearLayout>(Resource.Id.bggRankHeader);
            ImageView    arrowView      = bggRankHeader.FindViewById <ImageView>(Resource.Id.expandArrow);
            LinearLayout bggRankWrapper = FindViewById <LinearLayout>(Resource.Id.bggRankWrapper);

            bggRankHeader.Click += delegate(object sender, EventArgs e) { BggRankWrapperClick(arrowView, bggRankWrapper); };

            ImageView thumbnail = FindViewById <ImageView>(Resource.Id.thumbnail);

            Utils.ImagePicker imagePicker = new Utils.ImagePicker();
            thumbnail.Click += delegate(object sender, EventArgs e) { imagePicker.startImagePickerActivity(this, false); imagePickerThumbnail = true; };

            Android.Support.V4.View.ViewPager      userPhotos = FindViewById <Android.Support.V4.View.ViewPager>(Resource.Id.userPhotos);
            Android.Support.V4.App.FragmentManager fm         = this.SupportFragmentManager;
            userPhotosAdapter = new UserPhotosAdapter(fm);

            UserPhotoFragment addPhotoFragment = new UserPhotoFragment();

            System.Diagnostics.Debug.WriteLine("Garfield test " + "Fragment created");
            addPhotoFragment.PhotoPath        = Android.Net.Uri.Parse("android.resource://" + Application.Context.PackageName + "/" + Resource.Drawable.thumbnail).ToString();
            addPhotoFragment.AddPhotoFragment = true;
            addPhotoFragment.UserPhotoClick   = this;

            userPhotosAdapter.UserPhotosFragments.Add(addPhotoFragment);
            userPhotos.Adapter = userPhotosAdapter;

            Button submitButton = FindViewById <Button>(Resource.Id.submit);

            submitButton.Click += submitButtonClick;
        }