Esempio n. 1
0
        private void SetupLayoutFactories(bool cloned)
        {
            if (cloned)
            {
                return;
            }

            // If factories are already set we need to wrap them in our
            // own secret sauce.
            if (Sdk > BuildVersionCodes.Honeycomb)
            {
                // Check for FactoryWrapper2 may be too loose
                if (Factory2 != null && !(Factory2 is MvxLayoutInflaterCompat.FactoryWrapper2))
                {
                    MvxLayoutInflaterCompat.SetFactory(this, new DelegateFactory2(Factory2, _bindingVisitor));
                }

                return; // we shouldn't set Factory if Factory2 is being set...
            }

            // Check for FactoryWrapper may be too loose
            if (Factory != null && !(Factory is MvxLayoutInflaterCompat.FactoryWrapper))
            {
                MvxLayoutInflaterCompat.SetFactory(this, new DelegateFactory1(Factory, _bindingVisitor));
            }
        }
Esempio n. 2
0
        private void SetupLayoutFactories(bool cloned)
        {
            if (cloned)
            {
                return;
            }

            // Check for FactoryWrapper2 may be too loose
            if (Factory2 != null && !(Factory2 is MvxLayoutInflaterCompat.FactoryWrapper2))
            {
                MvxLayoutInflaterCompat.SetFactory(this, new DelegateFactory2(Factory2, _bindingVisitor));
            }
        }