Beispiel #1
0
        public void PricingTypeDialogFragmentOnActivityResult(bool _clearCart)
        {
            mDialogShown = false; //flag to enable dialog show
            CheckoutFragment fragment = (CheckoutFragment)SupportFragmentManager.FindFragmentByTag("CheckoutFragment");

            fragment.RefreshPricingType(_clearCart);
        }
Beispiel #2
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            Xamarin.Essentials.Platform.Init(this, savedInstanceState);
            // Set our view from the "main" layout resource
            SetContentView(Resource.Layout.activity_main);

            mCheckoutFragment     = new CheckoutFragment();
            mProductsFragment     = new ProductsFragment();
            mCustomersFragment    = new CustomersFragment();
            mTransactionsFragment = new TransactionsFragment();
            mSettingsFragment     = new SettingsFragment();
            mStackFragment        = new Stack <SupportFragment>();

            SupportToolbar toolBar = FindViewById <SupportToolbar>(Resource.Id.main_toolbar);

            SetSupportActionBar(toolBar);

            SupportActionBar ab = SupportActionBar;

            ab.SetHomeAsUpIndicator(Resource.Drawable.menu_icon_small);
            ab.SetDisplayHomeAsUpEnabled(true);
            ab.SetTitle(Resource.String.checkout_title);

            mDrawerLayout = FindViewById <DrawerLayout>(Resource.Id.drawer_layout);

            NavigationView navigationView = FindViewById <NavigationView>(Resource.Id.nav_view);

            if (navigationView != null)
            {
                SetUpDrawerContent(navigationView);
            }

            var trans = SupportFragmentManager.BeginTransaction();

            trans.Add(Resource.Id.fragmentContainer, mSettingsFragment, "SettingsFragment");
            trans.Hide(mSettingsFragment);
            trans.Add(Resource.Id.fragmentContainer, mTransactionsFragment, "TransactionsFragment");
            trans.Hide(mTransactionsFragment);
            trans.Add(Resource.Id.fragmentContainer, mCustomersFragment, "CustomersFragment");
            trans.Hide(mCustomersFragment);
            trans.Add(Resource.Id.fragmentContainer, mProductsFragment, "ProductsFragment");
            trans.Hide(mProductsFragment);

            trans.Add(Resource.Id.fragmentContainer, mCheckoutFragment, "CheckoutFragment");

            trans.Commit();

            mCurrentFragment = mCheckoutFragment;
        }
 public CheckoutRecyclerViewAdapter(float dpVal, int gridHeight, List <ProductsModel> products,
                                    List <ParentProductsModel> parentProducts, bool isGrid, RecyclerView recyclerView,
                                    Button btnCheckoutButton, Context checkoutContext, bool showSizes, SupportFragment supportFragment, string pricingType)
 {
     mGridHeight                 = gridHeight;
     mDpVal                      = dpVal;
     mProducts                   = products;
     mParentProducts             = parentProducts;
     mIsGrid                     = isGrid;
     mRecyclerView               = recyclerView;
     mCheckoutFragment           = new CheckoutFragment();
     mBtnCheckoutButton          = btnCheckoutButton;
     mCheckoutContext            = checkoutContext;
     mShowSizes                  = showSizes;
     mSupportFragment            = supportFragment;
     mCurrentSelectedPricingType = pricingType;
     mParentProductsDataAccess   = new ParentProductsDataAccess();
     mSizesDataAccess            = new SizesDataAccess();
 }