Ejemplo n.º 1
0
        /// <summary>
        /// Create a new cloned instance, applying the action after cloning.
        /// </summary>
        /// <param name="action"></param>
        /// <returns></returns>
        /// <remarks>
        /// This is typically used when the LayoutParamsFactory changes when being used in one of Androids view groups.
        /// Apologies to F#!
        /// </remarks>
        public AndroidContext With(Action <AndroidContext> action = default)
        {
            var newContext = new AndroidContext(this);

            action?.Invoke(newContext);

            return(newContext);
        }
Ejemplo n.º 2
0
 protected AndroidContext(AndroidContext androidContext) : base(androidContext)
 {
     Context             = androidContext.Context;
     LayoutParamsFactory = androidContext.LayoutParamsFactory;
 }