Exemplo n.º 1
0
        public static EventDetailsFragment NewInstance(int playId)
        {
            var detailsFrag = new EventDetailsFragment {
                Arguments = new Bundle()
            };

            detailsFrag.Arguments.PutInt("current_event_id", playId);
            return(detailsFrag);
        }
        private void ShowDetails(int eventId)
        {
            _currentEventId = eventId;

            // Check what fragment is shown, replace if needed.
            var details = FragmentManager.FindFragmentById(Resource.Id.content_frame) as EventDetailsFragment;

            if (details == null || details.ShownEventIndex != eventId)
            {
                // Make new fragment to show this selection.
                details = EventDetailsFragment.NewInstance(eventId);

                // Insert the fragment by replacing any existing fragment
                FragmentManager.BeginTransaction()
                .Replace(Resource.Id.content_frame, details)
                .AddToBackStack(null)
                .Commit();
            }
        }
		public static EventDetailsFragment NewInstance (int playId)
		{
			var detailsFrag = new EventDetailsFragment { Arguments = new Bundle () };
			detailsFrag.Arguments.PutInt ("current_event_id", playId);
			return detailsFrag;
		}