/**
         * Build and add "sessions" tab.
         */
        private void SetupSessionsTab()
        {
            // TODO: this is very inefficient and messy, clean it up
            FrameLayout fragmentContainer = new FrameLayout(this);

            fragmentContainer.Id = Resource.Id.fragment_sessions;
            fragmentContainer.LayoutParameters = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.FillParent, ViewGroup.LayoutParams.FillParent);
            FindViewById <ViewGroup> (Android.Resource.Id.TabContent).AddView(fragmentContainer);

            Intent intent = new Intent(Intent.ActionView, ScheduleContract.Sessions.CONTENT_STARRED_URI);

            var fm = SupportFragmentManager;

            mSessionsFragment = (SessionsFragment)fm.FindFragmentByTag("sessions");
            if (mSessionsFragment == null)
            {
                mSessionsFragment           = new SessionsFragment();
                mSessionsFragment.Arguments = IntentToFragmentArguments(intent);
                fm.BeginTransaction()
                .Add(Resource.Id.fragment_sessions, mSessionsFragment, "sessions")
                .Commit();
            }

            // Sessions content comes from reused activity
            mTabHost.AddTab(mTabHost.NewTabSpec(TAG_SESSIONS)
                            .SetIndicator(BuildIndicator(Resource.String.starred_sessions))
                            .SetContent(Resource.Id.fragment_sessions));
        }
예제 #2
0
		/**
	     * Build and add "sessions" tab.
	     */
		private void SetupSessionsTab ()
		{
			// TODO: this is very inefficient and messy, clean it up
			FrameLayout fragmentContainer = new FrameLayout (this);
			fragmentContainer.Id = Resource.Id.fragment_sessions;
			fragmentContainer.LayoutParameters = new ViewGroup.LayoutParams (ViewGroup.LayoutParams.FillParent, ViewGroup.LayoutParams.FillParent);
			FindViewById<ViewGroup> (Android.Resource.Id.TabContent).AddView (fragmentContainer);
	
			Intent intent = new Intent (Intent.ActionView, ScheduleContract.Sessions.CONTENT_STARRED_URI);
	
			var fm = SupportFragmentManager;
			mSessionsFragment = (SessionsFragment)fm.FindFragmentByTag ("sessions");
			if (mSessionsFragment == null) {
				mSessionsFragment = new SessionsFragment ();
				mSessionsFragment.Arguments = IntentToFragmentArguments (intent);
				fm.BeginTransaction ()
	                    .Add (Resource.Id.fragment_sessions, mSessionsFragment, "sessions")
	                    .Commit ();
			}
	
			// Sessions content comes from reused activity
			mTabHost.AddTab (mTabHost.NewTabSpec (TAG_SESSIONS)
	                .SetIndicator (BuildIndicator (Resource.String.starred_sessions))
	                .SetContent (Resource.Id.fragment_sessions));
		}
		protected override void OnCreate(Bundle bundle)
		{
			base.OnCreate(bundle);
			
			
			Intent intent = new Intent();
			intent.SetData(ScheduleContract.Sessions.BuildSessionsAtDirUri(Java.Lang.JavaSystem.CurrentTimeMillis()));
	
			SetContentView(Resource.Layout.activity_now_playing);
	
			FragmentManager fm = SupportFragmentManager;
			mSessionsFragment = (SessionsFragment)fm.FindFragmentByTag("sessions");
			if (mSessionsFragment == null) {
				mSessionsFragment = new SessionsFragment();
				mSessionsFragment.Arguments = IntentToFragmentArguments(intent);
				fm.BeginTransaction()
	                    .Add(Resource.Id.fragment_container_sessions, mSessionsFragment, "sessions")
	                    .Commit();
			}
		}
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);


            Intent intent = new Intent();

            intent.SetData(ScheduleContract.Sessions.BuildSessionsAtDirUri(Java.Lang.JavaSystem.CurrentTimeMillis()));

            SetContentView(Resource.Layout.activity_now_playing);

            FragmentManager fm = SupportFragmentManager;

            mSessionsFragment = (SessionsFragment)fm.FindFragmentByTag("sessions");
            if (mSessionsFragment == null)
            {
                mSessionsFragment           = new SessionsFragment();
                mSessionsFragment.Arguments = IntentToFragmentArguments(intent);
                fm.BeginTransaction()
                .Add(Resource.Id.fragment_container_sessions, mSessionsFragment, "sessions")
                .Commit();
            }
        }
예제 #5
0
			public SessionChangesObserver (SessionsFragment fragment) : base(new Handler())
			{
				_fragment = fragment;
			}
예제 #6
0
			public SearchAdapter (Context context, SessionsFragment activity) : base(context, null)
			{
				_activity = activity;
			}
 public SessionChangesObserver(SessionsFragment fragment) : base(new Handler())
 {
     _fragment = fragment;
 }
 public SearchAdapter(Context context, SessionsFragment activity) : base(context, null)
 {
     _activity = activity;
 }