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

            fragmentContainer.Id = (Resource.Id.fragment_vendors);
            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.Vendors.CONTENT_STARRED_URI);

            var fm = SupportFragmentManager;

            mVendorsFragment = (VendorsFragment)fm.FindFragmentByTag("vendors");
            if (mVendorsFragment == null)
            {
                mVendorsFragment           = new VendorsFragment();
                mVendorsFragment.Arguments = IntentToFragmentArguments(intent);
                fm.BeginTransaction()
                .Add(Resource.Id.fragment_vendors, mVendorsFragment, "vendors")
                .Commit();
            }

            // Vendors content comes from reused activity
            mTabHost.AddTab(mTabHost.NewTabSpec(TAG_VENDORS)
                            .SetIndicator(BuildIndicator(Resource.String.starred_vendors))
                            .SetContent(Resource.Id.fragment_vendors));
        }
예제 #2
0
		/**
	     * Build and add "vendors" tab.
	     */
		private void SetupVendorsTab ()
		{
			// TODO: this is very inefficient and messy, clean it up
			FrameLayout fragmentContainer = new FrameLayout (this);
			fragmentContainer.Id = (Resource.Id.fragment_vendors);
			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.Vendors.CONTENT_STARRED_URI);
	
			var fm = SupportFragmentManager;
	
			mVendorsFragment = (VendorsFragment)fm.FindFragmentByTag ("vendors");
			if (mVendorsFragment == null) {
				mVendorsFragment = new VendorsFragment ();
				mVendorsFragment.Arguments = IntentToFragmentArguments (intent);
				fm.BeginTransaction ()
	                    .Add (Resource.Id.fragment_vendors, mVendorsFragment, "vendors")
	                    .Commit ();
			}
	
			// Vendors content comes from reused activity
			mTabHost.AddTab (mTabHost.NewTabSpec (TAG_VENDORS)
	                .SetIndicator (BuildIndicator (Resource.String.starred_vendors))
	                .SetContent (Resource.Id.fragment_vendors));
		}
 public VendorChangesObserver(VendorsFragment fragment) : base(new Handler())
 {
     _fragment = fragment;
 }
예제 #4
0
			public VendorChangesObserver (VendorsFragment fragment) : base(new Handler())
			{
				_fragment = fragment;
			}