Exemplo n.º 1
0
        internal void HideLayout(Context context, LinearLayout propertylayout, bool isMobile)
        {
            TextView hidePromtText = new TextView(context);

            hidePromtText.Text     = "Hide Prompt On Leave";
            hidePromtText.Gravity  = GravityFlags.Center;
            hidePromtText.TextSize = 20;


            Switch hidePromptSwitch = new Switch(context);

            hidePromptSwitch.CheckedChange += (object send, CompoundButton.CheckedChangeEventArgs eve) =>
            {
                if (isMobile)
                {
                    textMask.HidePrompt = eve.IsChecked;
                }
                else
                {
                    tabMask.HidePrompt = eve.IsChecked;
                    tabMask.OnApplyChanges();
                }
            };

            LinearLayout.LayoutParams hidePromptSwitchParams = new LinearLayout.LayoutParams(
                ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.WrapContent);
            if (SfMaskedEditText.IsTabletDevice(context))
            {
                hidePromptSwitchParams.SetMargins(0, 0, 110, 0);
            }
            else
            {
                hidePromptSwitchParams.SetMargins(0, 10, 0, 0);
            }

            LinearLayout hidePromptLayout = new LinearLayout(context);

            hidePromptLayout.AddView(hidePromtText);
            hidePromptLayout.AddView(hidePromptSwitch, hidePromptSwitchParams);
            hidePromptLayout.Orientation = Orientation.Horizontal;

            if (isMobile)
            {
                TextView textSpacing = new TextView(context);
                propertylayout.AddView(textSpacing);
                propertylayout.AddView(hidePromptLayout);

                TextView textSpacing1 = new TextView(context);
                propertylayout.AddView(textSpacing1);
                propertylayout.SetPadding(5, 0, 5, 0);
            }
            else
            {
                tabMask.OnApplyChanges();
                tabMask.ProprtyOptionsLayout.AddView(hidePromptLayout);
                TextView spaceText4 = new TextView(context);
                spaceText4.LayoutParameters = new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MatchParent, 38, GravityFlags.Center);
                tabMask.ProprtyOptionsLayout.AddView(spaceText4);
            }
        }
Exemplo n.º 2
0
        public View GetPropertyWindowLayout(Context context1)
        {
            bool         isTablet         = SfMaskedEditText.IsTabletDevice(context1);
            LinearLayout gridLinearLayout = null;

            context = context1;
            if (isTablet)
            {
                gridLinearLayout = new LinearLayout(context)
                {
                    Orientation = Android.Widget.Orientation.Vertical
                };

                LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MatchParent, LinearLayout.LayoutParams.WrapContent);

                layoutParams.TopMargin            = 25;
                gridLinearLayout.LayoutParameters = layoutParams;
                gridLinearLayout.SetBackgroundResource(Resource.Drawable.LinearLayout_Border);
            }

            propertylayout             = new LinearLayout(context);
            propertylayout.Orientation = Android.Widget.Orientation.Vertical;

            maskProperties.ValidationLayout(context, propertylayout, true);
            maskProperties.CultureLayout(context, propertylayout, true);
            maskProperties.CloseButtonVisibilityLayout(context, propertylayout, true);
            maskProperties.HideLayout(context, propertylayout, true);
            maskProperties.PromptLayout(context, propertylayout, true);

            if (isTablet)
            {
                gridLinearLayout.AddView(propertylayout);
                return(gridLinearLayout);
            }
            else
            {
                return(propertylayout);
            }
        }
