//Open profile Albums
 private void AlbumsAdapterOnItemClick(object sender, HAlbumsAdapterClickEventArgs e)
 {
     try
     {
         if (e.Position > -1)
         {
             var item = AlbumsAdapter.GetItem(e.Position);
             if (item != null)
             {
                 Bundle bundle = new Bundle();
                 bundle.PutString("ItemData", JsonConvert.SerializeObject(item));
                 bundle.PutString("AlbumsId", item.Id.ToString());
                 AlbumsFragment = new AlbumsFragment
                 {
                     Arguments = bundle
                 };
                 GlobalContext.FragmentBottomNavigator.DisplayFragment(AlbumsFragment);
             }
         }
     }
     catch (Exception exception)
     {
         Console.WriteLine(exception);
     }
 }
Ejemplo n.º 2
0
        //Open profile Albums
        private void AlbumsAdapterOnItemClick(object sender, HAlbumsAdapterClickEventArgs e)
        {
            try
            {
                var item = AlbumsAdapter.GetItem(e.Position);
                if (item != null)
                {
                    Bundle bundle = new Bundle();
                    bundle.PutString("ItemData", JsonConvert.SerializeObject(item));
                    bundle.PutString("AlbumsId", item.Id.ToString());
                    AlbumsFragment = new AlbumsFragment
                    {
                        Arguments = bundle
                    };

                    SharedElementReturnTransition = (TransitionInflater.From(Activity).InflateTransition(Resource.Transition.change_image_transform));
                    ExitTransition = (TransitionInflater.From(Activity).InflateTransition(Resource.Transition.change_image_transform));

                    AlbumsFragment.SharedElementEnterTransition = TransitionInflater.From(Activity).InflateTransition(Resource.Transition.change_image_transform);
                    AlbumsFragment.ExitTransition = TransitionInflater.From(Activity).InflateTransition(Resource.Transition.change_image_transform);

                    GlobalContext.FragmentBottomNavigator.DisplayFragment(AlbumsFragment, e.Image);
                }
            }
            catch (Exception exception)
            {
                Console.WriteLine(exception);
            }
        }