public override bool OnOptionsItemSelected(IMenuItem item)
        {
            switch (item.ItemId)
            {
            case Resource.Id.Save:
                Transporter.SharedInstance.RemoveObject(Transporter.NewOutletAddedTransporterKey);
                Transporter.SharedInstance.RemoveObject(Transporter.NewOutletAddedValueTransporterKey);

                //var vc = new NewCardViewController();
                //(vc.TargetViewController as NewCardTableViewController).Shared.SelectedCard = (TargetViewController as SharingTableViewController).Shared.SelectedCard;
                //ApplicationExtensions.PushViewController(vc, true);

                break;

            case Resource.Id.Delete:

                //((SharingTableViewController)TargetViewController).Shared.DeleteCard();

                var convertedActivity = (Activity as BaseActivity);
                convertedActivity.HideKeyboard();
                convertedActivity.PopFragmentOver();
                break;

            case Resource.Id.Edit:
                var fragment = new NewCardRecyclerViewFragment();
                fragment.Shared.SelectedCard = Card.Create();
                convertedActivity            = (Activity as BaseActivity);
                fragment.Shared.SelectedCard = Shared.SelectedCard;
                convertedActivity.AddFragmentOver(fragment);


                break;
            }
            return(base.OnOptionsItemSelected(item));
        }
Beispiel #2
0
        public override void RecyclerView_ItemClick(Card obj, int position)
        {
            base.RecyclerView_ItemClick(obj, position);

            var convertedActivity = Activity as BaseActivity;

            if (convertedActivity == null)
            {
                return;
            }

            if (obj == null)
            {
                var fragment = new NewCardRecyclerViewFragment();
                fragment.Shared.SelectedCard = Card.Create();
                convertedActivity.AddFragmentOver(fragment);
                return;
            }

            var sharingFragment = new SharingRecyclerViewFragment();

            sharingFragment.Shared.SelectedCard = obj;
            convertedActivity.AddFragmentOver(sharingFragment);
        }