예제 #1
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.ItemActivity);

            FragmentUtil.LoadFragment(this, Resource.Id.container, GetFragment(Intent.GetIntExtra(GetExtraId(), -1)));
        }
예제 #2
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.ListActivity);

            Tablet = FindViewById(Resource.Id.containerItem) != null;

            ListFragment = new ListFragment(GetTitleId(), GetListAdapter());
            FragmentUtil.LoadFragment(this, Resource.Id.containerList, ListFragment);
        }
예제 #3
0
 public void OnAdd()
 {
     if (Tablet)
     {
         FragmentUtil.LoadFragment(this, Resource.Id.containerItem, GetItemFragment());
     }
     else
     {
         StartActivity(typeof(TActivity));
     }
 }
예제 #4
0
 public void OnSelect(long id)
 {
     if (Tablet)
     {
         FragmentUtil.LoadFragment(this, Resource.Id.containerItem, GetItemFragment((int)id));
     }
     else
     {
         Intent i = new Intent(this, typeof(TActivity));
         i.PutExtra(GetExtraId(), (int)id);
         StartActivity(i);
     }
 }