Example #1
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            var detail = DetailFragment.NewInstance(Intent.Extras.GetString("content"));
            var fragmentTransaction = FragmentManager.BeginTransaction();

            fragmentTransaction.Add(Android.Resource.Id.Content, detail);
            fragmentTransaction.Commit();
        }
Example #2
0
 private void ShowDetail(int position)
 {
     if (this.IsTablet)
     {
         this.ListView.SetItemChecked(position, true);
         var detailFragment      = DetailFragment.NewInstance(this.Feed.FeedItems[position].Content);
         var fragmentTransaction = FragmentManager.BeginTransaction();
         fragmentTransaction.Replace(Resource.Id.detailFragment, detailFragment);
         fragmentTransaction.SetTransition(FragmentTransit.FragmentFade);
         fragmentTransaction.Commit();
     }
     else
     {
         var intent = new Intent();
         intent.SetClass(Activity, typeof(DetailActivity));
         intent.PutExtra("content", this.Feed.FeedItems[position].Content);
         this.StartActivity(intent);
     }
 }