public override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            Intent intent    = BaseActivity.FragmentArgumentsToIntent(Arguments);
            Uri    tracksUri = intent.Data;

            mNextType = intent.GetStringExtra(EXTRA_NEXT_TYPE);

            mAdapter    = new TracksAdapter(Activity);
            ListAdapter = mAdapter;

            // Filter our tracks query to only include those with valid results
            String[] projection = TracksAdapter.TracksQuery.PROJECTION;
            String   selection  = null;

            if (NEXT_TYPE_SESSIONS.Equals(mNextType))
            {
                // Only show tracks with at least one session
                projection = TracksAdapter.TracksQuery.PROJECTION_WITH_SESSIONS_COUNT;
                selection  = ScheduleContract.Tracks.SESSIONS_COUNT + ">0";
                //AnalyticsUtils.getInstance(getActivity()).trackPageView("/Tracks");
            }
            else if (NEXT_TYPE_VENDORS.Equals(mNextType))
            {
                // Only show tracks with at least one vendor
                projection = TracksAdapter.TracksQuery.PROJECTION_WITH_VENDORS_COUNT;
                selection  = ScheduleContract.Tracks.VENDORS_COUNT + ">0";
                //AnalyticsUtils.getInstance(getActivity()).trackPageView("/Sandbox");
            }

            // Start background query to load tracks
            mHandler = new NotifyingAsyncQueryHandler(Activity.ContentResolver, this);
            mHandler.StartQuery(tracksUri, projection, selection, null, ScheduleContract.Tracks.DEFAULT_SORT);
        }
        public override void OnActivityCreated(Bundle p0)
        {
            base.OnActivityCreated(p0);

            if (mSessionUri == null)
            {
                return;
            }

            // Start background queries to load session and track details
            Uri speakersUri = ScheduleContract.Sessions.BuildSpeakersDirUri(mSessionId);

            mHandler = new NotifyingAsyncQueryHandler(Activity.ContentResolver, this);
            mHandler.StartQuery(SessionsQuery._TOKEN, mSessionUri, SessionsQuery.PROJECTION);
            mHandler.StartQuery(TracksQuery._TOKEN, mTrackUri, TracksQuery.PROJECTION);
            mHandler.StartQuery(SpeakersQuery._TOKEN, speakersUri, SpeakersQuery.PROJECTION);
        }
Beispiel #3
0
        public override void OnActivityCreated(Bundle p0)
        {
            base.OnActivityCreated(p0);

            if (mVendorUri == null)
            {
                return;
            }

            // Start background query to load vendor details

            mHandler = new NotifyingAsyncQueryHandler(Activity.ContentResolver, this);
            mHandler.StartQuery(mVendorUri, VendorsQuery.PROJECTION);
        }
		public override void OnActivityCreated (Bundle p0)
		{
			base.OnActivityCreated (p0);
			
			if (mVendorUri == null) {
				return;
			}

			// Start background query to load vendor details
	
			mHandler = new NotifyingAsyncQueryHandler (Activity.ContentResolver, this);
			mHandler.StartQuery (mVendorUri, VendorsQuery.PROJECTION);
	
		}
        public void ReloadFromArguments(Bundle arguments)
        {
            // Teardown from previous arguments
            if (mListPopupWindow != null)
            {
                mListPopupWindow.SetAdapter(null);
            }
            if (mCursor != null)
            {
                Activity.StopManagingCursor(mCursor);
                mCursor = null;
            }
            mHandler.CancelOperation(TracksAdapter.TracksQuery._TOKEN);

            // Load new arguments
            Intent intent    = BaseActivity.FragmentArgumentsToIntent(arguments);
            Uri    tracksUri = intent.Data;

            if (tracksUri == null)
            {
                return;
            }

            mNextType = intent.GetStringExtra(EXTRA_NEXT_TYPE);

            // Filter our tracks query to only include those with valid results
            String[] projection = TracksAdapter.TracksQuery.PROJECTION;
            String   selection  = null;

            if (TracksFragment.NEXT_TYPE_SESSIONS.Equals(mNextType))
            {
                // Only show tracks with at least one session
                projection = TracksAdapter.TracksQuery.PROJECTION_WITH_SESSIONS_COUNT;
                selection  = ScheduleContract.Tracks.SESSIONS_COUNT + ">0";
            }
            else if (TracksFragment.NEXT_TYPE_VENDORS.Equals(mNextType))
            {
                // Only show tracks with at least one vendor
                projection = TracksAdapter.TracksQuery.PROJECTION_WITH_VENDORS_COUNT;
                selection  = ScheduleContract.Tracks.VENDORS_COUNT + ">0";
            }

            // Start background query to load tracks
            mHandler.StartQuery(TracksAdapter.TracksQuery._TOKEN, null, tracksUri, projection, selection, null, ScheduleContract.Tracks.DEFAULT_SORT);
        }
		public override void OnActivityCreated (Bundle p0)
		{
			base.OnActivityCreated (p0);
			
			if (mSessionUri == null) {
				return;
			}
	
			// Start background queries to load session and track details
			Uri speakersUri = ScheduleContract.Sessions.BuildSpeakersDirUri (mSessionId);
	
			mHandler = new NotifyingAsyncQueryHandler (Activity.ContentResolver, this);
			mHandler.StartQuery (SessionsQuery._TOKEN, mSessionUri, SessionsQuery.PROJECTION);
			mHandler.StartQuery (TracksQuery._TOKEN, mTrackUri, TracksQuery.PROJECTION);
			mHandler.StartQuery (SpeakersQuery._TOKEN, speakersUri, SpeakersQuery.PROJECTION);
		}