Exemplo n.º 3
0
        public View GetSampleContent(Context con)
        {
            context = con;
            InitialMethod();

            ScrollView scroll   = new ScrollView(con);
            bool       isTablet = SfMaskedEditText.IsTabletDevice(con);

            linear = new LinearLayout(con);
            linear.SetBackgroundColor(Color.White);
            linear.Orientation = Orientation.Vertical;
            linear.SetPadding(12, 12, 12, 12);

            TextView headLabel = new TextView(con);

            headLabel.TextSize = 30;
            headLabel.SetTextColor(Color.ParseColor("#262626"));
            headLabel.Typeface = Typeface.DefaultBold;
            headLabel.Text     = "Funds Transfer";
            linear.AddView(headLabel);

            TextView fundTransferLabelSpacing = new TextView(con);

            fundTransferLabelSpacing.SetHeight(40);
            linear.AddView(fundTransferLabelSpacing);

            TextView textToAccount = new TextView(con);

            textToAccount.SetTextColor(Color.ParseColor("#6d6d72"));
            textToAccount.TextSize = 18;
            textToAccount.Typeface = Typeface.Default;
            textToAccount.Text     = "To Account";
            textToAccount.SetPadding(0, 0, 0, 10);
            linear.AddView(textToAccount);


            sfToAccount                 = new SfMaskedEdit(con);
            sfToAccount.Mask            = "0000 0000 0000 0000";
            sfToAccount.Gravity         = GravityFlags.Start;
            sfToAccount.ValidationMode  = InputValidationMode.KeyPress;
            sfToAccount.ValueMaskFormat = MaskFormat.ExcludePromptAndLiterals;
            sfToAccount.Hint            = "1234 1234 1234 1234";
            sfToAccount.FocusChange    += SfToAccount_FocusChange;
            sfToAccount.SetHintTextColor(Color.LightGray);
            linear.AddView(sfToAccount);

            erroToAccount = new TextView(con);
            erroToAccount.SetTextColor(Color.Red);
            erroToAccount.TextSize = 14;
            erroToAccount.Typeface = Typeface.Default;
            linear.AddView(erroToAccount);

            TextView textDesc = new TextView(con);

            textDesc.Text     = "Description";
            textDesc.Typeface = Typeface.Default;
            textDesc.SetPadding(0, 30, 0, 10);
            textDesc.TextSize = 18;
            linear.AddView(textDesc);


            sfDesc                 = new SfMaskedEdit(con);
            sfDesc.Mask            = "";
            sfDesc.Gravity         = GravityFlags.Start;
            sfDesc.ValidationMode  = InputValidationMode.KeyPress;
            sfDesc.ValueMaskFormat = MaskFormat.ExcludePromptAndLiterals;
            sfDesc.Hint            = "Enter description";
            sfDesc.FocusChange    += SfToAccount_FocusChange;
            sfDesc.SetHintTextColor(Color.LightGray);
            linear.AddView(sfDesc);


            TextView textAmount = new TextView(con);

            textAmount.Text     = "Amount";
            textAmount.Typeface = Typeface.Default;
            textAmount.SetPadding(0, 30, 0, 10);
            textAmount.TextSize = 18;
            linear.AddView(textAmount);

            amountMask                 = new SfMaskedEdit(con);
            amountMask.Mask            = "$ 0,000.00";
            amountMask.Gravity         = GravityFlags.Start;
            amountMask.ValidationMode  = InputValidationMode.KeyPress;
            amountMask.ValueMaskFormat = MaskFormat.IncludePromptAndLiterals;
            amountMask.Hint            = "$ 3,874.00";
            amountMask.FocusChange    += SfToAccount_FocusChange;
            amountMask.SetHintTextColor(Color.LightGray);
            linear.AddView(amountMask);

            errotextAmount = new TextView(con);
            errotextAmount.SetTextColor(Color.Red);
            errotextAmount.TextSize = 12;
            errotextAmount.Typeface = Typeface.Default;
            linear.AddView(errotextAmount);

            TextView textEmail = new TextView(con);

            textEmail.Text     = "Email ID";
            textEmail.Typeface = Typeface.Default;
            textEmail.SetPadding(0, 30, 0, 10);
            textEmail.TextSize = 18;
            linear.AddView(textEmail);

            emailMask                 = new SfMaskedEdit(con);
            emailMask.Mask            = @"\w+@\w+\.\w+";
            emailMask.MaskType        = MaskType.RegEx;
            emailMask.Gravity         = GravityFlags.Start;
            emailMask.ValidationMode  = InputValidationMode.KeyPress;
            emailMask.ValueMaskFormat = MaskFormat.ExcludePromptAndLiterals;
            emailMask.Hint            = "*****@*****.**";
            emailMask.FocusChange    += SfToAccount_FocusChange;
            emailMask.SetHintTextColor(Color.LightGray);
            linear.AddView(emailMask);

            errotextEmail = new TextView(con);
            errotextEmail.SetTextColor(Color.Red);
            errotextEmail.TextSize = 12;
            errotextEmail.Typeface = Typeface.Default;
            linear.AddView(errotextEmail);

            TextView textPhone = new TextView(con);

            textPhone.Text     = "Mobile Number ";
            textPhone.Typeface = Typeface.Default;
            textPhone.SetPadding(0, 30, 0, 10);
            textPhone.TextSize = 18;
            linear.AddView(textPhone);

            phoneMask                 = new SfMaskedEdit(con);
            phoneMask.Mask            = "+1 000 000 0000";
            phoneMask.Gravity         = GravityFlags.Start;
            phoneMask.ValueMaskFormat = MaskFormat.ExcludePromptAndLiterals;
            phoneMask.ValidationMode  = InputValidationMode.KeyPress;
            phoneMask.Hint            = "+1 323 339 3392";
            phoneMask.FocusChange    += SfToAccount_FocusChange;
            phoneMask.SetHintTextColor(Color.LightGray);
            linear.AddView(phoneMask);

            errotextPhone = new TextView(con);
            errotextPhone.SetTextColor(Color.Red);
            errotextPhone.TextSize = 12;
            errotextPhone.Typeface = Typeface.Default;
            linear.AddView(errotextPhone);

            TextView transferButtonSpacing = new TextView(con);

            transferButtonSpacing.SetHeight(30);

            Button transferButton = new Button(con);

            transferButton.SetWidth(ActionBar.LayoutParams.MatchParent);
            transferButton.SetHeight(40);
            transferButton.Text = "TRANSFER MONEY";
            transferButton.SetTextColor(Color.White);
            transferButton.SetBackgroundColor(Color.Rgb(72, 178, 224));
            transferButton.Click += (object sender, EventArgs e) =>
            {
                if (string.IsNullOrEmpty(sfToAccount.Text) || string.IsNullOrEmpty(sfDesc.Text) || string.IsNullOrEmpty(amountMask.Text) || string.IsNullOrEmpty(emailMask.Text) || string.IsNullOrEmpty(phoneMask.Text))
                {
                    resultsDialog.SetMessage("Please fill all the required data!");
                }
                else if ((sfToAccount.HasError || sfDesc.HasError || amountMask.HasError || emailMask.HasError || phoneMask.HasError))
                {
                    resultsDialog.SetMessage("Please enter valid details");
                }
                else
                {
                    resultsDialog.SetMessage(string.Format("Amount of {0} has been transferred successfully!", amountMask.Value));
                    string mask1 = sfToAccount.Mask;
                    sfToAccount.Mask = string.Empty;
                    sfToAccount.Mask = mask1;

                    mask1       = sfDesc.Mask;
                    sfDesc.Mask = "0";
                    sfDesc.Mask = mask1;

                    mask1           = amountMask.Mask;
                    amountMask.Mask = string.Empty;
                    amountMask.Mask = mask1;

                    mask1          = emailMask.Mask;
                    emailMask.Mask = string.Empty;
                    emailMask.Mask = mask1;

                    mask1          = phoneMask.Mask;
                    phoneMask.Mask = string.Empty;
                    phoneMask.Mask = mask1;
                }
                resultsDialog.Create().Show();
            };
            linear.AddView(transferButtonSpacing);
            linear.AddView(transferButton);

            TextView transferAfterButtonSpacing = new TextView(con);

            transferAfterButtonSpacing.SetHeight(60);
            linear.AddView(transferAfterButtonSpacing);

            sfToAccount.ValueChanged      += SfToAccount_ValueChanged;
            sfToAccount.MaskInputRejected += SfToAccount_MaskInputRejected;

            amountMask.ValueChanged      += AmountMask_ValueChanged;
            amountMask.MaskInputRejected += AmountMask_MaskInputRejected;

            emailMask.ValueChanged      += EmailMask_ValueChanged;
            emailMask.MaskInputRejected += EmailMask_MaskInputRejected;

            phoneMask.ValueChanged      += PhoneMask_ValueChanged;
            phoneMask.MaskInputRejected += PhoneMask_MaskInputRejected;

            linear.Touch += (object sender, View.TouchEventArgs e) =>
            {
                if (sfToAccount.IsFocused || sfDesc.IsFocused || amountMask.IsFocused || emailMask.IsFocused || phoneMask.IsFocused)
                {
                    Rect outRect = new Rect();
                    sfToAccount.GetGlobalVisibleRect(outRect);
                    sfDesc.GetGlobalVisibleRect(outRect);
                    amountMask.GetGlobalVisibleRect(outRect);
                    emailMask.GetGlobalVisibleRect(outRect);
                    phoneMask.GetGlobalVisibleRect(outRect);
                    if (!outRect.Contains((int)e.Event.RawX, (int)e.Event.RawY))
                    {
                        sfToAccount.ClearFocus();
                        sfDesc.ClearFocus();
                        amountMask.ClearFocus();
                        emailMask.ClearFocus();
                        phoneMask.ClearFocus();
                    }
                }
                hideSoftKeyboard((Activity)con);
            };

            //results dialog
            resultsDialog = new AlertDialog.Builder(con);
            resultsDialog.SetTitle("Status");
            resultsDialog.SetPositiveButton("OK", (object sender, DialogClickEventArgs e) =>
            {
            });

            resultsDialog.SetCancelable(true);

            frame.LayoutParameters = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.MatchParent);
            frame.SetBackgroundColor(Color.White);
            frame.SetPadding(10, 10, 10, 10);

            //scrollView1
            mainPageScrollView = new ScrollView(con);
            mainPageScrollView.LayoutParameters = new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MatchParent, (int)(totalHeight * 0.7), GravityFlags.Top | GravityFlags.CenterHorizontal);
            mainPageScrollView.AddView(linear);
            frame.AddView(mainPageScrollView);

            //buttomButtonLayout
            buttomButtonLayout = new FrameLayout(con);
            buttomButtonLayout.SetBackgroundColor(Color.Transparent);
            buttomButtonLayout.LayoutParameters = new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MatchParent, (int)(totalHeight * 0.1), GravityFlags.Bottom | GravityFlags.CenterHorizontal);

            //propertyButton
            propertyButton = new Button(con);
            propertyButton.LayoutParameters = new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.WrapContent, GravityFlags.Bottom | GravityFlags.CenterHorizontal);
            propertyButton.Text             = "OPTIONS";
            propertyButton.Gravity          = GravityFlags.Start;
            propertyFrameLayout             = new FrameLayout(con);
            propertyFrameLayout.SetBackgroundColor(Color.Rgb(236, 236, 236));
            propertyFrameLayout.LayoutParameters = new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MatchParent, (int)(totalHeight * 0.3), GravityFlags.CenterHorizontal);
            propertyFrameLayout.AddView(GetPropertyLayout(con));

            //propertyButton Click Listener
            propertyButton.Click += (object sender, EventArgs e) =>
            {
                buttomButtonLayout.RemoveAllViews();
                propertyFrameLayout.RemoveAllViews();
                propPageScrollView.LayoutParameters = new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MatchParent, (int)(totalHeight * 0.3), GravityFlags.Bottom | GravityFlags.CenterHorizontal);
                mainPageScrollView.LayoutParameters = new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MatchParent, (int)(totalHeight * 0.7), GravityFlags.Top | GravityFlags.CenterHorizontal);
                propertyFrameLayout.AddView(GetPropertyLayout(con));
            };

            //scrollView
            propPageScrollView = new ScrollView(con);
            propPageScrollView.LayoutParameters = new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MatchParent, (int)(totalHeight * 0.3), GravityFlags.Bottom | GravityFlags.CenterHorizontal);
            propPageScrollView.AddView(propertyFrameLayout);

            frame.AddView(propPageScrollView);
            frame.AddView(buttomButtonLayout);
            frame.FocusableInTouchMode = true;

            return(frame);
        }
