コード例 #1
0
        public static SessionDetailsFragment NewInstance(int playId)
        {
            var detailsFrag = new SessionDetailsFragment {
                Arguments = new Bundle()
            };

            detailsFrag.Arguments.PutInt("current_session_id", playId);
            return(detailsFrag);
        }
コード例 #2
0
        private void ShowDetails(int sessionId)
        {
            _currentSessionId = sessionId;

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

            if (details == null || details.ShownSessionIndex != sessionId)
            {
                // Make new fragment to show this selection.
                details = SessionDetailsFragment.NewInstance(sessionId);

                // Insert the fragment by replacing any existing fragment
                FragmentManager.BeginTransaction()
                .Replace(Resource.Id.content_frame, details)
                .AddToBackStack(null)
                .Commit();
            }
        }
コード例 #3
0
		public static SessionDetailsFragment NewInstance (int playId)
		{
			var detailsFrag = new SessionDetailsFragment { Arguments = new Bundle () };
			detailsFrag.Arguments.PutInt ("current_session_id", playId);
			return detailsFrag;
		}