コード例 #1
0
        private void MAdapterOnItemClick(object sender, PhotosAdapterClickEventArgs e)
        {
            try
            {
                PhotoAlbumObject item = MAdapter.GetItem(e.Position);
                if (item != null)
                {
                    var index = ImageData.PhotoAlbum.IndexOf(item);
                    //var intent = new Intent(this, typeof(ImagePostViewerActivity));
                    //intent.PutExtra("itemIndex", index.ToString()); //PhotoAlbumObject
                    //intent.PutExtra("AlbumObject", JsonConvert.SerializeObject(ImageData)); // PostDataObject
                    //StartActivity(intent);

                    var intent = new Intent(this, typeof(MultiImagesPostViewerActivity));
                    intent.PutExtra("indexImage", index.ToString());                        // Index Image Show
                    intent.PutExtra("AlbumObject", JsonConvert.SerializeObject(ImageData)); // PostDataObject
                    OverridePendingTransition(Resource.Animation.abc_popup_enter, Resource.Animation.popup_exit);
                    StartActivity(intent);
                }
            }
            catch (Exception exception)
            {
                Methods.DisplayReportResultTrack(exception);
            }
        }
コード例 #2
0
        private void MAdapterOnItemClick(object sender, PhotosAdapterClickEventArgs e)
        {
            try
            {
                PhotoAlbumObject item = MAdapter.GetItem(e.Position);
                if (item != null)
                {
                    var index = ImageData.PhotoAlbum.IndexOf(item);
                    //var intent = new Intent(this, typeof(ImagePostViewerActivity));
                    //intent.PutExtra("itemIndex", index.ToString()); //PhotoAlbumObject
                    //intent.PutExtra("AlbumObject", JsonConvert.SerializeObject(ImageData)); // PostDataObject
                    //StartActivity(intent);

                    var intent = new Intent(this, typeof(MultiImagesPostViewerActivity));
                    intent.PutExtra("indexImage", index.ToString());                        // Index Image Show
                    intent.PutExtra("AlbumObject", JsonConvert.SerializeObject(ImageData)); // PostDataObject
                    StartActivity(intent);
                }
            }
            catch (Exception exception)
            {
                Console.WriteLine(exception);
            }
        }