Exemplo n.º 4
0
        public View GetSampleContent(Context con)
        {
            ScrollView   scroll   = new ScrollView(con);
            bool         isTablet = SfMaskedEditText.IsTabletDevice(con);
            LinearLayout linear   = new LinearLayout(con);

            linear.SetBackgroundColor(Color.White);
            linear.Orientation = Orientation.Vertical;
            linear.SetPadding(12, 12, 12, 12);

            TextView headLabel = new TextView(con);

            headLabel.TextSize = 30;
            headLabel.SetTextColor(Color.ParseColor("#262626"));
            headLabel.Typeface = Typeface.DefaultBold;
            headLabel.Text     = "Funds Transfer";
            linear.AddView(headLabel);

            TextView fundTransferLabelSpacing = new TextView(con);

            fundTransferLabelSpacing.SetHeight(40);
            linear.AddView(fundTransferLabelSpacing);

            TextView textToAccount = new TextView(con);

            textToAccount.SetTextColor(Color.ParseColor("#6d6d72"));
            textToAccount.TextSize = 16;
            textToAccount.Typeface = Typeface.Default;
            textToAccount.Text     = "To Account";
            textToAccount.SetPadding(0, 0, 0, 10);
            linear.AddView(textToAccount);


            sfToAccount                 = new SfMaskedEdit(con);
            sfToAccount.Mask            = "0000 0000 0000 0000";
            sfToAccount.Gravity         = GravityFlags.Start;
            sfToAccount.ValidationMode  = InputValidationMode.KeyPress;
            sfToAccount.ValueMaskFormat = MaskFormat.ExcludePromptAndLiterals;
            sfToAccount.Hint            = "1234 1234 1234 1234";
            sfToAccount.SetHintTextColor(Color.LightGray);
            sfToAccount.ClearButtonVisibility = ClearButtonVisibilityMode.WhileEditing;
            linear.AddView(sfToAccount);

            erroToAccount = new TextView(con);
            erroToAccount.SetTextColor(Color.Red);
            erroToAccount.TextSize = 12;
            erroToAccount.Typeface = Typeface.Default;
            linear.AddView(erroToAccount);

            TextView textDesc = new TextView(con);

            textDesc.Text     = "Description";
            textDesc.Typeface = Typeface.Default;
            textDesc.SetPadding(0, 30, 0, 10);
            textDesc.TextSize = 16;
            linear.AddView(textDesc);


            sfDesc                 = new SfMaskedEdit(con);
            sfDesc.Mask            = "";
            sfDesc.Gravity         = GravityFlags.Start;
            sfDesc.ValidationMode  = InputValidationMode.KeyPress;
            sfDesc.ValueMaskFormat = MaskFormat.ExcludePromptAndLiterals;
            sfDesc.Hint            = "Enter description";
            sfDesc.SetHintTextColor(Color.LightGray);
            sfDesc.ClearButtonVisibility = ClearButtonVisibilityMode.WhileEditing;
            linear.AddView(sfDesc);


            TextView textAmount = new TextView(con);

            textAmount.Text     = "Amount";
            textAmount.Typeface = Typeface.Default;
            textAmount.SetPadding(0, 30, 0, 10);
            textAmount.TextSize = 16;
            linear.AddView(textAmount);

            amountMask                 = new SfMaskedEdit(con);
            amountMask.Mask            = "$ 0,000.00";
            amountMask.Gravity         = GravityFlags.Start;
            amountMask.ValidationMode  = InputValidationMode.KeyPress;
            amountMask.ValueMaskFormat = MaskFormat.IncludePromptAndLiterals;
            amountMask.Hint            = "$ 3,874.00";
            amountMask.SetHintTextColor(Color.LightGray);
            amountMask.ClearButtonVisibility = ClearButtonVisibilityMode.WhileEditing;
            linear.AddView(amountMask);

            errotextAmount = new TextView(con);
            errotextAmount.SetTextColor(Color.Red);
            errotextAmount.TextSize = 12;
            errotextAmount.Typeface = Typeface.Default;
            linear.AddView(errotextAmount);


            TextView textEmail = new TextView(con);

            textEmail.Text     = "Email ID";
            textEmail.Typeface = Typeface.Default;
            textEmail.SetPadding(0, 30, 0, 10);
            textEmail.TextSize = 16;
            linear.AddView(textEmail);

            emailMask                 = new SfMaskedEdit(con);
            emailMask.Mask            = @"\w+@\w+\.\w+";
            emailMask.MaskType        = MaskType.RegEx;
            emailMask.Gravity         = GravityFlags.Start;
            emailMask.ValidationMode  = InputValidationMode.KeyPress;
            emailMask.ValueMaskFormat = MaskFormat.ExcludePromptAndLiterals;
            emailMask.Hint            = "*****@*****.**";
            emailMask.SetHintTextColor(Color.LightGray);
            emailMask.ClearButtonVisibility = ClearButtonVisibilityMode.WhileEditing;
            linear.AddView(emailMask);

            errotextEmail = new TextView(con);
            errotextEmail.SetTextColor(Color.Red);
            errotextEmail.TextSize = 12;
            errotextEmail.Typeface = Typeface.Default;
            linear.AddView(errotextEmail);

            TextView textPhone = new TextView(con);

            textPhone.Text     = "Mobile Number ";
            textPhone.Typeface = Typeface.Default;
            textPhone.SetPadding(0, 30, 0, 10);
            textPhone.TextSize = 16;
            linear.AddView(textPhone);

            phoneMask                 = new SfMaskedEdit(con);
            phoneMask.Mask            = "+1 000 000 0000";
            phoneMask.Gravity         = GravityFlags.Start;
            phoneMask.ValueMaskFormat = MaskFormat.ExcludePromptAndLiterals;
            phoneMask.ValidationMode  = InputValidationMode.KeyPress;
            phoneMask.Hint            = "+1 323 339 3392";
            phoneMask.SetHintTextColor(Color.LightGray);
            phoneMask.ClearButtonVisibility = ClearButtonVisibilityMode.WhileEditing;
            linear.AddView(phoneMask);

            errotextPhone = new TextView(con);
            errotextPhone.SetTextColor(Color.Red);
            errotextPhone.TextSize = 12;
            errotextPhone.Typeface = Typeface.Default;
            linear.AddView(errotextPhone);

            TextView searchButtonSpacing = new TextView(con);

            searchButtonSpacing.SetHeight(30);

            Button searchButton = new Button(con);

            searchButton.SetWidth(ActionBar.LayoutParams.MatchParent);
            searchButton.SetHeight(40);
            searchButton.Text = "TRANSFER MONEY";
            searchButton.SetTextColor(Color.White);
            searchButton.SetBackgroundColor(Color.Gray);
            searchButton.Click += (object sender, EventArgs e) =>
            {
                if (string.IsNullOrEmpty(sfToAccount.Text) || string.IsNullOrEmpty(sfDesc.Text) || string.IsNullOrEmpty(amountMask.Text) || string.IsNullOrEmpty(emailMask.Text) || string.IsNullOrEmpty(phoneMask.Text))
                {
                    resultsDialog.SetMessage("Please fill all the required data!");
                }
                else if ((sfToAccount.HasError || sfDesc.HasError || amountMask.HasError || emailMask.HasError || phoneMask.HasError))
                {
                    resultsDialog.SetMessage("Please enter valid details");
                }
                else
                {
                    resultsDialog.SetMessage(string.Format("Amount of {0} has been transferred successfully!", amountMask.Value));
                    string mask1 = sfToAccount.Mask;
                    sfToAccount.Mask = string.Empty;
                    sfToAccount.Mask = mask1;

                    mask1       = sfDesc.Mask;
                    sfDesc.Mask = "0";
                    sfDesc.Mask = mask1;

                    mask1           = amountMask.Mask;
                    amountMask.Mask = string.Empty;
                    amountMask.Mask = mask1;

                    mask1          = emailMask.Mask;
                    emailMask.Mask = string.Empty;
                    emailMask.Mask = mask1;

                    mask1          = phoneMask.Mask;
                    phoneMask.Mask = string.Empty;
                    phoneMask.Mask = mask1;
                }
                resultsDialog.Create().Show();
            };
            linear.AddView(searchButtonSpacing);
            linear.AddView(searchButton);

            sfToAccount.ValueChanged      += SfToAccount_ValueChanged;
            sfToAccount.MaskInputRejected += SfToAccount_MaskInputRejected;

            amountMask.ValueChanged      += AmountMask_ValueChanged;
            amountMask.MaskInputRejected += AmountMask_MaskInputRejected;

            emailMask.ValueChanged      += EmailMask_ValueChanged;
            emailMask.MaskInputRejected += EmailMask_MaskInputRejected;

            phoneMask.ValueChanged      += PhoneMask_ValueChanged;
            phoneMask.MaskInputRejected += PhoneMask_MaskInputRejected;

            //results dialog
            resultsDialog = new AlertDialog.Builder(con);
            resultsDialog.SetTitle("Status");
            resultsDialog.SetPositiveButton("OK", (object sender, DialogClickEventArgs e) =>
            {
            });

            resultsDialog.SetCancelable(true);

            scroll.AddView(linear);

            return(scroll);
        }
        internal void PromptLayout(Context context, LinearLayout propertylayout, bool isMobile)
        {
            TextView promptLabel = new TextView(context);

            promptLabel.TextSize = 20;
            promptLabel.Text     = "Prompt Character";

            //prompt Spinner
            Spinner promptSpinner = new Spinner(context, SpinnerMode.Dialog);

            promptSpinner.SetGravity(GravityFlags.Left);

            //prompt List
            List <char> promptList = new List <char>();

            promptList.Add('_');
            promptList.Add('*');
            promptList.Add('~');
            //prompt Adapter
            ArrayAdapter <char> promptAdopter = new ArrayAdapter <char>(context, Android.Resource.Layout.SimpleSpinnerItem, promptList);

            promptAdopter.SetDropDownViewResource(Android.Resource.Layout.SimpleSpinnerDropDownItem);
            promptSpinner.Adapter = promptAdopter;
            promptSpinner.SetSelection(promptPosition);

            //prompt Spinner ItemSelected Listener
            promptSpinner.ItemSelected += (object sender, AdapterView.ItemSelectedEventArgs e) =>
            {
                promptPosition = e.Position;
                char prompt = promptAdopter.GetItem(e.Position);
                if (isMobile)
                {
                    textMask.CurrentPrompt = prompt;
                }
                else
                {
                    tabMask.CurrentPrompt = prompt;
                    tabMask.OnApplyChanges();
                }
            };

            LinearLayout.LayoutParams promptspinnerLayout = new LinearLayout.LayoutParams(
                ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.WrapContent);
            if (SfMaskedEditText.IsTabletDevice(context))
            {
                promptspinnerLayout.SetMargins(120, 0, 90, 0);
            }
            else
            {
                promptspinnerLayout.SetMargins(200, 0, 0, 0);
            }


            LinearLayout promptLayout = new LinearLayout(context);

            promptLayout.AddView(promptLabel);
            promptLayout.AddView(promptSpinner, promptspinnerLayout);
            promptLayout.Orientation = Orientation.Horizontal;
            if (isMobile)
            {
                propertylayout.AddView(promptLayout);
            }
            else
            {
                tabMask.OnApplyChanges();
                tabMask.ProprtyOptionsLayout.AddView(promptLayout);
            }
        }